From 36102cd271194ddc9dc9ec0c0e78ceb13482ff68 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 7 Apr 2021 14:00:05 -0700 Subject: [PATCH] [meta] use `prepublishOnly` script for npm 7+ --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a37e5e6b7..6d9691be3 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "flow": "if [ ! -e ./.flowconfig ]; then echo \"Could not find .flowconfig\"; else flow; test $? -eq 0 -o $? -eq 2; fi", "lint:fix": "npm run lint -- --fix", "lint": "eslint --config .eslintrc src __tests__ __mocks__ scripts", - "prepublish": "safe-publish-latest && not-in-publish || (npm run lint && npm run flow && npm run jest && npm run build)", + "prepublish": "safe-publish-latest && not-in-publish || npm run prepublishOnly", + "prepublishOnly": "npm run lint && npm run flow && npm run jest && npm run build", "pretest": "npm run lint:fix && npm run flow", "test": "npm run jest", "posttest": "aud --production",