Skip to content

Commit

Permalink
Declare package.json#engines and bump transpilaton target (#162)
Browse files Browse the repository at this point in the history
* Declare `package.json#engines` and bump transpilaton target

* Add changeset
  • Loading branch information
Andarist authored Jan 23, 2023
1 parent 18f7869 commit f046017
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .changeset/unlucky-deers-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@manypkg/cli": minor
"@manypkg/find-root": major
"@manypkg/gatsby-source-workspace": minor
"@manypkg/get-packages": major
---

Increased the transpilation target of the source files to `node@14.x`. At the same time added this as `package.json#engines` to explicitly declare the minimum node version supported by this package.
15 changes: 13 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
module.exports = {
presets: ["@babel/preset-env", "@babel/preset-typescript"],
plugins: ["@babel/plugin-transform-runtime"]
presets: [
[
"@babel/preset-env",
{
targets: { node: 14 },
},
],
"@babel/preset-typescript",
],
// keep this just in case - it's not needed for this project right now
// if we ever start depending on some helpers again, then we can reconsider adding `@babel/runtime` as a dependency
// or removing this plugin altogether
plugins: ["@babel/plugin-transform-runtime"],
};
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
"prettier-plugin-packagejson": "^2.3.0",
"typescript": "^4.9.4"
},
"engines": {
"node": ">=14.18.0"
},
"preconstruct": {
"packages": [
"packages/!(gatsby)*"
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"manypkg": "./bin.js"
},
"dependencies": {
"@babel/runtime": "^7.20.6",
"@manypkg/get-packages": "^1.1.3",
"chalk": "^2.4.2",
"detect-indent": "^6.0.0",
Expand All @@ -31,5 +30,8 @@
"devDependencies": {
"fixturez": "^1.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=14.18.0"
}
}
4 changes: 3 additions & 1 deletion packages/find-root/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
"main": "dist/manypkg-find-root.cjs.js",
"module": "dist/manypkg-find-root.esm.js",
"dependencies": {
"@babel/runtime": "^7.20.6",
"@manypkg/tools": "^0.0.0",
"@types/node": "^12.7.1",
"find-up": "^4.1.0",
"fs-extra": "^8.1.0"
},
"devDependencies": {
"fixturez": "^1.1.0"
},
"engines": {
"node": ">=14.18.0"
}
}
3 changes: 3 additions & 0 deletions packages/gatsby-source-workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
},
"peerDependencies": {
"gatsby": "^2.15.28"
},
"engines": {
"node": ">=14.18.0"
}
}
4 changes: 3 additions & 1 deletion packages/get-packages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
"license": "MIT",
"main": "dist/manypkg-get-packages.cjs.js",
"dependencies": {
"@babel/runtime": "^7.20.6",
"@manypkg/find-root": "^1.1.0",
"@manypkg/tools": "^0.0.0"
},
"devDependencies": {
"jest-fixtures": "^0.6.0"
},
"engines": {
"node": ">=14.18.0"
}
}
4 changes: 3 additions & 1 deletion packages/tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"license": "MIT",
"main": "dist/manypkg-tools.cjs.js",
"dependencies": {
"@babel/runtime": "^7.20.6",
"fs-extra": "^8.1.0",
"globby": "^11.0.0",
"jju": "^1.4.0",
Expand All @@ -13,5 +12,8 @@
"devDependencies": {
"@types/jju": "^1.4.2",
"jest-fixtures": "^0.6.0"
},
"engines": {
"node": ">=14.18.0"
}
}

0 comments on commit f046017

Please sign in to comment.