From f2114caca08d7c04c3c2b6430f6b89d842a17f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=A7=91=F0=9F=8F=BB=E2=80=8D=F0=9F=92=BB=20Romain=20M?= =?UTF-8?q?arcadier?= Date: Tue, 17 May 2022 11:56:42 +0200 Subject: [PATCH] chore: drop support for Node 12 Upgrade the minimal required node release to 14.x, since Node 12 has been end-of-life since `2022-04-01`. This allows us to upgrade our TypeScript `target` from `ES2019` to `ES2020` (native support for nullish-coalescing and optional chaining, among other things). Removed the `node12` entries from the various test matrices and stop publishing `node12` tags for `jsii/superchain`. BREAKING CHANGE: Beginning with this release, jsii packages no longer support node 12. Users should migrate to a supported node release (14.x, 16.x, or 18.x). --- .github/workflows/docker-images.yml | 2 +- .github/workflows/main.yml | 40 +++++++++---------- .github/workflows/yarn-upgrade.yml | 2 +- .mergify/config.yml | 8 ++-- .../@fixtures/jsii-calc-bundled/package.json | 2 +- packages/@jsii/check-node/package.json | 4 +- .../@jsii/dotnet-runtime-test/package.json | 4 +- packages/@jsii/dotnet-runtime/package.json | 4 +- packages/@jsii/go-runtime/package.json | 2 +- packages/@jsii/integ-test/package.json | 2 +- packages/@jsii/java-runtime-test/package.json | 2 +- packages/@jsii/java-runtime/package.json | 4 +- packages/@jsii/kernel/package.json | 4 +- packages/@jsii/python-runtime/package.json | 2 +- packages/@jsii/runtime/package.json | 4 +- packages/@jsii/runtime/webpack.config.js | 2 +- packages/@jsii/spec/package.json | 4 +- .../jsii-calc-base-of-base/package.json | 4 +- packages/@scope/jsii-calc-base/package.json | 4 +- packages/@scope/jsii-calc-lib/package.json | 4 +- packages/codemaker/package.json | 4 +- packages/jsii-calc/package.json | 4 +- packages/jsii-config/package.json | 2 +- packages/jsii-diff/package.json | 4 +- packages/jsii-pacmak/package.json | 4 +- packages/jsii-reflect/package.json | 4 +- .../lib/typescript/ts-compiler.ts | 4 +- packages/jsii-rosetta/package.json | 4 +- packages/jsii/lib/compiler.ts | 4 +- packages/jsii/package.json | 4 +- packages/jsii/test/compiler.test.ts | 4 +- packages/oo-ascii-tree/package.json | 4 +- superchain/Dockerfile | 2 +- superchain/README.md | 12 +++--- tools/jsii-build-tools/package.json | 2 +- tools/jsii-compliance/package.json | 2 +- tsconfig-base.json | 4 +- yarn.lock | 8 ++-- 38 files changed, 89 insertions(+), 91 deletions(-) diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml index 0786e26839..01f69c6174 100644 --- a/.github/workflows/docker-images.yml +++ b/.github/workflows/docker-images.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: ['12', '14', '16', '18'] + node: ['14', '16', '18'] env: # Node version whose images will be aliased without the -nodeXX segment DEFAULT_NODE_MAJOR_VERSION: 14 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6401688655..4637a20e49 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,11 +40,11 @@ jobs: with: java-version: '8' distribution: 'zulu' - - name: Set up Node 12 + - name: Set up Node 14 uses: actions/setup-node@v3 with: cache: yarn - node-version: '12' + node-version: '14' - name: Set up Python 3.7 uses: actions/setup-python@v3 with: @@ -69,10 +69,10 @@ jobs: !~/.m2/repository/software/amazon/jsii/ ~/.nuget/packages !~/.nuget/packages/amazon.jsii.* - key: ${{ runner.os }}-node@12-python@3.7-${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }} + key: ${{ runner.os }}-node@14-python@3.7-${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }} restore-keys: |- - ${{ runner.os }}-node@12-python@3.7- - ${{ runner.os }}-node@12- + ${{ runner.os }}-node@14-python@3.7- + ${{ runner.os }}-node@14- ${{ runner.os }}- # Prepare dependencies and build - name: Install Dependencies @@ -134,11 +134,11 @@ jobs: with: java-version: '8' distribution: 'zulu' - - name: Set up Node 12 + - name: Set up Node 14 uses: actions/setup-node@v3 with: cache: yarn - node-version: '12' + node-version: '14' - name: Set up Python 3.7 uses: actions/setup-python@v3 with: @@ -163,10 +163,10 @@ jobs: !~/.m2/repository/software/amazon/jsii/ ~/.nuget/packages !~/.nuget/packages/amazon.jsii.* - key: ${{ runner.os }}-node@12-python@3.7-${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }} + key: ${{ runner.os }}-node@14-python@3.7-${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }} restore-keys: |- - ${{ runner.os }}-node@12-python@3.7- - ${{ runner.os }}-node@12- + ${{ runner.os }}-node@14-python@3.7- + ${{ runner.os }}-node@14- ${{ runner.os }}- # Prepare dependencies and build - name: Install Dependencies @@ -216,47 +216,47 @@ jobs: go: ['1.16'] java: ['8'] node: - - '12' # EOL 2022-04-30 - '14' # EOL 2023-04-30 - '16' # EOL 2024-04-30 - '17' # EOL 2022-06-01 - '18' # EOL 2025-04-30 + - '19' # EOL 2023-06-01 os: [ubuntu-latest] python: ['3.7'] - # Add specific combinations to be tested against "node 12" (to restrict cardinality) + # Add specific combinations to be tested against "node 14" (to restrict cardinality) include: # Test using Windows - os: windows-latest dotnet: '3.1.x' go: '1.16' java: '8' - node: '12' + node: '14' python: '3.7' # Test using macOS - os: macos-latest dotnet: '3.1.x' go: '1.16' java: '8' - node: '12' + node: '14' python: '3.7' # Test alternate .NETs - java: '8' dotnet: '5.0.x' go: '1.16' - node: '12' + node: '14' os: ubuntu-latest python: '3.7' - java: '8' dotnet: '6.0.x' go: '1.16' - node: '12' + node: '14' os: ubuntu-latest python: '3.7' # Test alternate Javas - java: '11' dotnet: '3.1.x' go: '1.16' - node: '12' + node: '14' os: ubuntu-latest python: '3.7' # Test alternate Pythons @@ -264,19 +264,19 @@ jobs: dotnet: '3.1.x' go: '1.16' java: '8' - node: '12' + node: '14' os: ubuntu-latest - python: '3.9' dotnet: '3.1.x' go: '1.16' java: '8' - node: '12' + node: '14' os: ubuntu-latest - python: '3.10' dotnet: '3.1.x' go: '1.16' java: '8' - node: '12' + node: '14' os: ubuntu-latest runs-on: ${{ matrix.os }} diff --git a/.github/workflows/yarn-upgrade.yml b/.github/workflows/yarn-upgrade.yml index 4bf279c26f..5562e7b4c6 100644 --- a/.github/workflows/yarn-upgrade.yml +++ b/.github/workflows/yarn-upgrade.yml @@ -21,7 +21,7 @@ jobs: uses: actions/setup-node@v3 with: cache: yarn - node-version: 12 + node-version: 14 - name: Install Tools run: |- diff --git a/.mergify/config.yml b/.mergify/config.yml index 6fe83ab87e..9fe818027f 100644 --- a/.mergify/config.yml +++ b/.mergify/config.yml @@ -8,11 +8,11 @@ queue_rules: - status-success~=^Test \(macos-.*$ - status-success~=^Test \(windows-.*$ # One test for each supported nodejs version - - status-success~=^Test \(.* node 12 .*$ - status-success~=^Test \(.* node 14 .*$ - status-success~=^Test \(.* node 16 .*$ - status-success~=^Test \(.* node 17 .*$ - status-success~=^Test \(.* node 18 .*$ + - status-success~=^Test \(.* node 19 .*$ # One test for each supported dotnet version - status-success~=^Test \(.* dotnet 3\.1\.x .*$ - status-success~=^Test \(.* dotnet 5\.0\.x .*$ @@ -59,11 +59,11 @@ pull_request_rules: - status-success~=^Test \(macos-.*$ - status-success~=^Test \(windows-.*$ # One test for each supported nodejs version - - status-success~=^Test \(.* node 12 .*$ - status-success~=^Test \(.* node 14 .*$ - status-success~=^Test \(.* node 16 .*$ - status-success~=^Test \(.* node 17 .*$ - status-success~=^Test \(.* node 18 .*$ + - status-success~=^Test \(.* node 19 .*$ # One test for each supported dotnet version - status-success~=^Test \(.* dotnet 3\.1\.x .*$ - status-success~=^Test \(.* dotnet 5\.0\.x .*$ @@ -110,11 +110,11 @@ pull_request_rules: - status-success~=^Test \(macos-.*$ - status-success~=^Test \(windows-.*$ # One test for each supported nodejs version - - status-success~=^Test \(.* node 12 .*$ - status-success~=^Test \(.* node 14 .*$ - status-success~=^Test \(.* node 16 .*$ - status-success~=^Test \(.* node 17 .*$ - status-success~=^Test \(.* node 18 .*$ + - status-success~=^Test \(.* node 19 .*$ # One test for each supported dotnet version - status-success~=^Test \(.* dotnet 3\.1\.x .*$ - status-success~=^Test \(.* dotnet 5\.0\.x .*$ @@ -161,11 +161,11 @@ pull_request_rules: - status-success~=^Test \(macos-.*$ - status-success~=^Test \(windows-.*$ # One test for each supported nodejs version - - status-success~=^Test \(.* node 12 .*$ - status-success~=^Test \(.* node 14 .*$ - status-success~=^Test \(.* node 16 .*$ - status-success~=^Test \(.* node 17 .*$ - status-success~=^Test \(.* node 18 .*$ + - status-success~=^Test \(.* node 19 .*$ # One test for each supported dotnet version - status-success~=^Test \(.* dotnet 3\.1\.x .*$ - status-success~=^Test \(.* dotnet 5\.0\.x .*$ diff --git a/packages/@fixtures/jsii-calc-bundled/package.json b/packages/@fixtures/jsii-calc-bundled/package.json index 9fe5d89b5d..19d42c088c 100644 --- a/packages/@fixtures/jsii-calc-bundled/package.json +++ b/packages/@fixtures/jsii-calc-bundled/package.json @@ -17,7 +17,7 @@ "directory": "packages/@fixtures/jsii-calc-bundled" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "index.js" } diff --git a/packages/@jsii/check-node/package.json b/packages/@jsii/check-node/package.json index fbc36ef9c4..9218c0a254 100644 --- a/packages/@jsii/check-node/package.json +++ b/packages/@jsii/check-node/package.json @@ -17,7 +17,7 @@ "directory": "packages/@jsii/check-node" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -42,7 +42,7 @@ "devDependencies": { "@types/chalk": "^2.2.0", "@types/jest": "^27.5.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "jest": "^27.5.1" } } diff --git a/packages/@jsii/dotnet-runtime-test/package.json b/packages/@jsii/dotnet-runtime-test/package.json index 67d2ed52bc..e6c770973a 100644 --- a/packages/@jsii/dotnet-runtime-test/package.json +++ b/packages/@jsii/dotnet-runtime-test/package.json @@ -19,7 +19,7 @@ "directory": "packages/@jsii/dotnet-runtime-test" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -31,7 +31,7 @@ }, "devDependencies": { "@jsii/dotnet-runtime": "^0.0.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "jsii-calc": "^3.20.120", "jsii-pacmak": "^0.0.0", "typescript": "~3.9.10" diff --git a/packages/@jsii/dotnet-runtime/package.json b/packages/@jsii/dotnet-runtime/package.json index 554fb334f4..2667edbea1 100644 --- a/packages/@jsii/dotnet-runtime/package.json +++ b/packages/@jsii/dotnet-runtime/package.json @@ -25,7 +25,7 @@ "directory": "packages/@jsii/dotnet-runtime" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -39,7 +39,7 @@ }, "devDependencies": { "@jsii/runtime": "^0.0.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "@types/semver": "^7.3.9", "jsii-build-tools": "^0.0.0", "semver": "^7.3.7", diff --git a/packages/@jsii/go-runtime/package.json b/packages/@jsii/go-runtime/package.json index f4cccc9d93..6e8a2ad29e 100644 --- a/packages/@jsii/go-runtime/package.json +++ b/packages/@jsii/go-runtime/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@types/fs-extra": "^9.0.13", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "codemaker": "^0.0.0", "eslint": "^8.15.0", "fs-extra": "^9.1.0", diff --git a/packages/@jsii/integ-test/package.json b/packages/@jsii/integ-test/package.json index f058129a3b..58630bb6f7 100644 --- a/packages/@jsii/integ-test/package.json +++ b/packages/@jsii/integ-test/package.json @@ -30,7 +30,7 @@ "@types/dotenv": "^8.2.0", "@types/fs-extra": "^9.0.13", "@types/jest": "^27.5.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "@types/tar": "^6.1.1", "eslint": "^8.15.0", "prettier": "^2.6.2", diff --git a/packages/@jsii/java-runtime-test/package.json b/packages/@jsii/java-runtime-test/package.json index 291a91cf33..bc7fc0f2fa 100644 --- a/packages/@jsii/java-runtime-test/package.json +++ b/packages/@jsii/java-runtime-test/package.json @@ -18,7 +18,7 @@ "directory": "packages/@jsii/java-runtime-test" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/@jsii/java-runtime/package.json b/packages/@jsii/java-runtime/package.json index 6ea473c79a..df70c254dd 100644 --- a/packages/@jsii/java-runtime/package.json +++ b/packages/@jsii/java-runtime/package.json @@ -19,7 +19,7 @@ "directory": "packages/@jsii/java-runtime" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -33,7 +33,7 @@ }, "devDependencies": { "@jsii/runtime": "^0.0.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "jsii-build-tools": "^0.0.0", "typescript": "~3.9.10" } diff --git a/packages/@jsii/kernel/package.json b/packages/@jsii/kernel/package.json index f2bbcf8f3d..78cc0a17e9 100644 --- a/packages/@jsii/kernel/package.json +++ b/packages/@jsii/kernel/package.json @@ -17,7 +17,7 @@ "directory": "packages/@jsii/kernel" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -40,7 +40,7 @@ "@scope/jsii-calc-lib": "^0.0.0", "@types/fs-extra": "^9.0.13", "@types/jest": "^27.5.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "@types/tar": "^6.1.1", "eslint": "^8.15.0", "jest": "^27.5.1", diff --git a/packages/@jsii/python-runtime/package.json b/packages/@jsii/python-runtime/package.json index b25899ea0e..08669930f1 100644 --- a/packages/@jsii/python-runtime/package.json +++ b/packages/@jsii/python-runtime/package.json @@ -18,7 +18,7 @@ "directory": "packages/@jsii/python-runtime" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "index.js", "scripts": { diff --git a/packages/@jsii/runtime/package.json b/packages/@jsii/runtime/package.json index 4bb65bded4..36057d0f8f 100644 --- a/packages/@jsii/runtime/package.json +++ b/packages/@jsii/runtime/package.json @@ -17,7 +17,7 @@ "directory": "packages/@jsii/runtime" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -42,7 +42,7 @@ "@scope/jsii-calc-base": "^0.0.0", "@scope/jsii-calc-lib": "^0.0.0", "@types/jest": "^27.5.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "eslint": "^8.15.0", "jest": "^27.5.1", "jsii-build-tools": "^0.0.0", diff --git a/packages/@jsii/runtime/webpack.config.js b/packages/@jsii/runtime/webpack.config.js index af36634f89..12366cf655 100644 --- a/packages/@jsii/runtime/webpack.config.js +++ b/packages/@jsii/runtime/webpack.config.js @@ -18,7 +18,7 @@ module.exports = { iife: false, }, devtool: 'source-map', - target: 'node12.4', + target: 'node14.5', node: { global: false, __filename: false, diff --git a/packages/@jsii/spec/package.json b/packages/@jsii/spec/package.json index fbc3607380..735fa5e066 100644 --- a/packages/@jsii/spec/package.json +++ b/packages/@jsii/spec/package.json @@ -17,7 +17,7 @@ "directory": "packages/@jsii/spec" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/jest": "^27.5.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "eslint": "^8.15.0", "jest": "^27.5.1", "jsii-build-tools": "^0.0.0", diff --git a/packages/@scope/jsii-calc-base-of-base/package.json b/packages/@scope/jsii-calc-base-of-base/package.json index eb10a383a8..503f66ef2a 100644 --- a/packages/@scope/jsii-calc-base-of-base/package.json +++ b/packages/@scope/jsii-calc-base-of-base/package.json @@ -19,7 +19,7 @@ "directory": "packages/@scope/jsii-calc-base-of-base" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "build/lib/index.js", "types": "build/lib/index.d.ts", @@ -30,7 +30,7 @@ "test:update": "npm run build && UPDATE_DIFF=1 npm run test" }, "devDependencies": { - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", diff --git a/packages/@scope/jsii-calc-base/package.json b/packages/@scope/jsii-calc-base/package.json index 02f479d1cf..7e844612b8 100644 --- a/packages/@scope/jsii-calc-base/package.json +++ b/packages/@scope/jsii-calc-base/package.json @@ -19,7 +19,7 @@ "directory": "packages/@scope/jsii-calc-base" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -35,7 +35,7 @@ "@scope/jsii-calc-base-of-base": "^2.1.1" }, "devDependencies": { - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", diff --git a/packages/@scope/jsii-calc-lib/package.json b/packages/@scope/jsii-calc-lib/package.json index aff4309f14..8dbcf0529f 100644 --- a/packages/@scope/jsii-calc-lib/package.json +++ b/packages/@scope/jsii-calc-lib/package.json @@ -21,7 +21,7 @@ "directory": "packages/@scope/jsii-calc-lib" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "build/index.js", "types": "build/index.d.ts", @@ -39,7 +39,7 @@ "@scope/jsii-calc-base-of-base": "^2.1.1" }, "devDependencies": { - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", diff --git a/packages/codemaker/package.json b/packages/codemaker/package.json index 96992ef4d9..2d5fedd52e 100644 --- a/packages/codemaker/package.json +++ b/packages/codemaker/package.json @@ -17,7 +17,7 @@ "directory": "packages/codemaker" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -38,7 +38,7 @@ "devDependencies": { "@types/fs-extra": "^9.0.13", "@types/jest": "^27.5.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "eslint": "^8.15.0", "jest": "^27.5.1", "prettier": "^2.6.2", diff --git a/packages/jsii-calc/package.json b/packages/jsii-calc/package.json index ba4ed54f70..0fc287d7fb 100644 --- a/packages/jsii-calc/package.json +++ b/packages/jsii-calc/package.json @@ -28,7 +28,7 @@ "test" ], "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -51,7 +51,7 @@ "@scope/jsii-calc-lib": "^0.0.0" }, "devDependencies": { - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "eslint": "^8.15.0", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", diff --git a/packages/jsii-config/package.json b/packages/jsii-config/package.json index c84afa6d89..fb99852a88 100644 --- a/packages/jsii-config/package.json +++ b/packages/jsii-config/package.json @@ -21,7 +21,7 @@ "devDependencies": { "@types/inquirer": "^8.2.1", "@types/jest": "^27.5.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "@types/yargs": "^17.0.10", "eslint": "^8.15.0", "jest": "^27.5.1", diff --git a/packages/jsii-diff/package.json b/packages/jsii-diff/package.json index 25d510c391..c7faa520cc 100644 --- a/packages/jsii-diff/package.json +++ b/packages/jsii-diff/package.json @@ -17,7 +17,7 @@ "directory": "packages/jsii-diff" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "bin": { @@ -44,7 +44,7 @@ "devDependencies": { "@types/fs-extra": "^9.0.13", "@types/jest": "^27.5.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "@types/tar-fs": "^2.0.1", "eslint": "^8.15.0", "jest": "^27.5.1", diff --git a/packages/jsii-pacmak/package.json b/packages/jsii-pacmak/package.json index d57f44a47e..ed073f46a8 100644 --- a/packages/jsii-pacmak/package.json +++ b/packages/jsii-pacmak/package.json @@ -17,7 +17,7 @@ "directory": "packages/jsii-pacmak" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -60,7 +60,7 @@ "@types/commonmark": "^0.27.5", "@types/fs-extra": "^9.0.13", "@types/jest": "^27.5.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "@types/semver": "^7.3.9", "eslint": "^8.15.0", "jest": "^27.5.1", diff --git a/packages/jsii-reflect/package.json b/packages/jsii-reflect/package.json index e8b33df58f..c1af37468b 100644 --- a/packages/jsii-reflect/package.json +++ b/packages/jsii-reflect/package.json @@ -17,7 +17,7 @@ "directory": "packages/jsii-reflect" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -45,7 +45,7 @@ "@scope/jsii-calc-lib": "^0.0.0", "@types/fs-extra": "^9.0.13", "@types/jest": "^27.5.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "eslint": "^8.15.0", "jest": "^27.5.1", "jsii": "^0.0.0", diff --git a/packages/jsii-rosetta/lib/typescript/ts-compiler.ts b/packages/jsii-rosetta/lib/typescript/ts-compiler.ts index 4a68c6485d..f053acebbe 100644 --- a/packages/jsii-rosetta/lib/typescript/ts-compiler.ts +++ b/packages/jsii-rosetta/lib/typescript/ts-compiler.ts @@ -74,7 +74,7 @@ export const STANDARD_COMPILER_OPTIONS: ts.CompilerOptions = { experimentalDecorators: true, inlineSourceMap: true, inlineSources: true, - lib: ['lib.es2016.d.ts', 'lib.es2017.object.d.ts', 'lib.es2017.string.d.ts'], + lib: ['lib.es2020.d.ts'], module: ts.ModuleKind.CommonJS, noEmitOnError: true, noFallthroughCasesInSwitch: true, @@ -88,7 +88,7 @@ export const STANDARD_COMPILER_OPTIONS: ts.CompilerOptions = { strictNullChecks: true, strictPropertyInitialization: true, stripInternal: true, - target: ts.ScriptTarget.ES2019, + target: ts.ScriptTarget.ES2020, // Incremental builds incremental: true, tsBuildInfoFile: '.tsbuildinfo', diff --git a/packages/jsii-rosetta/package.json b/packages/jsii-rosetta/package.json index 892c3fe31b..17f8c5ea40 100644 --- a/packages/jsii-rosetta/package.json +++ b/packages/jsii-rosetta/package.json @@ -20,7 +20,7 @@ "@types/fs-extra": "^9.0.13", "@types/jest": "^27.5.0", "@types/mock-fs": "^4.13.1", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "@types/workerpool": "^6.1.0", "@types/semver": "^7.3.9", "eslint": "^8.15.0", @@ -58,6 +58,6 @@ "directory": "packages/jsii-rosetta" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" } } diff --git a/packages/jsii/lib/compiler.ts b/packages/jsii/lib/compiler.ts index 85a091941e..4bb64e7a5e 100644 --- a/packages/jsii/lib/compiler.ts +++ b/packages/jsii/lib/compiler.ts @@ -21,7 +21,7 @@ const BASE_COMPILER_OPTIONS: ts.CompilerOptions = { incremental: true, inlineSourceMap: true, inlineSources: true, - lib: ['lib.es2019.d.ts'], + lib: ['lib.es2020.d.ts'], module: ts.ModuleKind.CommonJS, newLine: ts.NewLineKind.LineFeed, noEmitOnError: true, @@ -36,7 +36,7 @@ const BASE_COMPILER_OPTIONS: ts.CompilerOptions = { strictNullChecks: true, strictPropertyInitialization: true, stripInternal: false, - target: ts.ScriptTarget.ES2019, + target: ts.ScriptTarget.ES2020, }; const LOG = log4js.getLogger('jsii/compiler'); diff --git a/packages/jsii/package.json b/packages/jsii/package.json index 44110a3243..1a052a580f 100644 --- a/packages/jsii/package.json +++ b/packages/jsii/package.json @@ -17,7 +17,7 @@ "directory": "packages/jsii" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -54,7 +54,7 @@ "@types/deep-equal": "^1.0.1", "@types/fs-extra": "^9.0.13", "@types/jest": "^27.5.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "@types/semver": "^7.3.9", "clone": "^2.1.2", "eslint": "^8.15.0", diff --git a/packages/jsii/test/compiler.test.ts b/packages/jsii/test/compiler.test.ts index ea01aee57f..e05dc49cfe 100644 --- a/packages/jsii/test/compiler.test.ts +++ b/packages/jsii/test/compiler.test.ts @@ -208,7 +208,7 @@ function expectedTypeScriptConfig() { incremental: true, inlineSourceMap: true, inlineSources: true, - lib: ['es2019'], + lib: ['es2020'], module: 'CommonJS', newLine: 'lf', noEmitOnError: true, @@ -223,7 +223,7 @@ function expectedTypeScriptConfig() { strictNullChecks: true, strictPropertyInitialization: true, stripInternal: false, - target: 'ES2019', + target: 'ES2020', tsBuildInfoFile: 'tsconfig.tsbuildinfo', }, exclude: ['node_modules'], diff --git a/packages/oo-ascii-tree/package.json b/packages/oo-ascii-tree/package.json index fe5d8208c4..cb8094c2f8 100644 --- a/packages/oo-ascii-tree/package.json +++ b/packages/oo-ascii-tree/package.json @@ -17,7 +17,7 @@ "directory": "packages/oo-ascii-tree" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -32,7 +32,7 @@ }, "devDependencies": { "@types/jest": "^27.5.0", - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "eslint": "^8.15.0", "jest": "^27.5.1", "jsii-build-tools": "^0.0.0", diff --git a/superchain/Dockerfile b/superchain/Dockerfile index 5afa337cff..54b10ed57b 100644 --- a/superchain/Dockerfile +++ b/superchain/Dockerfile @@ -199,7 +199,7 @@ COPY superchain/m2-settings.xml /root/.m2/settings.xml # Install Go COPY --from=bindist /opt/golang/go ${GOROOT} -# Install Node 12+ (configurable with '--build-arg NODE_MAJOR_VERSION=xxx') and yarn +# Install Node 14+ (configurable with '--build-arg NODE_MAJOR_VERSION=xxx') and yarn # (Put this as late as possible in the Dockerfile so we get to reuse the layer cache # for most of the multiple builds). ARG NODE_MAJOR_VERSION="14" diff --git a/superchain/README.md b/superchain/README.md index bfe2d9f3c7..881744bcbd 100644 --- a/superchain/README.md +++ b/superchain/README.md @@ -13,7 +13,7 @@ SDK | Version `OpenJDK 8` | Amazon Corretto `>= 8.242.08.1` `.NET SDK` | `>= 3.1.101` `mono` | `>= 6.8.0.105` -`Javascript` | `node >= 12.7.0` OR `node >= 14.16.0` OR `node >= 16.0.0` with `npm >= 6.14.11` (see [NodeJS and NPM](#nodejs-and-npm)) +`Javascript` | see [NodeJS and NPM](#nodejs-and-npm) `PowerShell` | `pwsh >= 7.1.3` `Python 3` | `python3 >= 3.7.4` with `pip3 >= 20.0.2` `Go` | `go >= 1.17` @@ -31,7 +31,6 @@ jsii/superchain:-(-node)(-nightly) - `` is the base image tag (e.g: `buster-slim`) - The only supported value is `buster-slim` - `` is the major version of node contained in the image - - `12` corresponds to node 12.x - `14` corresponds to node 14.x, this is the default - `16` corresponds to node 16.x - `18` corresponds to node 18.x @@ -42,10 +41,10 @@ The previous image tags have been discontinued: - `:latest` (users should migrate to `:1-buster-slim`) - `:nightly` (users should migrate to `:1-buster-slim-nightly`) -- `:node10` (users should migrate to `:1-buster-slim-node12`) -- `:node10-nightly` (users should migrate to `:1-buster-slim-node12-nightly`) -- `:node12` (users shoudl migrate to `:1-buster-slim-node12`) -- `:node12-nightly` (users shoudl migrate to `:1-buster-slim-node12-nightly`) +- `:node10` (users should migrate to `:1-buster-slim-node14`) +- `:node10-nightly` (users should migrate to `:1-buster-slim-node14-nightly`) +- `:node12` (users shoudl migrate to `:1-buster-slim-node14`) +- `:node12-nightly` (users shoudl migrate to `:1-buster-slim-node14-nightly`) - `:node14` (users shoudl migrate to `:1-buster-slim-node14`) - `:node14-nightly` (users shoudl migrate to `:1-buster-slim-node14-nightly`) @@ -53,7 +52,6 @@ The previous image tags have been discontinued: We build multiple versions of this image, for different versions of Node. They are available as: -* `jsii/superchain:1-buster-slim-node12(-nightly)` * `jsii/superchain:1-buster-slim-node14(-nightly)` * `jsii/superchain:1-buster-slim-node16(-nightly)` * `jsii/superchain:1-buster-slim-node18(-nightly)` diff --git a/tools/jsii-build-tools/package.json b/tools/jsii-build-tools/package.json index 1816d5ef0f..0e23fd7b44 100644 --- a/tools/jsii-build-tools/package.json +++ b/tools/jsii-build-tools/package.json @@ -18,7 +18,7 @@ "directory": "tools/jsii-build-tools" }, "engines": { - "node": ">= 12.7.0" + "node": ">= 14.5.0" }, "bin": { "diff-test": "bin/diff-test", diff --git a/tools/jsii-compliance/package.json b/tools/jsii-compliance/package.json index f8a86f8653..a62ef0a5f8 100644 --- a/tools/jsii-compliance/package.json +++ b/tools/jsii-compliance/package.json @@ -16,7 +16,7 @@ "tablemark": "^2.0.0" }, "devDependencies": { - "@types/node": "^12.20.51", + "@types/node": "^14.18.18", "eslint": "^8.15.0", "prettier": "^2.6.2", "ts-node": "^10.7.0", diff --git a/tsconfig-base.json b/tsconfig-base.json index 06a519c49c..3b93a9520f 100644 --- a/tsconfig-base.json +++ b/tsconfig-base.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "target": "ES2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ + "target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": ["es2019"], /* Specify library files to be included in the compilation: */ + "lib": ["es2020"], /* Specify library files to be included in the compilation: */ "strict": true, /* Enable all strict type-checking options. */ "strictPropertyInitialization": true, /* Require all properties be initialized in the constructor. */ "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ diff --git a/yarn.lock b/yarn.lock index e4b5ac91b9..67fd8b1c1f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1649,10 +1649,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.32.tgz#51d59d7a90ef2d0ae961791e0900cad2393a0149" integrity sha512-eAIcfAvhf/BkHcf4pkLJ7ECpBAhh9kcxRBpip9cTiO+hf+aJrsxYxBeS6OXvOd9WqNAJmavXVpZvY1rBjNsXmw== -"@types/node@^12.20.51": - version "12.20.51" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.51.tgz#8bc65be17b95ab6dc89b70839598aeff43ded9c5" - integrity sha512-anVDMfReTatfH8GVmHmaTZOL0jeTLNZ9wK9SSrQS3tMmn4vUc+9fVWlUzAieuQefWDyWUz4Z3aqXxDgO1VsYjg== +"@types/node@^14.18.18": + version "14.18.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.18.tgz#5c9503030df484ccffcbb935ea9a9e1d6fad1a20" + integrity sha512-B9EoJFjhqcQ9OmQrNorItO+OwEOORNn3S31WuiHvZY/dm9ajkB7AKD/8toessEtHHNL+58jofbq7hMMY9v4yig== "@types/node@^16.9.2": version "16.11.34"