Skip to content

Commit

Permalink
chore: drop support for Node 12
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
RomainMuller committed May 17, 2022
1 parent 72621a6 commit f2114ca
Show file tree
Hide file tree
Showing 38 changed files with 89 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -216,67 +216,67 @@ 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
- python: '3.8'
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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yarn-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache: yarn
node-version: 12
node-version: 14

- name: Install Tools
run: |-
Expand Down
8 changes: 4 additions & 4 deletions .mergify/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .*$
Expand Down Expand Up @@ -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 .*$
Expand Down Expand Up @@ -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 .*$
Expand Down Expand Up @@ -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 .*$
Expand Down
2 changes: 1 addition & 1 deletion packages/@fixtures/jsii-calc-bundled/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"directory": "packages/@fixtures/jsii-calc-bundled"
},
"engines": {
"node": ">= 12.7.0"
"node": ">= 14.5.0"
},
"main": "index.js"
}
4 changes: 2 additions & 2 deletions packages/@jsii/check-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
}
4 changes: 2 additions & 2 deletions packages/@jsii/dotnet-runtime-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions packages/@jsii/dotnet-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/go-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/integ-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/java-runtime-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/@jsii/java-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/@jsii/kernel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/python-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"directory": "packages/@jsii/python-runtime"
},
"engines": {
"node": ">= 12.7.0"
"node": ">= 14.5.0"
},
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/@jsii/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/runtime/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
iife: false,
},
devtool: 'source-map',
target: 'node12.4',
target: 'node14.5',
node: {
global: false,
__filename: false,
Expand Down
4 changes: 2 additions & 2 deletions packages/@jsii/spec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
Loading

0 comments on commit f2114ca

Please sign in to comment.