diff --git a/CHANGELOG.md b/CHANGELOG.md index 9711ad14..b6f21b21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 0.77.1 + +- Drop support for Node 16 + + ## 0.76.1 - Update to latest typescript-eslint (incl. new rulesets) diff --git a/package.json b/package.json index 6388db6d..1bae9d8d 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/packages/dev-test/package.json b/packages/dev-test/package.json index f278a394..f6ae0174 100644 --- a/packages/dev-test/package.json +++ b/packages/dev-test/package.json @@ -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" diff --git a/packages/dev-test/src/packageInfo.ts b/packages/dev-test/src/packageInfo.ts index 4b0296ae..460d3911 100644 --- a/packages/dev-test/src/packageInfo.ts +++ b/packages/dev-test/src/packageInfo.ts @@ -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' }; diff --git a/packages/dev-ts/package.json b/packages/dev-ts/package.json index d031ac50..6a450f08 100644 --- a/packages/dev-ts/package.json +++ b/packages/dev-ts/package.json @@ -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", @@ -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" diff --git a/packages/dev-ts/src/loader.ts b/packages/dev-ts/src/loader.ts index fda3c09a..6caed8ff 100644 --- a/packages/dev-ts/src/loader.ts +++ b/packages/dev-ts/src/loader.ts @@ -63,8 +63,8 @@ export async function load (url: string, context: Record, 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) }); diff --git a/packages/dev-ts/src/packageInfo.ts b/packages/dev-ts/src/packageInfo.ts index b3dc75e4..2c9a59fd 100644 --- a/packages/dev-ts/src/packageInfo.ts +++ b/packages/dev-ts/src/packageInfo.ts @@ -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' }; diff --git a/packages/dev/config/tsconfig.json b/packages/dev/config/tsconfig.json index 42b640c2..5a53ca64 100644 --- a/packages/dev/config/tsconfig.json +++ b/packages/dev/config/tsconfig.json @@ -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 diff --git a/packages/dev/package.json b/packages/dev/package.json index 28676503..feb5ec6e 100644 --- a/packages/dev/package.json +++ b/packages/dev/package.json @@ -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", @@ -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", @@ -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", diff --git a/packages/dev/scripts/polkadot-dev-build-ts.mjs b/packages/dev/scripts/polkadot-dev-build-ts.mjs index d69a9c38..d65d2b08 100755 --- a/packages/dev/scripts/polkadot-dev-build-ts.mjs +++ b/packages/dev/scripts/polkadot-dev-build-ts.mjs @@ -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) diff --git a/packages/dev/src/packageInfo.ts b/packages/dev/src/packageInfo.ts index c07caa47..5201c7a2 100644 --- a/packages/dev/src/packageInfo.ts +++ b/packages/dev/src/packageInfo.ts @@ -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' }; diff --git a/yarn.lock b/yarn.lock index 8fe7ba15..00be7027 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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: @@ -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: @@ -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