From 7a3f979fe634a086df702a54415c58c0b748bb4b Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Fri, 27 Sep 2024 11:22:22 -0700 Subject: [PATCH] chore: Bump minimum Node version --- .github/workflows/build-lint-test.yml | 4 ++-- README.md | 2 +- constraints.pro | 2 +- package.json | 4 ++-- yarn.lock | 20 ++++++++++++++++++-- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml index 61d2307..ec2c77c 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/build-lint-test.yml @@ -74,7 +74,7 @@ jobs: - prepare strategy: matrix: - node-version: [16.x, 18.x, 20.x] + node-version: [18.x, 20.x, 22.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} @@ -99,7 +99,7 @@ jobs: - prepare strategy: matrix: - node-version: [16.x, 18.x, 20.x] + node-version: [18.x, 20.x, 22.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} diff --git a/README.md b/README.md index e51c74f..98e530d 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ const message5 = getMessageFromCode(code2); ### Setup -- Install [Node.js](https://nodejs.org) version 16 +- Install [Node.js](https://nodejs.org) version 18 - If you are using [nvm](https://github.com/creationix/nvm#installation) (recommended) 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 diff --git a/constraints.pro b/constraints.pro index 5bb3b5f..337a26f 100644 --- a/constraints.pro +++ b/constraints.pro @@ -94,7 +94,7 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, null, DependencyType) :- DependencyType == 'devDependencies'. % The package must specify the expected node version constraint. -gen_enforced_field(WorkspaceCwd, 'engines.node', '>=16.0.0'). +gen_enforced_field(WorkspaceCwd, 'engines.node', '^18.18 || ^20.17 || >=22'). % The package is public. gen_enforced_field(WorkspaceCwd, 'publishConfig.access', 'public'). diff --git a/package.json b/package.json index 9fae717..e1966a0 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@metamask/eslint-config-typescript": "^12.1.0", "@ts-bridge/cli": "^0.5.1", "@types/jest": "^28.1.6", - "@types/node": "^16", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^5.43.0", "@typescript-eslint/parser": "^5.43.0", "depcheck": "^1.4.7", @@ -88,7 +88,7 @@ }, "packageManager": "yarn@3.2.4", "engines": { - "node": ">=16.0.0" + "node": "^18.20 || ^20.17 || >=22" }, "publishConfig": { "access": "public", diff --git a/yarn.lock b/yarn.lock index 4a21f0b..3e19380 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1018,7 +1018,7 @@ __metadata: "@metamask/utils": ^9.0.0 "@ts-bridge/cli": ^0.5.1 "@types/jest": ^28.1.6 - "@types/node": ^16 + "@types/node": ^18 "@typescript-eslint/eslint-plugin": ^5.43.0 "@typescript-eslint/parser": ^5.43.0 depcheck: ^1.4.7 @@ -1473,13 +1473,22 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:^16": +"@types/node@npm:*": version: 16.18.82 resolution: "@types/node@npm:16.18.82" checksum: ace573877c3fe2fad4004a85b1ec72812eef43718a89cea92370777505954dfa59f44cf65db90217f977f2207e4c5de399eb81ab0006e3f7ff57388f585b4fb1 languageName: node linkType: hard +"@types/node@npm:^18": + version: 18.19.54 + resolution: "@types/node@npm:18.19.54" + dependencies: + undici-types: ~5.26.4 + checksum: d85bacc7430c2913bcd2cf293f312bc1f9108819707ac25b58404185c3b8f9ca9e3e93c396672f457c18e65f5ba86cc8363803f830207c6b7dd14fd74e1455b0 + languageName: node + linkType: hard + "@types/parse-json@npm:^4.0.0": version: 4.0.0 resolution: "@types/parse-json@npm:4.0.0" @@ -6978,6 +6987,13 @@ __metadata: languageName: node linkType: hard +"undici-types@npm:~5.26.4": + version: 5.26.5 + resolution: "undici-types@npm:5.26.5" + checksum: 3192ef6f3fd5df652f2dc1cd782b49d6ff14dc98e5dced492aa8a8c65425227da5da6aafe22523c67f035a272c599bb89cfe803c1db6311e44bed3042fc25487 + languageName: node + linkType: hard + "unique-filename@npm:^2.0.0": version: 2.0.1 resolution: "unique-filename@npm:2.0.1"