diff --git a/.changeset/empty-donuts-arrive.md b/.changeset/empty-donuts-arrive.md new file mode 100644 index 000000000..896960c7f --- /dev/null +++ b/.changeset/empty-donuts-arrive.md @@ -0,0 +1,13 @@ +--- +'skuba': major +--- + +deps: Require Node.js 16.11+ + +Node.js 14 will reach end of life by April 2023. + +Consider upgrading the Node.js version for your project across: + +- `.nvmrc` +- `package.json#/engines/node` +- CI/CD configuration (`.buildkite/pipeline.yml`, `Dockerfile`, etc.) diff --git a/.changeset/fluffy-eyes-wonder.md b/.changeset/fluffy-eyes-wonder.md new file mode 100644 index 000000000..f2ed0e797 --- /dev/null +++ b/.changeset/fluffy-eyes-wonder.md @@ -0,0 +1,5 @@ +--- +'skuba': patch +--- + +template/\*-package: Require Node.js 16.11+ diff --git a/README.md b/README.md index c7810c310..12667e11d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![GitHub Release](https://github.com/seek-oss/skuba/workflows/Release/badge.svg?branch=master)](https://github.com/seek-oss/skuba/actions?query=workflow%3ARelease) [![GitHub Validate](https://github.com/seek-oss/skuba/workflows/Validate/badge.svg?branch=master)](https://github.com/seek-oss/skuba/actions?query=workflow%3AValidate) -[![Node.js version](https://img.shields.io/badge/node-%3E%3D%2014.18-brightgreen)](https://nodejs.org/en/) +[![Node.js version](https://img.shields.io/badge/node-%3E%3D%2016.11-brightgreen)](https://nodejs.org/en/) [![npm package](https://img.shields.io/npm/v/skuba)](https://www.npmjs.com/package/skuba) --- diff --git a/package.json b/package.json index c89c75637..f2d3c9f23 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ ] }, "resolutions": { - "**/@types/node": ">=14.18" + "**/@types/node": ">=16.11" }, "dependencies": { "@esbuild-plugins/tsconfig-paths": "^0.1.0", @@ -75,7 +75,7 @@ "@octokit/rest": "^19.0.0", "@octokit/types": "^9.0.0", "@types/jest": "^29.0.0", - "@types/node": ">=14.18", + "@types/node": ">=16.11", "chalk": "^4.1.0", "concurrently": "^7.0.0", "dotenv": "^16.0.0", @@ -155,7 +155,7 @@ } }, "engines": { - "node": ">=14.18" + "node": ">=16.11" }, "skuba": { "build": "esbuild", diff --git a/template/oss-npm-package/_package.json b/template/oss-npm-package/_package.json index bd3e301dc..d561ce087 100644 --- a/template/oss-npm-package/_package.json +++ b/template/oss-npm-package/_package.json @@ -1,25 +1,22 @@ { - "dependencies": {}, + "name": "<%- moduleName %>", + "version": "0.0.0-semantically-released", "description": "<%- description %>", - "devDependencies": { - "@types/node": "^16.18.3", - "commitizen": "^4.2.4", - "skuba": "*" + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/<%- orgName %>/<%- repoName %>.git" }, + "license": "MIT", + "sideEffects": false, + "main": "./lib-commonjs/index.js", + "module": "./lib-es2015/index.js", + "types": "./lib-types/index.d.ts", "files": [ "lib*/**/*.d.ts", "lib*/**/*.js", "lib*/**/*.js.map", "lib*/**/*.json" ], - "license": "MIT", - "main": "./lib-commonjs/index.js", - "module": "./lib-es2015/index.js", - "name": "<%- moduleName %>", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/<%- orgName %>/<%- repoName %>.git" - }, "scripts": { "build": "skuba build-package", "commit": "cz", @@ -35,7 +32,13 @@ "path": "cz-conventional-changelog" } }, - "sideEffects": false, - "types": "./lib-types/index.d.ts", - "version": "0.0.0-semantically-released" + "dependencies": {}, + "devDependencies": { + "@types/node": "^16.18.3", + "commitizen": "^4.2.4", + "skuba": "*" + }, + "engines": { + "node": ">=16.11" + } } diff --git a/template/oss-npm-package/tsconfig.json b/template/oss-npm-package/tsconfig.json index 79d869ac0..54fe8e8df 100644 --- a/template/oss-npm-package/tsconfig.json +++ b/template/oss-npm-package/tsconfig.json @@ -1,9 +1,9 @@ { "compilerOptions": { - "lib": ["ES2020"], + "lib": ["ES2022"], "outDir": "lib", "removeComments": false, - "target": "ES2020" + "target": "ES2022" }, "exclude": ["lib*/**/*"], "extends": "skuba/config/tsconfig.json" diff --git a/template/private-npm-package/_package.json b/template/private-npm-package/_package.json index aabcf2518..7a72cb6cc 100644 --- a/template/private-npm-package/_package.json +++ b/template/private-npm-package/_package.json @@ -1,25 +1,22 @@ { - "dependencies": {}, + "name": "<%- moduleName %>", + "version": "0.0.0-semantically-released", "description": "<%- description %>", - "devDependencies": { - "@types/node": "^16.18.3", - "commitizen": "^4.2.4", - "skuba": "*" + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/<%- orgName %>/<%- repoName %>.git" }, + "license": "UNLICENSED", + "sideEffects": false, + "main": "./lib-commonjs/index.js", + "module": "./lib-es2015/index.js", + "types": "./lib-types/index.d.ts", "files": [ "lib*/**/*.d.ts", "lib*/**/*.js", "lib*/**/*.js.map", "lib*/**/*.json" ], - "license": "UNLICENSED", - "main": "./lib-commonjs/index.js", - "module": "./lib-es2015/index.js", - "name": "<%- moduleName %>", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/<%- orgName %>/<%- repoName %>.git" - }, "scripts": { "build": "skuba build-package", "commit": "cz", @@ -35,7 +32,13 @@ "path": "cz-conventional-changelog" } }, - "sideEffects": false, - "types": "./lib-types/index.d.ts", - "version": "0.0.0-semantically-released" + "dependencies": {}, + "devDependencies": { + "@types/node": "^16.18.3", + "commitizen": "^4.2.4", + "skuba": "*" + }, + "engines": { + "node": ">=16.11" + } } diff --git a/template/private-npm-package/tsconfig.json b/template/private-npm-package/tsconfig.json index 79d869ac0..54fe8e8df 100644 --- a/template/private-npm-package/tsconfig.json +++ b/template/private-npm-package/tsconfig.json @@ -1,9 +1,9 @@ { "compilerOptions": { - "lib": ["ES2020"], + "lib": ["ES2022"], "outDir": "lib", "removeComments": false, - "target": "ES2020" + "target": "ES2022" }, "exclude": ["lib*/**/*"], "extends": "skuba/config/tsconfig.json" diff --git a/tsconfig.json b/tsconfig.json index f8dd86555..70857aa39 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,10 +2,10 @@ "compilerOptions": { "baseUrl": "src", "declaration": true, - "lib": ["ES2020"], + "lib": ["ES2022"], "outDir": "lib", "removeComments": false, - "target": "ES2020" + "target": "ES2022" }, "exclude": ["integration/**/*", "lib*/**/*", "template/**/*"], "extends": "./config/tsconfig.json" diff --git a/yarn.lock b/yarn.lock index 5d238bf3e..7b95afc26 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1885,10 +1885,10 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@>=14.18", "@types/node@^12.7.1", "@types/node@^18.0.0": - version "18.13.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.13.0.tgz#0400d1e6ce87e9d3032c19eb6c58205b0d3f7850" - integrity sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg== +"@types/node@*", "@types/node@>=16.11", "@types/node@^12.7.1", "@types/node@^18.0.0": + version "18.15.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.3.tgz#f0b991c32cfc6a4e7f3399d6cb4b8cf9a0315014" + integrity sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw== "@types/normalize-package-data@^2.4.0": version "2.4.1"