From 3ea5347d428946b0fc28a63b85fbc7c94cf6917c Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Thu, 3 Oct 2024 01:21:10 +0000 Subject: [PATCH] drop support for Node.js versions 16, 21 --- .github/workflows/build-lint-test.yml | 25 ++++++++++++++----------- .nvmrc | 2 +- constraints.pro | 4 ++-- package.json | 4 ++-- yarn.lock | 10 +++++----- 5 files changed, 24 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml index 9a1ecd5fc..b0810b0e4 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/build-lint-test.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' @@ -24,11 +24,14 @@ 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 }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'yarn' @@ -50,15 +53,12 @@ jobs: runs-on: ubuntu-latest needs: - prepare - strategy: - matrix: - node-version: [16.x, 18.x, 20.x] steps: - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: Set up Node.js + uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.nvmrc' cache: 'yarn' - run: yarn --immutable --immutable-cache - run: yarn lint @@ -83,11 +83,14 @@ 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 }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'yarn' diff --git a/.nvmrc b/.nvmrc index 6f7f377bf..3f430af82 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v16 +v18 diff --git a/constraints.pro b/constraints.pro index df81e6218..0bec58439 100644 --- a/constraints.pro +++ b/constraints.pro @@ -91,8 +91,8 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, null, DependencyType) :- workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType), DependencyType == 'devDependencies'. -% The package must specify a minimum Node version of 16. -gen_enforced_field(WorkspaceCwd, 'engines.node', '>=16.0.0'). + % The package must specify the expected minimum Node version. +gen_enforced_field(WorkspaceCwd, 'engines.node', '^18.18 || ^20.14 || >=22'). % The package is public. gen_enforced_field(WorkspaceCwd, 'publishConfig.access', 'public'). diff --git a/package.json b/package.json index cdc4f42c3..c49083e2a 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@ts-bridge/shims": "^0.1.1", "@types/jest": "^28.1.7", "@types/jest-when": "^3.5.3", - "@types/node": "^20.12.7", + "@types/node": "~18.18.14", "@types/uuid": "^9.0.8", "@typescript-eslint/eslint-plugin": "^5.43.0", "@typescript-eslint/parser": "^5.43.0", @@ -110,7 +110,7 @@ }, "packageManager": "yarn@3.2.3", "engines": { - "node": ">=16.0.0" + "node": "^18.18 || ^20.14 || >=22" }, "publishConfig": { "access": "public", diff --git a/yarn.lock b/yarn.lock index c298a661a..591cd2d1d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1081,7 +1081,7 @@ __metadata: "@types/debug": ^4.1.7 "@types/jest": ^28.1.7 "@types/jest-when": ^3.5.3 - "@types/node": ^20.12.7 + "@types/node": ~18.18.14 "@types/uuid": ^9.0.8 "@typescript-eslint/eslint-plugin": ^5.43.0 "@typescript-eslint/parser": ^5.43.0 @@ -1572,12 +1572,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:^20.12.7": - version: 20.12.7 - resolution: "@types/node@npm:20.12.7" +"@types/node@npm:*, @types/node@npm:~18.18.14": + version: 18.18.14 + resolution: "@types/node@npm:18.18.14" dependencies: undici-types: ~5.26.4 - checksum: 7cc979f7e2ca9a339ec71318c3901b9978555257929ef3666987f3e447123bc6dc92afcc89f6347e09e07d602fde7d51bcddea626c23aa2bb74aeaacfd1e1686 + checksum: 3a77e6819e50fd22196b08d542433e1513c855f4993a200bc0e7be076445c61ce2a9e5f7f202f060c46130b2b2f98643461fb7999f874475e6bb322c4534c580 languageName: node linkType: hard