Skip to content

Commit

Permalink
chore: add engines info to package.json (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Mar 6, 2023
1 parent 9b74512 commit b88d89e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
18 changes: 0 additions & 18 deletions .babelrc

This file was deleted.

13 changes: 13 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* eslint-disable import/no-extraneous-dependencies */

const semver = require('semver');
const pkg = require('./package.json');

const supportedNodeVersion = semver.minVersion(pkg.engines.node).version;

module.exports = {
presets: [
['@babel/preset-env', { targets: { node: supportedNodeVersion } }],
['@babel/preset-typescript', { allowDeclareFields: true }],
],
};
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"jest": "^29.0.0",
"jest-runner": "^29.0.0",
"prettier": "^2.0.5",
"semver": "^7.3.8",
"strip-ansi": "^6.0.0",
"typescript": "^4.3.5"
},
Expand All @@ -87,5 +88,8 @@
"resolutions": {
"@types/node@*": "^14.18.23"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
},
"packageManager": "[email protected]"
}
3 changes: 2 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2741,6 +2741,7 @@ __metadata:
jest-worker: ^29.5.0
p-limit: ^3.1.0
prettier: ^2.0.5
semver: ^7.3.8
strip-ansi: ^6.0.0
typescript: ^4.3.5
peerDependencies:
Expand Down Expand Up @@ -5637,7 +5638,7 @@ __metadata:
languageName: node
linkType: hard

"semver@npm:^7.3.5, semver@npm:^7.3.7":
"semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8":
version: 7.3.8
resolution: "semver@npm:7.3.8"
dependencies:
Expand Down

0 comments on commit b88d89e

Please sign in to comment.