diff --git a/.github/workflows/if-nodejs-release.yml b/.github/workflows/if-nodejs-release.yml index a299c8b77..7d77299d4 100644 --- a/.github/workflows/if-nodejs-release.yml +++ b/.github/workflows/if-nodejs-release.yml @@ -22,7 +22,6 @@ jobs: # "commits" contains array of objects where one of the properties is commit "message" # Release workflow will be skipped if release conventional commits are not used if: | - startsWith( github.repository, 'asyncapi/' ) && (startsWith( github.event.commits[0].message , 'fix:' ) || startsWith( github.event.commits[0].message, 'fix!:' ) || startsWith( github.event.commits[0].message, 'feat:' ) || @@ -38,16 +37,16 @@ jobs: git config --global core.autocrlf false git config --global core.eol lf - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Check if Node.js project and has package.json id: packagejson - run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false" + run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT shell: bash - if: steps.packagejson.outputs.exists == 'true' name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 18 cache: 'npm' cache-dependency-path: '**/package-lock.json' - if: steps.packagejson.outputs.exists == 'true' @@ -55,7 +54,7 @@ jobs: run: npm install - if: steps.packagejson.outputs.exists == 'true' name: Run test - run: npm test + run: npm test --if-present - if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel name: Report workflow run status to Slack uses: 8398a7/action-slack@v3 @@ -68,7 +67,7 @@ jobs: release: needs: [test-nodejs] - name: Publish to any of NPM, Github, and Docker Hub + name: Publish to any of NPM, Github, or Docker Hub runs-on: ubuntu-latest steps: - name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows @@ -77,14 +76,18 @@ jobs: git config --global core.eol lf - name: Checkout repository uses: actions/checkout@v3 + with: + token: ${{ secrets.GH_TOKEN }} - name: Check if Node.js project and has package.json id: packagejson - run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false" + run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT - if: steps.packagejson.outputs.exists == 'true' name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 18 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' - if: steps.packagejson.outputs.exists == 'true' name: Install dependencies run: npm install diff --git a/apps/design-system/package-lock.json b/apps/design-system/package-lock.json index 855368ce4..5ce16ab9a 100644 --- a/apps/design-system/package-lock.json +++ b/apps/design-system/package-lock.json @@ -1,12 +1,12 @@ { "name": "studio-ui", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "studio-ui", - "version": "0.1.0", + "version": "1.0.0", "dependencies": { "@headlessui/react": "^1.7.13", "@testing-library/jest-dom": "^5.16.2", diff --git a/apps/design-system/package.json b/apps/design-system/package.json index 51d8d95b8..05446f8d6 100644 --- a/apps/design-system/package.json +++ b/apps/design-system/package.json @@ -1,6 +1,6 @@ { "name": "design-system", - "version": "0.1.0", + "version": "1.0.0", "private": true, "dependencies": { "@headlessui/react": "^1.7.13", diff --git a/apps/studio/package.json b/apps/studio/package.json index 43176ae18..dcf982d7d 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -54,7 +54,7 @@ "start": "craco start", "build": "npm run generate:template-parameters && craco build", "test": "npm run test:unit", - "test:unit": "craco test --detectOpenHandles", + "test:unit": "craco test --watchAll=false --detectOpenHandles", "eject": "react-scripts eject", "lint": "eslint --max-warnings 0 --config .eslintrc .", "lint:fix": "eslint --max-warnings 0 --config .eslintrc . --fix", @@ -63,7 +63,7 @@ "generate:template-parameters": "ts-node ./scripts/template-parameters.ts", "generate:docker": "docker build --tag asyncapi/studio .", "bump:version": "../../bump-version.sh @asyncapi/studio", - "release": "npm run generate:docker && semantic-release -e semantic-release-monorepo", + "release": "semantic-release -e semantic-release-monorepo", "prepublishOnly": "npm run build && npm run generate:readme:toc" }, "browserslist": { @@ -90,7 +90,6 @@ "@asyncapi/nodejs-ws-template": "^0.9.33", "@asyncapi/python-paho-template": "^0.2.13", "@asyncapi/ts-nats-template": "^0.10.2", - "@craco/craco": "^7.1.0", "@tailwindcss/typography": "^0.5.8", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", diff --git a/package-lock.json b/package-lock.json index eca43cca9..cd520657a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "packages/*" ], "devDependencies": { + "@craco/craco": "^7.1.0", "@semantic-release-plus/docker": "^3.1.2", "@semantic-release/commit-analyzer": "^9.0.2", "@semantic-release/github": "^8.0.6", @@ -19,7 +20,7 @@ } }, "apps/design-system": { - "version": "0.1.0", + "version": "1.0.0", "dependencies": { "@headlessui/react": "^1.7.13", "@mdx-js/react": "^1.6.22", @@ -151,7 +152,6 @@ "@asyncapi/nodejs-ws-template": "^0.9.33", "@asyncapi/python-paho-template": "^0.2.13", "@asyncapi/ts-nats-template": "^0.10.2", - "@craco/craco": "^7.1.0", "@tailwindcss/typography": "^0.5.8", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", @@ -37068,7 +37068,6 @@ "@asyncapi/react-component": "^1.0.0-next.47", "@asyncapi/specs": "^4.2.1", "@asyncapi/ts-nats-template": "^0.10.2", - "@craco/craco": "^7.1.0", "@ebay/nice-modal-react": "^1.2.10", "@headlessui/react": "^1.7.4", "@hookstate/core": "^4.0.0-rc21", diff --git a/package.json b/package.json index c0461a20b..bb0ac8305 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ }, "devDependencies": { "turbo": "^1.10.2", + "@craco/craco": "^7.1.0", "semantic-release": "^21.0.3", "semantic-release-monorepo": "^7.0.5", "@semantic-release-plus/docker": "^3.1.2",