commit 218aeeded5da8e596a4a170c3f67e8a905acc26f
parent 249722c3b752da893ed8b55b98e9eff774671744
Author: finwo <finwo@pm.me>
Date: Fri, 10 Dec 2021 11:38:43 +0100
Added postpublish script to deprecate old versions
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package.json b/package.json
@@ -4,7 +4,8 @@
"description": "",
"main": "index.js",
"scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "postpublish": "PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{print $2}' | sed 's/[\",]//g' | tr -d '[[:space:]]') && npm deprecate \"@finwo/p-limit@<${PACKAGE_VERSION}\" \"Rolling release, please update to ${PACKAGE_VERSION}\""
},
"keywords": [],
"author": "",