Merge pull request #31356 from woocommerce/prevent-npm

Prevent npm
This commit is contained in:
Roy Ho 2021-12-10 12:26:43 -08:00 committed by GitHub
commit b12de19975
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 0 deletions

3
.gitignore vendored
View File

@ -40,6 +40,9 @@ vendor/
# TypeScript files # TypeScript files
tsconfig.tsbuildinfo tsconfig.tsbuildinfo
# Node Package Dependencies
package-lock.json
# wp-env config # wp-env config
.wp-env.override.json .wp-env.override.json

View File

@ -4,6 +4,7 @@
"description": "API tests for WooCommerce", "description": "API tests for WooCommerce",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"test": "jest", "test": "jest",
"test:api": "jest --group=api", "test:api": "jest --group=api",
"test:hello": "jest --group=hello", "test:hello": "jest --group=hello",

View File

@ -26,6 +26,7 @@
], ],
"sideEffects": false, "sideEffects": false,
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"clean": "rm -rf ./dist ./tsconfig.tsbuildinfo", "clean": "rm -rf ./dist ./tsconfig.tsbuildinfo",
"compile": "tsc -b", "compile": "tsc -b",
"build": "pnpm run clean && npm run compile", "build": "pnpm run clean && npm run compile",

View File

@ -23,6 +23,7 @@
"access": "public" "access": "public"
}, },
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"build": "./bin/build.sh", "build": "./bin/build.sh",
"prepare": "pnpm run build" "prepare": "pnpm run build"
} }

View File

@ -50,6 +50,7 @@
"access": "public" "access": "public"
}, },
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"clean": "rm -rf ./build ./build-module", "clean": "rm -rf ./build ./build-module",
"compile": "node ./../bin/build.js", "compile": "node ./../bin/build.js",
"build": "pnpm run clean && pnpm run compile", "build": "pnpm run clean && pnpm run compile",

View File

@ -30,6 +30,7 @@
"access": "public" "access": "public"
}, },
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"clean": "rm -rf ./build ./build-module", "clean": "rm -rf ./build ./build-module",
"compile": "node ./../bin/build.js", "compile": "node ./../bin/build.js",
"build": "pnpm run clean && pnpm run compile", "build": "pnpm run clean && pnpm run compile",