Skip to content

Commit 7214db2

Browse files
authored
Add "engines" to the package.json and "engine-strict = true" to the .… (WordPress#23600)
* Add "engines" to the package.json and "engine-strict = true" to the .npmrc * Add "npm": ">=6.9.0" to npm-engines * Change engines: node to >=10.0.0 according to check-engines * Remove obsolete npm-scripts which check engines
1 parent f47037a commit 7214db2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
save-exact = true
2+
engine-strict = true

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
"bugs": {
1515
"url": "https://github.com/WordPress/gutenberg/issues"
1616
},
17+
"engines": {
18+
"node": ">=10.0.0",
19+
"npm": ">=6.9.0"
20+
},
1721
"config": {
1822
"GUTENBERG_PHASE": 2
1923
},
@@ -199,7 +203,6 @@
199203
},
200204
"scripts": {
201205
"analyze-bundles": "npm run build -- --webpack-bundle-analyzer",
202-
"prebuild": "npm run check-engines",
203206
"clean:packages": "rimraf \"./packages/*/@(build|build-module|build-style)\"",
204207
"clean:package-types": "tsc --build --clean",
205208
"prebuild:packages": "npm run clean:packages && lerna run build",
@@ -208,11 +211,9 @@
208211
"build:plugin-zip": "./bin/build-plugin-zip.sh",
209212
"build": "npm run build:packages && wp-scripts build",
210213
"changelog": "./bin/plugin/cli.js changelog",
211-
"check-engines": "wp-scripts check-engines",
212214
"check-licenses": "concurrently \"wp-scripts check-licenses --prod --gpl2 --ignore=@react-native-community/cli,@react-native-community/cli-platform-ios\" \"wp-scripts check-licenses --dev\"",
213215
"precheck-local-changes": "npm run docs:build",
214216
"check-local-changes": "( git diff -U0 | xargs -0 node bin/process-git-diff ) || ( echo \"There are local uncommitted changes after one or both of 'npm install' or 'npm run docs:build'!\" && exit 1 );",
215-
"predev": "npm run check-engines",
216217
"dev": "npm run build:packages && concurrently \"wp-scripts start\" \"npm run dev:packages\"",
217218
"dev:packages": "node ./bin/packages/watch.js",
218219
"docs:build": "node ./docs/tool/index.js && node ./bin/api-docs/update-api-docs.js",

0 commit comments

Comments
 (0)