]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: update pnpm verification script (#7174)
authorJoker <39668309+qytayh@users.noreply.github.com>
Sun, 9 Jul 2023 04:52:13 +0000 (12:52 +0800)
committerGitHub <noreply@github.com>
Sun, 9 Jul 2023 04:52:13 +0000 (12:52 +0800)
package.json
scripts/preinstall.js [deleted file]

index 9ad6b011cfa002bd561132666a7b2a3713d83e57..4310ae6368b122960a0e8e84e0100dd445491ec3 100644 (file)
@@ -35,7 +35,7 @@
     "build-runtime-esm": "node scripts/build.js runtime reactivity shared -af esm-bundler && node scripts/build.js vue -f esm-bundler-runtime && node scripts/build.js vue -f esm-browser-runtime",
     "build-ssr-esm": "node scripts/build.js compiler-sfc server-renderer -f esm-browser",
     "build-sfc-playground-self": "cd packages/sfc-playground && npm run build",
-    "preinstall": "node ./scripts/preinstall.js",
+    "preinstall": "npx only-allow pnpm",
     "postinstall": "simple-git-hooks"
   },
   "simple-git-hooks": {
diff --git a/scripts/preinstall.js b/scripts/preinstall.js
deleted file mode 100644 (file)
index 05823d5..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// @ts-check
-if (!/pnpm/.test(process.env.npm_execpath || '')) {
-  console.warn(
-    `\u001b[33mThis repository requires using pnpm as the package manager ` +
-      ` for scripts to work properly.\u001b[39m\n`
-  )
-  process.exit(1)
-}