Skip to content

Commit

Permalink
chore: drop support for Node 12 (#3547)
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 authored Jun 8, 2022
1 parent 67e8d36 commit 06a7889
Show file tree
Hide file tree
Showing 35 changed files with 1,068 additions and 1,087 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
39 changes: 19 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,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 @@ -70,10 +70,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 @@ -135,11 +135,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 @@ -164,10 +164,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 @@ -217,67 +217,66 @@ 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
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
4 changes: 0 additions & 4 deletions .mergify/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ 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 .*$
Expand Down Expand Up @@ -59,7 +58,6 @@ 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 .*$
Expand Down Expand Up @@ -110,7 +108,6 @@ 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 .*$
Expand Down Expand Up @@ -161,7 +158,6 @@ 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 .*$
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
},
"devDependencies": {
"@jest/types": "^28.1.0",
"@types/jest": "^27.5.1",
"@types/node": "^12.20.52",
"@typescript-eslint/eslint-plugin": "^5.25.0",
"@typescript-eslint/parser": "^5.25.0",
"@types/jest": "^28.1.0",
"@types/node": "^12.20.54",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"all-contributors-cli": "^6.20.0",
"eslint": "^8.15.0",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-node": "^0.3.6",
"eslint-import-resolver-typescript": "^2.7.1",
Expand All @@ -31,11 +31,11 @@
"jest-circus": "^28.1.0",
"jest-config": "^28.1.0",
"jest-expect-message": "^1.0.2",
"lerna": "^4.0.0",
"lerna": "^5.0.0",
"prettier": "^2.6.2",
"standard-version": "^9.5.0",
"ts-node": "^10.7.0",
"typescript": "~4.6.4"
"ts-node": "^10.8.0",
"typescript": "~4.7.2"
},
"repository": {
"type": "git",
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"
}
2 changes: 1 addition & 1 deletion 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 Down
2 changes: 1 addition & 1 deletion 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 Down
2 changes: 1 addition & 1 deletion 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 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
2 changes: 1 addition & 1 deletion 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 Down
2 changes: 1 addition & 1 deletion 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 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
2 changes: 1 addition & 1 deletion 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 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
2 changes: 1 addition & 1 deletion 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 Down
2 changes: 1 addition & 1 deletion packages/@scope/jsii-calc-base-of-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/@scope/jsii-calc-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/@scope/jsii-calc-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/codemaker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-calc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"test"
],
"engines": {
"node": ">= 12.7.0"
"node": ">= 14.5.0"
},
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-diff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"directory": "packages/jsii-diff"
},
"engines": {
"node": ">= 12.7.0"
"node": ">= 14.5.0"
},
"main": "lib/index.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-pacmak/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-reflect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading

0 comments on commit 06a7889

Please sign in to comment.