Skip to content

Commit 4799132

Browse files
committed
Add npm script for safe release publish
Npm publishes all versions with `latest` tag by default. This means that even versions like `1.1.0-alpha1` will be considered latest by npm and will be installed by default when typing `npm install neo4j-driver`. This commit adds a safe publish plugin that will publish versions that consist of three numbers (like `X.Y.Z`) with `latest` tag and versions that contain hyphen (like `X.Y.Z-betaAB`) with tag `next`. Users will be able to try out pre-released driver versions using `npm install neo4j-driver@next`.
1 parent 7eac0ae commit 4799132

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"start-neo4j": "gulp start-neo4j",
1515
"stop-neo4j": "gulp stop-neo4j",
1616
"run-tck": "gulp run-tck",
17-
"docs": "esdoc -c esdoc.json"
17+
"docs": "esdoc -c esdoc.json",
18+
"publishRelease": "npm-publish-safe-latest next"
1819
},
1920
"main": "lib/index.js",
2021
"devDependencies": {
@@ -42,6 +43,7 @@
4243
"jasmine-reporters": "^2.0.7",
4344
"merge-stream": "^1.0.0",
4445
"minimist": "^1.2.0",
46+
"npm-publish-safe-latest": "^1.1.6",
4547
"phantomjs-prebuilt": "^2.1.7 ",
4648
"run-sequence": "^1.1.4",
4749
"through2": "~2.0.0",

0 commit comments

Comments
 (0)