From fdc0205be00f780d531865bd14630ecc578e3449 Mon Sep 17 00:00:00 2001 From: Khuda Dad Nomani Date: Tue, 20 Jun 2023 12:43:14 +0100 Subject: [PATCH 1/4] initial commit --- .github/workflows/if-nodejs-release.yml | 18 +++++++++++------- apps/studio/package.json | 3 +-- package-lock.json | 3 +-- package.json | 1 + 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/if-nodejs-release.yml b/.github/workflows/if-nodejs-release.yml index a299c8b77..88912ce4e 100644 --- a/.github/workflows/if-nodejs-release.yml +++ b/.github/workflows/if-nodejs-release.yml @@ -38,16 +38,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 +55,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 +68,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 +77,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/studio/package.json b/apps/studio/package.json index 43176ae18..cae5172cf 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", @@ -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..689fb9944 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", @@ -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", From 6ff9ff2057c26c425413db49beefa9be04e57369 Mon Sep 17 00:00:00 2001 From: Khuda Dad Nomani Date: Tue, 20 Jun 2023 14:53:51 +0100 Subject: [PATCH 2/4] ci: remove check --- .github/workflows/if-nodejs-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/if-nodejs-release.yml b/.github/workflows/if-nodejs-release.yml index 88912ce4e..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:' ) || From 184b3c82136cd5ad462863d6aef499a4504ae27b Mon Sep 17 00:00:00 2001 From: Khuda Dad Nomani Date: Tue, 20 Jun 2023 14:56:06 +0100 Subject: [PATCH 3/4] fix: generate docker --- apps/studio/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/studio/package.json b/apps/studio/package.json index cae5172cf..dcf982d7d 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -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": { From 1ade911611df8f2c685d840cb8976f315f01a00b Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 20 Jun 2023 14:06:51 +0000 Subject: [PATCH 4/4] chore(release): design-system-v1.0.0 --- apps/design-system/package-lock.json | 4 ++-- apps/design-system/package.json | 2 +- package-lock.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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/package-lock.json b/package-lock.json index 689fb9944..cd520657a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,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",