From b8a9d132c189bd7a1cedb21dbd6d1317067e6949 Mon Sep 17 00:00:00 2001 From: fryorcraken <110212804+fryorcraken@users.noreply.github.com> Date: Tue, 21 Oct 2025 16:35:01 +1100 Subject: [PATCH] chore: npm publication (#2688) * chore: npm publication Fixing npm publication and warnings * Upgrade workflow to use trusted publishing https://docs.npmjs.com/trusted-publishers * bump node js to 24 To avoid having to reinstall npm in pre-release for npmjs trusted publishers --- .github/workflows/ci.yml | 2 +- .github/workflows/pre-release.yml | 22 ++++++++++++---------- .github/workflows/test-node.yml | 8 ++++---- .github/workflows/test-reliability.yml | 6 +++--- package.json | 3 ++- packages/core/package.json | 2 +- packages/discovery/package.json | 2 +- packages/enr/package.json | 2 +- packages/interfaces/package.json | 2 +- packages/message-encryption/package.json | 2 +- packages/proto/package.json | 2 +- packages/react/package.json | 2 +- packages/relay/package.json | 2 +- packages/reliability-tests/package.json | 2 +- packages/rln/package.json | 2 +- packages/sdk/package.json | 2 +- packages/sds/package.json | 2 +- packages/tests/package.json | 2 +- packages/utils/package.json | 2 +- 19 files changed, 36 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28595b9022..8a04e6a560 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ on: type: string env: - NODE_JS: "22" + NODE_JS: "24" jobs: check: diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 659d6c62b2..6170343f17 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -2,7 +2,11 @@ on: workflow_dispatch: env: - NODE_JS: "22" + NODE_JS: "24" + +permissions: + id-token: write # Required for npmjs' OIDC + contents: read jobs: pre-release: @@ -10,19 +14,17 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'workflow_dispatch' steps: - - uses: actions/checkout@v3 - with: + - uses: actions/checkout@v4 + with: repository: waku-org/js-waku - - - uses: actions/setup-node@v3 + + - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_JS }} registry-url: "https://registry.npmjs.org" - + - run: npm install - + - run: npm run build - + - run: npm run publish -- --tag next - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_JS_WAKU_PUBLISH }} diff --git a/.github/workflows/test-node.yml b/.github/workflows/test-node.yml index a42f1afb92..0022695fd7 100644 --- a/.github/workflows/test-node.yml +++ b/.github/workflows/test-node.yml @@ -24,7 +24,7 @@ on: default: false env: - NODE_JS: "22" + NODE_JS: "24" # Ensure test type conditions remain consistent. WAKU_SERVICE_NODE_PARAMS: ${{ (inputs.test_type == 'go-waku-master') && '--min-relay-peers-to-publish=0' || '' }} DEBUG: ${{ inputs.debug }} @@ -42,7 +42,7 @@ jobs: checks: write steps: - uses: actions/checkout@v3 - with: + with: repository: waku-org/js-waku - name: Remove unwanted software @@ -62,7 +62,7 @@ jobs: - name: Merge allure reports if: always() && env.ALLURE_REPORTS == 'true' - run: node ci/mergeAllureResults.cjs + run: node ci/mergeAllureResults.cjs - name: Get allure history if: always() && env.ALLURE_REPORTS == 'true' @@ -125,4 +125,4 @@ jobs: echo "## Run Information" >> $GITHUB_STEP_SUMMARY echo "- **NWAKU**: ${{ env.WAKUNODE_IMAGE }}" >> $GITHUB_STEP_SUMMARY echo "## Test Results" >> $GITHUB_STEP_SUMMARY - echo "Allure report will be available at: https://waku-org.github.io/allure-jswaku/${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY \ No newline at end of file + echo "Allure report will be available at: https://waku-org.github.io/allure-jswaku/${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/test-reliability.yml b/.github/workflows/test-reliability.yml index a25f5a6be3..ba6c221e95 100644 --- a/.github/workflows/test-reliability.yml +++ b/.github/workflows/test-reliability.yml @@ -18,7 +18,7 @@ on: - all env: - NODE_JS: "22" + NODE_JS: "24" jobs: test: @@ -34,7 +34,7 @@ jobs: if: ${{ github.event.inputs.test_type == 'all' }} steps: - uses: actions/checkout@v3 - with: + with: repository: waku-org/js-waku - name: Remove unwanted software @@ -74,7 +74,7 @@ jobs: if: ${{ github.event.inputs.test_type != 'all' }} steps: - uses: actions/checkout@v3 - with: + with: repository: waku-org/js-waku - name: Remove unwanted software diff --git a/package.json b/package.json index bd29d5bc00..f406982678 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,6 @@ "*.{ts,js}": [ "eslint --fix" ] - } + }, + "version": "" } diff --git a/packages/core/package.json b/packages/core/package.json index ff2fb1899d..d0af073272 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -28,7 +28,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/core#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues" diff --git a/packages/discovery/package.json b/packages/discovery/package.json index 6082f191c2..d3fd24fe77 100644 --- a/packages/discovery/package.json +++ b/packages/discovery/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/discovery#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues" diff --git a/packages/enr/package.json b/packages/enr/package.json index 80144ddc32..e73b05f5e3 100644 --- a/packages/enr/package.json +++ b/packages/enr/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/enr#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues" diff --git a/packages/interfaces/package.json b/packages/interfaces/package.json index 9387df9f1b..4c8fabbb53 100644 --- a/packages/interfaces/package.json +++ b/packages/interfaces/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/interfaces#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues" diff --git a/packages/message-encryption/package.json b/packages/message-encryption/package.json index b9a4901875..f21d8ec29d 100644 --- a/packages/message-encryption/package.json +++ b/packages/message-encryption/package.json @@ -36,7 +36,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/message-encryption#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues" diff --git a/packages/proto/package.json b/packages/proto/package.json index eb46635413..5eeb717b83 100644 --- a/packages/proto/package.json +++ b/packages/proto/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/proto#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues" diff --git a/packages/react/package.json b/packages/react/package.json index ca0da6f168..3491a6ce85 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -21,7 +21,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/react#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues" diff --git a/packages/relay/package.json b/packages/relay/package.json index a3f9bec26a..70f05a3077 100644 --- a/packages/relay/package.json +++ b/packages/relay/package.json @@ -14,7 +14,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/relay#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues" diff --git a/packages/reliability-tests/package.json b/packages/reliability-tests/package.json index 97dfac7ba1..42de782ff8 100644 --- a/packages/reliability-tests/package.json +++ b/packages/reliability-tests/package.json @@ -16,7 +16,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/reliability-tests#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues" diff --git a/packages/rln/package.json b/packages/rln/package.json index 4ea0199115..e8affc320d 100644 --- a/packages/rln/package.json +++ b/packages/rln/package.json @@ -14,7 +14,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/rln#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues" diff --git a/packages/sdk/package.json b/packages/sdk/package.json index a72b4025d7..dd313a6d8d 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/sdk#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues" diff --git a/packages/sds/package.json b/packages/sds/package.json index 0e59d4fa41..08cac5c0a8 100644 --- a/packages/sds/package.json +++ b/packages/sds/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/scalable-data-sync#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues" diff --git a/packages/tests/package.json b/packages/tests/package.json index b059f4a909..9bfdb28f52 100644 --- a/packages/tests/package.json +++ b/packages/tests/package.json @@ -16,7 +16,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/tests#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues" diff --git a/packages/utils/package.json b/packages/utils/package.json index be791ef342..5450aeb6d0 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -28,7 +28,7 @@ "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/utils#readme", "repository": { "type": "git", - "url": "https://github.com/waku-org/js-waku.git" + "url": "git+https://github.com/waku-org/js-waku.git" }, "bugs": { "url": "https://github.com/waku-org/js-waku/issues"