Skip to content

Commit

Permalink
bugfix ~ (package) work-around for npm publish bug (see GH:npm/cli#…
Browse files Browse the repository at this point in the history
…6137)

## [why]

Using the text "require('fs').writeFileSync(...)" blocks `npm publish` from completing
successfully; it faults with a horribly vague `npm ERR! code E403 ...` error. Minor
modification of the text will bypass the fault.

Issue raised at [GH:npm/cli#6137](npm/cli#6137).
  • Loading branch information
rivy committed Feb 6, 2023
1 parent cdbb671 commit 629b994
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
"_:update:dist.types": "shx mkdir -p dist && shx rm -fr dist/types && rollup --config .rollup.config.types.js && replace-in-file \"export { _default as default }\" \"export = _default\" dist/types/mod.cjs.d.ts --quiet && shx mkdir -p dist/cjs && shx cp dist/types/*.cjs.d.ts dist/cjs",
"_:update:dist:rebuild": "shx rm -fr dist && run-s --silent _:update:dist.build _:update:dist.types _:update:dist.normalizeEOL _:update:dist.pack && shx mkdir -p dist/.targets && shx touch build/.targets/update-dist.succeeded",
"_:version:spell:changelog_update": "run-s --silent _:exists:git-changelog && git changelog -u | cspell stdin --config \".vscode/cspell.json\" || shx echo \"[lint] WARN CHANGELOG update `cspell` exception\" 1>&2",
"_:version:update:changelog": "run-s --silent _:exists:git-changelog && node -e \"v=require('./package.json').version; result=require('child_process').spawnSync('git changelog --next-tag-now --next-tag v'+v,{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('ERR! '+result.stderr); process.exit(1);} else {require('fs').writeFileSync('CHANGELOG.mkd',result.stdout);};\" || shx echo \"[version] WARN CHANGELOG not updated\" 1>&2",
"_:version:update:changelog": "run-s --silent _:exists:git-changelog && node -e \"v=require('./package.json').version; result=require('child_process').spawnSync('git changelog --next-tag-now --next-tag v'+v,{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('ERR! '+result.stderr); process.exit(1);} else {m='fs';require(m).writeFileSync('CHANGELOG.mkd',result.stdout);};\" || shx echo \"[version] WARN CHANGELOG not updated\" 1>&2",
"## npm lifecycle scripts ##": "",
"prepublishOnly": "run-s clean update && cross-env npm_config_test_dist=true npm run test && run-s --silent update _:vcs-strictly-clean-err",
"## npm-version scripts ##": "",
Expand Down

0 comments on commit 629b994

Please sign in to comment.