From fb8f3988eba11e2515e5ecfc87153f68982bf6ca Mon Sep 17 00:00:00 2001 From: Thomas Thiebaud Date: Sat, 6 Mar 2021 10:37:07 +0100 Subject: [PATCH] fix: disable postinstall on user machine --- package-lock.json | 53 ++++++++++++++++++++++++++++++++++++++++++++++- package.json | 3 +++ 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index f2e9f26..0c3528c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,7 @@ "requires": true, "packages": { "": { - "version": "3.2.2", + "version": "3.2.3", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -33,6 +33,7 @@ "fastify": "^3.13.0", "husky": "^5.1.3", "jest": "^26.6.3", + "pinst": "^2.1.6", "prettier": "^2.2.1", "rimraf": "^3.0.2", "semantic-release": "^17.4.1", @@ -4014,6 +4015,26 @@ "readable-stream": "^2.0.0" } }, + "node_modules/fromentries": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/fs-extra": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", @@ -12474,6 +12495,21 @@ "integrity": "sha512-EqX4pwDPrt3MuOAAUBMU0Tk5kR/YcCM5fNPEzgCO2zJ5HfX0vbiH9HbJglnyeQsN96Kznae6MWD47pZB5avTrg==", "dev": true }, + "node_modules/pinst": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/pinst/-/pinst-2.1.6.tgz", + "integrity": "sha512-B4dYmf6nEXg1NpDSB+orYWvKa5Kfmz5KzWC29U59dpVM4S/+xp0ak/JMEsw04UQTNNKps7klu0BUalr343Gt9g==", + "dev": true, + "dependencies": { + "fromentries": "^1.3.2" + }, + "bin": { + "pinst": "bin.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/pirates": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", @@ -18539,6 +18575,12 @@ "readable-stream": "^2.0.0" } }, + "fromentries": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", + "dev": true + }, "fs-extra": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", @@ -24984,6 +25026,15 @@ "integrity": "sha512-EqX4pwDPrt3MuOAAUBMU0Tk5kR/YcCM5fNPEzgCO2zJ5HfX0vbiH9HbJglnyeQsN96Kznae6MWD47pZB5avTrg==", "dev": true }, + "pinst": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/pinst/-/pinst-2.1.6.tgz", + "integrity": "sha512-B4dYmf6nEXg1NpDSB+orYWvKa5Kfmz5KzWC29U59dpVM4S/+xp0ak/JMEsw04UQTNNKps7klu0BUalr343Gt9g==", + "dev": true, + "requires": { + "fromentries": "^1.3.2" + } + }, "pirates": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", diff --git a/package.json b/package.json index 8c67e5b..b673fef 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,8 @@ }, "scripts": { "postinstall": "husky install", + "prepublishOnly": "pinst --disable", + "postpublish": "pinst --enable", "clean": "rimraf ./dist", "build": "npm run clean && tsc", "lint": "prettier --check .", @@ -40,6 +42,7 @@ "fastify": "^3.13.0", "husky": "^5.1.3", "jest": "^26.6.3", + "pinst": "^2.1.6", "prettier": "^2.2.1", "rimraf": "^3.0.2", "semantic-release": "^17.4.1",