pnpm (correct): runs lifecycle scripts on your own package regardless of your ignore-scripts=true in your .npmrc.
npm (incorrect): ignores all lifecycle scripts when ignore-scripts=true is present, including the obvious ones that you wrote yourself (as you'd define prepack in your own library to help with publishing).
ignore-scripts=true was meant for dependencies not your own package....
Locally
If you don't have ignore-scirpts=true:
npm pack
If you do have ignore-scripts=true:
npm run prepack
npm pack
before this change,
the built tgz is missing the pkg/node and pkg/standalone folders.
after this change,
the built tgz includes the pkg/node and pkg/standalone folders.
I've learned some things..
A difference between
npm
andpnpm
.pnpm
(correct): runs lifecycle scripts on your own package regardless of yourignore-scripts=true
in your.npmrc
.npm
(incorrect): ignores all lifecycle scripts whenignore-scripts=true
is present, including the obvious ones that you wrote yourself (as you'd define prepack in your own library to help with publishing).ignore-scripts=true
was meant for dependencies not your own package....Locally
If you don't have
ignore-scirpts=true
:If you do have
ignore-scripts=true
:before this change, the built tgz is missing the pkg/node and pkg/standalone folders.
after this change, the built tgz includes the pkg/node and pkg/standalone folders.