Skip to content

Commit

Permalink
Just drop Node 16 support (#1121)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr authored Nov 17, 2023
1 parent ef57a6a commit 5e61e69
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 25 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## 0.77.1

- Drop support for Node 16


## 0.76.1

- Update to latest typescript-eslint (incl. new rulesets)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"sideEffects": false,
"type": "module",
"version": "0.76.38",
"version": "0.77.0",
"versions": {
"git": "0.76.38",
"npm": "0.76.38"
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"sideEffects": false,
"type": "module",
"version": "0.76.38",
"version": "0.77.0",
"main": "./index.js",
"exports": {
"./globals.d.ts": "./src/globals.d.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-test/src/packageInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/dev-test', path: 'auto', type: 'auto', version: '0.76.38' };
export const packageInfo = { name: '@polkadot/dev-test', path: 'auto', type: 'auto', version: '0.77.0' };
4 changes: 2 additions & 2 deletions packages/dev-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"bugs": "https://github.com/polkadot-js/dev/issues",
"description": "An TS -> ESM loader for Node >= 16.12",
"engines": {
"node": ">=16.12"
"node": ">=18"
},
"homepage": "https://github.com/polkadot-js/dev/tree/master/packages/dev-ts#readme",
"license": "Apache-2.0",
Expand All @@ -15,7 +15,7 @@
},
"sideEffects": false,
"type": "module",
"version": "0.76.38",
"version": "0.77.0",
"main": "./index.js",
"exports": {
"./globals.d.ts": "./src/globals.d.ts"
Expand Down
4 changes: 2 additions & 2 deletions packages/dev-ts/src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ export async function load (url: string, context: Record<string, unknown>, nextL
module: ts.ModuleKind.ESNext,
moduleResolution: ts.ModuleResolutionKind.NodeNext,
skipLibCheck: true,
// Aligns with scripts/polkadot-dev-build-ts & config/tsconfig
target: ts.ScriptTarget.ES2021
// Aligns with packages/dev/scripts/polkadot-dev-build-ts & packages/dev/config/tsconfig
target: ts.ScriptTarget.ES2022
},
fileName: fileURLToPath(url)
});
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-ts/src/packageInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/dev-ts', path: 'auto', type: 'auto', version: '0.76.38' };
export const packageInfo = { name: '@polkadot/dev-ts', path: 'auto', type: 'auto', version: '0.77.0' };
6 changes: 3 additions & 3 deletions packages/dev/config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"extends": "@tsconfig/strictest/tsconfig.json",
"compilerOptions": {
/**
* This needs to align with scripts/polkadot-dev-build-ts & dev-ts/loader
* (target here is specifically tied to the minimum supported version)
* Aligns with packages/dev/scripts/polkadot-dev-build-ts & packages/dev-ts/src/loader
* (target here is specifically tied to the minimum supported Node version)
*/
"module": "nodenext",
"moduleResolution": "nodenext",
"target": "es2021",
"target": "es2022",

/**
* Specific compilation configs for polkadot-js projects as it is used
Expand Down
8 changes: 4 additions & 4 deletions packages/dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"bugs": "https://github.com/polkadot-js/dev/issues",
"description": "A collection of shared CI scripts and development environment used by @polkadot projects",
"engines": {
"node": ">=16"
"node": ">=18"
},
"homepage": "https://github.com/polkadot-js/dev/tree/master/packages/dev#readme",
"license": "Apache-2.0",
Expand All @@ -15,7 +15,7 @@
},
"sideEffects": false,
"type": "module",
"version": "0.76.38",
"version": "0.77.0",
"bin": {
"polkadot-ci-ghact-build": "./scripts/polkadot-ci-ghact-build.mjs",
"polkadot-ci-ghact-docs": "./scripts/polkadot-ci-ghact-docs.mjs",
Expand Down Expand Up @@ -50,8 +50,8 @@
},
"dependencies": {
"@eslint/js": "^8.53.0",
"@polkadot/dev-test": "^0.76.38",
"@polkadot/dev-ts": "^0.76.38",
"@polkadot/dev-test": "^0.77.0",
"@polkadot/dev-ts": "^0.77.0",
"@rollup/plugin-alias": "^5.0.1",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-dynamic-import-vars": "^2.1.0",
Expand Down
15 changes: 10 additions & 5 deletions packages/dev/scripts/polkadot-dev-build-ts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ console.log('$ polkadot-dev-build-ts', process.argv.slice(2).join(' '));

exitFatalEngine();

// We need at least es2020 for dynamic imports. Aligns with dev-ts/loader & config/tsconfig
// Node 14 === es2020, Node 16 === es2021, Node 18 === es2022
// https://github.com/tsconfig/bases/blob/d699759e29cfd5f6ab0fab9f3365c7767fca9787/bases/node16.json#L8
const TARGET_TSES = ts.ScriptTarget.ES2021;
const TARGET_NODE = '>=16';
// We need at least es2020 for dynamic imports. Settings here needs to align with
// those in packages/dev-ts/src/loader & packages/dev/config/tsconfig
//
// Node 14 === es2020 (w/ dynamic imports)
// Node 16 === es2021
// Node 18/20 === es2022 (w/ private fields)
//
// https://github.com/tsconfig/bases/tree/main/bases
const TARGET_TSES = ts.ScriptTarget.ES2022;
const TARGET_NODE = '>=18';

const IGNORE_IMPORTS = [
// node (new-style)
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/src/packageInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/dev', path: 'auto', type: 'auto', version: '0.76.38' };
export const packageInfo = { name: '@polkadot/dev', path: 'auto', type: 'auto', version: '0.77.0' };
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/dev-test@^0.76.38, @polkadot/dev-test@workspace:packages/dev-test":
"@polkadot/dev-test@^0.77.0, @polkadot/dev-test@workspace:packages/dev-test":
version: 0.0.0-use.local
resolution: "@polkadot/dev-test@workspace:packages/dev-test"
dependencies:
Expand All @@ -443,7 +443,7 @@ __metadata:
languageName: unknown
linkType: soft

"@polkadot/dev-ts@^0.76.38, @polkadot/dev-ts@workspace:packages/dev-ts":
"@polkadot/dev-ts@^0.77.0, @polkadot/dev-ts@workspace:packages/dev-ts":
version: 0.0.0-use.local
resolution: "@polkadot/dev-ts@workspace:packages/dev-ts"
dependencies:
Expand All @@ -458,8 +458,8 @@ __metadata:
resolution: "@polkadot/dev@workspace:packages/dev"
dependencies:
"@eslint/js": ^8.53.0
"@polkadot/dev-test": ^0.76.38
"@polkadot/dev-ts": ^0.76.38
"@polkadot/dev-test": ^0.77.0
"@polkadot/dev-ts": ^0.77.0
"@rollup/plugin-alias": ^5.0.1
"@rollup/plugin-commonjs": ^25.0.7
"@rollup/plugin-dynamic-import-vars": ^2.1.0
Expand Down

0 comments on commit 5e61e69

Please sign in to comment.