Skip to content

Commit

Permalink
chore(node): drop Node 12 support (#176)
Browse files Browse the repository at this point in the history
This also converts the project to pure ESM as it is fully supported in
Node 14.13.1, 16 and beyond.

BREAKING CHANGE: This removes support for Node v12 and makes the new
minimum runtime Node v14.13.1, as v12 is EOL. Please upgrade your
Node.js environment to at least version 14.13.1, or continue using the
latest v9 release of `pwned` if you are unable to upgrade your
environment.
  • Loading branch information
wKovacs64 committed Apr 27, 2022
1 parent 35be509 commit 1bd5326
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .babelrc.cjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
module.exports = {
plugins: ['babel-plugin-add-import-extension'],
presets: [
'@babel/preset-typescript',
[
'@babel/preset-env',
{
modules: false,
targets: {
node: '12.20',
node: '14.13.1',
},
},
],
'@babel/preset-typescript',
],
};
24 changes: 23 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
"homepage": "https://wkovacs64.github.io/pwned",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": "^14.13.1 || >=16.0.0"
},
"dependencies": {
"common-tags": "^1.8.2",
Expand All @@ -90,6 +90,7 @@
"@types/ws": "8.5.3",
"@types/yargs": "17.0.10",
"@wkovacs64/prettier-config": "3.0.1",
"babel-plugin-add-import-extension": "1.6.0",
"c8": "7.11.2",
"codecov": "3.8.3",
"commitizen": "4.2.4",
Expand Down
8 changes: 4 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"lib": ["esnext", "dom"], // "dom" only for msw
"target": "es2019", // Node 12
"module": "es2020",
"moduleResolution": "node",
"lib": ["ESNext", "DOM"], // "DOM" only for msw
"target": "ES2020", // Node 14
"module": "ES2020",
"moduleResolution": "Node",
"esModuleInterop": true,
"importsNotUsedAsValues": "error",
"noEmit": true,
Expand Down

0 comments on commit 1bd5326

Please sign in to comment.