diff --git a/.github/workflows/lint-build-test.yml b/.github/workflows/lint-build-test.yml index 48dd7f9490..c0db97f902 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: [16.x, 18.x, 20.x] + node-version: [18.x, 20.x] outputs: child-workspace-package-names: ${{ steps.workspace-package-names.outputs.child-workspace-package-names }} steps: @@ -105,7 +105,7 @@ jobs: needs: prepare strategy: matrix: - node-version: [16.x, 18.x, 20.x] + node-version: [18.x, 20.x] package-name: ${{ fromJson(needs.prepare.outputs.child-workspace-package-names) }} steps: - uses: actions/checkout@v3 diff --git a/.nvmrc b/.nvmrc index 6f7f377bf5..b009dfb9d9 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v16 +lts/* diff --git a/constraints.pro b/constraints.pro index 985205b5a5..84cc63f1b5 100644 --- a/constraints.pro +++ b/constraints.pro @@ -408,8 +408,8 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, CorrectPeerDependencyRang atom_concat('^', CurrentDependencyVersion, CorrectPeerDependencyRange) ). -% All packages must specify a minimum Node version of 16. -gen_enforced_field(WorkspaceCwd, 'engines.node', '>=16.0.0'). +% All packages must specify a minimum Node version of 18. +gen_enforced_field(WorkspaceCwd, 'engines.node', '^18.18 || >=20'). % All published packages are public. gen_enforced_field(WorkspaceCwd, 'publishConfig.access', 'public') :- diff --git a/docs/contributing.md b/docs/contributing.md index 788ec1cf19..88e9c1db71 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -2,8 +2,8 @@ ## Getting started -- Install [Node.js](https://nodejs.org) version 16. - - If you're using [NVM](https://github.com/creationix/nvm#installation) (recommended), `nvm use` will ensure that the right version is installed. +- Install the current LTS version of [Node.js](https://nodejs.org) + - If you are using [nvm](https://github.com/creationix/nvm#installation) (recommended) running `nvm install` will install the latest version and running `nvm use` will automatically choose the right node version for you. - Install [Yarn v3](https://yarnpkg.com/getting-started/install). - Run `yarn install` to install dependencies and run any required post-install scripts. - Run `yarn simple-git-hooks` to add a [Git hook](https://github.com/toplenboren/simple-git-hooks#what-is-a-git-hook) to your local development environment which will ensure that all files pass linting before you push a branch. diff --git a/package.json b/package.json index 976d71428c..c927cc4eac 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ }, "packageManager": "yarn@3.3.0", "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "lavamoat": { "allowScripts": { diff --git a/packages/accounts-controller/package.json b/packages/accounts-controller/package.json index 96879a9a51..160e41c265 100644 --- a/packages/accounts-controller/package.json +++ b/packages/accounts-controller/package.json @@ -70,7 +70,7 @@ "@metamask/snaps-controllers": "^8.1.1" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/address-book-controller/package.json b/packages/address-book-controller/package.json index 4dffeda279..27d36e6c91 100644 --- a/packages/address-book-controller/package.json +++ b/packages/address-book-controller/package.json @@ -56,7 +56,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/announcement-controller/package.json b/packages/announcement-controller/package.json index 43d3563030..cb2a25628b 100644 --- a/packages/announcement-controller/package.json +++ b/packages/announcement-controller/package.json @@ -54,7 +54,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/approval-controller/package.json b/packages/approval-controller/package.json index d97a499ca6..af0ce84d80 100644 --- a/packages/approval-controller/package.json +++ b/packages/approval-controller/package.json @@ -58,7 +58,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/assets-controllers/package.json b/packages/assets-controllers/package.json index a63e8915f1..a404037dc8 100644 --- a/packages/assets-controllers/package.json +++ b/packages/assets-controllers/package.json @@ -95,7 +95,7 @@ "@metamask/preferences-controller": "^12.0.0" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/base-controller/package.json b/packages/base-controller/package.json index 22d1647183..329de2b111 100644 --- a/packages/base-controller/package.json +++ b/packages/base-controller/package.json @@ -56,7 +56,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/build-utils/package.json b/packages/build-utils/package.json index 4c5e55f27d..a6fa13238c 100644 --- a/packages/build-utils/package.json +++ b/packages/build-utils/package.json @@ -56,7 +56,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/chain-controller/package.json b/packages/chain-controller/package.json index 115469530e..1a2d7576ef 100644 --- a/packages/chain-controller/package.json +++ b/packages/chain-controller/package.json @@ -62,7 +62,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/composable-controller/package.json b/packages/composable-controller/package.json index 145a43577b..be60099ee7 100644 --- a/packages/composable-controller/package.json +++ b/packages/composable-controller/package.json @@ -57,7 +57,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/controller-utils/package.json b/packages/controller-utils/package.json index f6fa0635b2..2589679625 100644 --- a/packages/controller-utils/package.json +++ b/packages/controller-utils/package.json @@ -63,7 +63,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/ens-controller/package.json b/packages/ens-controller/package.json index b9e0664868..ac49707c54 100644 --- a/packages/ens-controller/package.json +++ b/packages/ens-controller/package.json @@ -62,7 +62,7 @@ "@metamask/network-controller": "^18.1.3" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/eth-json-rpc-provider/package.json b/packages/eth-json-rpc-provider/package.json index 7702dfdd3c..968f1e5165 100644 --- a/packages/eth-json-rpc-provider/package.json +++ b/packages/eth-json-rpc-provider/package.json @@ -62,7 +62,7 @@ }, "packageManager": "yarn@3.3.0", "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/gas-fee-controller/package.json b/packages/gas-fee-controller/package.json index b39aa4d49e..d64664f477 100644 --- a/packages/gas-fee-controller/package.json +++ b/packages/gas-fee-controller/package.json @@ -70,7 +70,7 @@ "@metamask/network-controller": "^18.1.3" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/json-rpc-engine/package.json b/packages/json-rpc-engine/package.json index 642a649604..b6226d202e 100644 --- a/packages/json-rpc-engine/package.json +++ b/packages/json-rpc-engine/package.json @@ -67,7 +67,7 @@ }, "packageManager": "yarn@3.3.0", "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/json-rpc-middleware-stream/package.json b/packages/json-rpc-middleware-stream/package.json index b48c8160d8..dc481cf343 100644 --- a/packages/json-rpc-middleware-stream/package.json +++ b/packages/json-rpc-middleware-stream/package.json @@ -61,7 +61,7 @@ "webextension-polyfill-ts": "^0.26.0" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/keyring-controller/package.json b/packages/keyring-controller/package.json index 1a5531cbcd..75724184db 100644 --- a/packages/keyring-controller/package.json +++ b/packages/keyring-controller/package.json @@ -74,7 +74,7 @@ "uuid": "^8.3.2" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/logging-controller/package.json b/packages/logging-controller/package.json index 0aaeff0caa..ed795967d1 100644 --- a/packages/logging-controller/package.json +++ b/packages/logging-controller/package.json @@ -56,7 +56,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/message-manager/package.json b/packages/message-manager/package.json index 1347064bcd..430ce5ee19 100644 --- a/packages/message-manager/package.json +++ b/packages/message-manager/package.json @@ -60,7 +60,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/name-controller/package.json b/packages/name-controller/package.json index f937c4f3cb..12a6a55c00 100644 --- a/packages/name-controller/package.json +++ b/packages/name-controller/package.json @@ -58,7 +58,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/network-controller/package.json b/packages/network-controller/package.json index 43278fdcd4..2e37564003 100644 --- a/packages/network-controller/package.json +++ b/packages/network-controller/package.json @@ -74,7 +74,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/notification-controller/package.json b/packages/notification-controller/package.json index 715ed746d3..12b8199490 100644 --- a/packages/notification-controller/package.json +++ b/packages/notification-controller/package.json @@ -56,7 +56,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/permission-controller/package.json b/packages/permission-controller/package.json index 0b17c1aa16..3e2b9c0753 100644 --- a/packages/permission-controller/package.json +++ b/packages/permission-controller/package.json @@ -66,7 +66,7 @@ "@metamask/approval-controller": "^6.0.0" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/permission-log-controller/package.json b/packages/permission-log-controller/package.json index e6d8ae5716..66b7337df5 100644 --- a/packages/permission-log-controller/package.json +++ b/packages/permission-log-controller/package.json @@ -59,7 +59,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/phishing-controller/package.json b/packages/phishing-controller/package.json index 77fa8082b2..c6d872c800 100644 --- a/packages/phishing-controller/package.json +++ b/packages/phishing-controller/package.json @@ -60,7 +60,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/polling-controller/package.json b/packages/polling-controller/package.json index 8093868177..a947165916 100644 --- a/packages/polling-controller/package.json +++ b/packages/polling-controller/package.json @@ -64,7 +64,7 @@ "@metamask/network-controller": "^18.1.3" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/preferences-controller/package.json b/packages/preferences-controller/package.json index 077bd6de2d..aad4633d26 100644 --- a/packages/preferences-controller/package.json +++ b/packages/preferences-controller/package.json @@ -60,7 +60,7 @@ "@metamask/keyring-controller": "^16.0.0" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/profile-sync-controller/package.json b/packages/profile-sync-controller/package.json index 20a0289d30..3a2ea77c52 100644 --- a/packages/profile-sync-controller/package.json +++ b/packages/profile-sync-controller/package.json @@ -59,7 +59,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/queued-request-controller/package.json b/packages/queued-request-controller/package.json index 45102d0881..c773a5d112 100644 --- a/packages/queued-request-controller/package.json +++ b/packages/queued-request-controller/package.json @@ -69,7 +69,7 @@ "@metamask/selected-network-controller": "^14.0.0" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/rate-limit-controller/package.json b/packages/rate-limit-controller/package.json index cb36fa37a5..f42909172f 100644 --- a/packages/rate-limit-controller/package.json +++ b/packages/rate-limit-controller/package.json @@ -56,7 +56,7 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/selected-network-controller/package.json b/packages/selected-network-controller/package.json index 6c966697a5..d1c29d797d 100644 --- a/packages/selected-network-controller/package.json +++ b/packages/selected-network-controller/package.json @@ -67,7 +67,7 @@ "@metamask/permission-controller": "^9.1.1" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/signature-controller/package.json b/packages/signature-controller/package.json index a932ba1980..239b883e14 100644 --- a/packages/signature-controller/package.json +++ b/packages/signature-controller/package.json @@ -67,7 +67,7 @@ "@metamask/logging-controller": "^4.0.0" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/transaction-controller/package.json b/packages/transaction-controller/package.json index 1b4d041aba..eaa25167cb 100644 --- a/packages/transaction-controller/package.json +++ b/packages/transaction-controller/package.json @@ -88,7 +88,7 @@ "@metamask/network-controller": "^18.1.3" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public", diff --git a/packages/user-operation-controller/package.json b/packages/user-operation-controller/package.json index 609de2a5e1..0bfdb0e201 100644 --- a/packages/user-operation-controller/package.json +++ b/packages/user-operation-controller/package.json @@ -77,7 +77,7 @@ "@metamask/transaction-controller": "^31.0.0" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18 || >=20" }, "publishConfig": { "access": "public",