Skip to content

Commit

Permalink
refactor!: require Node.js LTS 18
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Removed support for Node.js 12.
BREAKING CHANGE: Removed support for Node.js 14.
BREAKING CHANGE: Removed support for Node.js 16.
BREAKING CHANGE: Node.js LTS 18 (^18.12.0) is now required.
  • Loading branch information
panva committed Dec 1, 2022
1 parent f770e2d commit ff26cf6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 18 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ jobs:
fail-fast: false
matrix:
node-version:
- lts/erbium # 12
- lts/fermium # 14
- lts/gallium # 16
- lts/hydrogen # 18
- current

Expand All @@ -53,8 +50,6 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'
check-latest: true
- run: npm install --global npm@8
if: ${{ startsWith(steps.node.outputs.node-version, 'v12') || startsWith(steps.node.outputs.node-version, 'v14') }}
- run: npm clean-install
- run: npm run ci

Expand Down
2 changes: 1 addition & 1 deletion lib/provider.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-disable-next-line import/order
const attention = require('./helpers/attention');

const minimal = 'Erbium';
const minimal = 'Hydrogen';
const current = process.release.lts;
if (!current || current.charCodeAt(0) < minimal.charCodeAt(0)) {
attention.warn('Unsupported Node.js runtime version.');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@
"timekeeper": "^2.2.0"
},
"engines": {
"node": "12 || 14 || 16 || 18"
"node": "18"
}
}
12 changes: 1 addition & 11 deletions test/ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,7 @@ function pass({ mountTo, mountVia } = {}) {

if (process.platform === 'linux' || !('CI' in process.env)) {
const mountTo = '/oidc';
const frameworks = ['connect', 'express', 'koa'];

const [major] = process.version.slice(1).split('.').map((x) => parseInt(x, 10));

if (major >= 12) {
frameworks.push('hapi');
}

if (major >= 14) {
frameworks.push('fastify');
}
const frameworks = ['connect', 'express', 'koa', 'hapi', 'fastify'];

for (const mountVia of frameworks) {
await pass({ mountVia, mountTo });
Expand Down

0 comments on commit ff26cf6

Please sign in to comment.