Skip to content

Commit

Permalink
work around publishing issue with npm v7 (#5983)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conduitry authored Feb 17, 2021
1 parent 5e293f9 commit 9a9b934
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions check_publish_env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if (!process.env.PUBLISH) {
console.error('npm publish must be run with the PUBLISH environment variable set');
process.exit(1);
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"dev": "rollup -cw",
"pretest": "npm run build",
"posttest": "agadoo internal/index.mjs",
"prepublishOnly": "npm run lint && PUBLISH=true npm test",
"prepublishOnly": "node check_publish_env.js && npm run lint && npm test",
"tsd": "tsc -p src/compiler --emitDeclarationOnly && tsc -p src/runtime --emitDeclarationOnly",
"lint": "eslint \"{src,test}/**/*.{ts,js}\""
},
Expand Down

0 comments on commit 9a9b934

Please sign in to comment.