fix: work around semantic-release/npm plugin prepack issue

There's an issue where the `npm` plugin for `semantic-release`
effectively runs `npm prepack` twice when `tarballDir` is set. Worse, if
the `tarballDir` is within the package directory and not excluded (by
`.npmignore`, for example) then the tarball from the first `prepack`
will end up inside the tarball for the second `prepack`, effectively
doubling the package size.

See https://github.com/semantic-release/npm/issues/535
This commit is contained in:
Christopher Willis-Ford 2024-09-10 12:57:17 -07:00
parent d34aac2177
commit a5d298de3b

View file

@ -12,7 +12,7 @@ module.exports = {
[ [
'@semantic-release/npm', '@semantic-release/npm',
{ {
tarballDir: 'pack' // Do not set 'tarballDir' without considering this issue: https://github.com/semantic-release/npm/issues/535
} }
], ],
[ [