commit 2f874fbc27a380f75f7dc29e0cb4266c027e0235
parent e8b6ad4ae9773ad68bd8cee2767867b2b257dda5
Author: Robin Bron <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": "",