From b330d3b27bfa01320a1a2a09d71c791f47b4dbf1 Mon Sep 17 00:00:00 2001 From: Kite Date: Wed, 1 Jul 2020 08:57:59 +0900 Subject: [PATCH 1/4] Add "engines" to the package.json and "engine-strict = true" to the .npmrc --- .npmrc | 1 + package.json | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.npmrc b/.npmrc index 1dab4ed4c3020..aafab1669bf72 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ save-exact = true +engine-strict = true diff --git a/package.json b/package.json index 0d9193762e851..7e13a9654a4af 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,9 @@ "bugs": { "url": "https://github.com/WordPress/gutenberg/issues" }, + "engines": { + "node": "12.x" + }, "config": { "GUTENBERG_PHASE": 2 }, From 68527882f7060f80457b93742cf759ca5e886aaa Mon Sep 17 00:00:00 2001 From: Kite Date: Thu, 2 Jul 2020 16:45:31 +0900 Subject: [PATCH 2/4] Add "npm": ">=6.9.0" to npm-engines --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7e13a9654a4af..9f2da66a707cb 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "url": "https://github.com/WordPress/gutenberg/issues" }, "engines": { - "node": "12.x" + "node": "12.x", + "npm": ">=6.9.0" }, "config": { "GUTENBERG_PHASE": 2 From 20f5a8f241246d41cbb1bcd2f5ea36b1178ec4cc Mon Sep 17 00:00:00 2001 From: Kite Date: Mon, 6 Jul 2020 17:53:51 +0900 Subject: [PATCH 3/4] Change engines: node to >=10.0.0 according to check-engines --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9f2da66a707cb..7eb12a8453927 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "url": "https://github.com/WordPress/gutenberg/issues" }, "engines": { - "node": "12.x", + "node": ">=10.0.0", "npm": ">=6.9.0" }, "config": { From 8c03da8025a4cc8a9365acbb95a3cb69aed12ff2 Mon Sep 17 00:00:00 2001 From: Kite Date: Mon, 6 Jul 2020 19:21:26 +0900 Subject: [PATCH 4/4] Remove obsolete npm-scripts which check engines --- package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package.json b/package.json index 7eb12a8453927..39decc8bde5cf 100644 --- a/package.json +++ b/package.json @@ -203,7 +203,6 @@ }, "scripts": { "analyze-bundles": "npm run build -- --webpack-bundle-analyzer", - "prebuild": "npm run check-engines", "clean:packages": "rimraf \"./packages/*/@(build|build-module|build-style)\"", "clean:package-types": "tsc --build --clean", "prebuild:packages": "npm run clean:packages && lerna run build", @@ -212,11 +211,9 @@ "build:plugin-zip": "./bin/build-plugin-zip.sh", "build": "npm run build:packages && wp-scripts build", "changelog": "./bin/plugin/cli.js changelog", - "check-engines": "wp-scripts check-engines", "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\"", "precheck-local-changes": "npm run docs:build", "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 );", - "predev": "npm run check-engines", "dev": "npm run build:packages && concurrently \"wp-scripts start\" \"npm run dev:packages\"", "dev:packages": "node ./bin/packages/watch.js", "docs:build": "node ./docs/tool/index.js && node ./bin/api-docs/update-api-docs.js",