From 6b031445bf50c784a712449b8b20538bb0aaa963 Mon Sep 17 00:00:00 2001 From: Tamas Date: Thu, 26 Feb 2026 10:53:28 +0100 Subject: [PATCH] fix: drop Node 18 support, require Node 20+ (WAPI-1133) Node 18 reached end-of-life in April 2025 and lacks globalThis.crypto, forcing unnecessary runtime fallbacks. All production runtimes (browsers, React Native, Node 20+ LTS) already provide this API, and eciesjs 0.4.16 has already dropped Node 18 support. --- .github/workflows/lint-build-test.yml | 10 +++++----- .nvmrc | 2 +- README.md | 2 +- package.json | 3 +++ packages/core/package.json | 3 +++ packages/dapp-client/package.json | 3 +++ packages/wallet-client/package.json | 3 +++ 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint-build-test.yml b/.github/workflows/lint-build-test.yml index 1d04e0a..845a1ed 100644 --- a/.github/workflows/lint-build-test.yml +++ b/.github/workflows/lint-build-test.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} @@ -25,7 +25,7 @@ jobs: needs: prepare strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} @@ -49,7 +49,7 @@ jobs: needs: prepare strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} @@ -73,7 +73,7 @@ jobs: needs: prepare strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} @@ -97,7 +97,7 @@ jobs: needs: prepare strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} diff --git a/.nvmrc b/.nvmrc index 0828ab7..9a2a0e2 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18 \ No newline at end of file +v20 diff --git a/README.md b/README.md index a29cba5..fd119b4 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Follow these steps to run the full end-to-end demo on your machine. ### Prerequisites -- **Node.js**: Use version 18.x or later. +- **Node.js**: Use version 20.x or later. - **Yarn**: This repository uses Yarn for package management. - **Docker & Docker Compose**: Required to run the backend relay server. - **Expo Go App**: To run the mobile wallet demo, you'll need the [Expo Go](https://expo.dev/go) app on your iOS or Android device. diff --git a/package.json b/package.json index 56567d5..c86555f 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,9 @@ "typescript": "^5.8.3", "vitest": "^3.2.4" }, + "engines": { + "node": ">=20" + }, "packageManager": "yarn@4.2.2", "lavamoat": { "allowScripts": { diff --git a/packages/core/package.json b/packages/core/package.json index 6cfe023..c446388 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -20,6 +20,9 @@ "changelog:update": "../../scripts/update-changelog.sh @metamask/mobile-wallet-protocol-core", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/mobile-wallet-protocol-core" }, + "engines": { + "node": ">=20" + }, "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" diff --git a/packages/dapp-client/package.json b/packages/dapp-client/package.json index 4e65448..221243c 100644 --- a/packages/dapp-client/package.json +++ b/packages/dapp-client/package.json @@ -33,6 +33,9 @@ "changelog:update": "../../scripts/update-changelog.sh @metamask/mobile-wallet-protocol-dapp-client", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/mobile-wallet-protocol-dapp-client" }, + "engines": { + "node": ">=20" + }, "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" diff --git a/packages/wallet-client/package.json b/packages/wallet-client/package.json index aac5ec7..65e252a 100644 --- a/packages/wallet-client/package.json +++ b/packages/wallet-client/package.json @@ -33,6 +33,9 @@ "changelog:update": "../../scripts/update-changelog.sh @metamask/mobile-wallet-protocol-wallet-client", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/mobile-wallet-protocol-wallet-client" }, + "engines": { + "node": ">=20" + }, "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/"