-
-
Notifications
You must be signed in to change notification settings - Fork 958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prepublishOnly is ignored #3626
Comments
|
Thanks for your quick feedback! Sorry I don't get your point, maybe I explained it in the wrong way, let me try it differently. With the following steps I can reproduce it any time:
I have the following config in Note: my prepublishOnly script creates a Thanks in advance |
I see. So I guess the issue happens when using publishConfig
kboda ***@***.***> ezt írta (időpont: 2021. júl. 29., Cs
12:00):
… --ignore-scripts was always there. The scripts are executed by pnpm, they
should not be re-executed with npm.
Thanks for your quick feedback!
Sorry I don't get your point, maybe I explained it in the wrong way, let
me try it differently.
With the following steps I can reproduce it any time:
1.
npm install ***@***.*** -g
2.
from my project dir: pnpm publish
3.
it starts the prepublishOnly script, builds the stuff and publishes it
as expected 👍
4.
npm install ***@***.*** -g (I really like the new pnpm audit --fix
feature)
5.
from my project dir: pnpm publish
6.
it does not run the prepublishOnly script, but exits with this error
message:
No package.json (or package.yaml, or package.json5) was found in
"<path_to_my_package>\dist"
I have the following config in package.json:
"publishConfig": { "directory": "dist" }
I would expect pnpm to run the prepublishOnly script which actually
creates the dist folder.
Note: my prepublishOnly script creates a package.json file inside the dist
folder, and as I said, it works perfectly with the latest version, the
problem exists only in next, but I would really like to use it to have
the --fix flag for audit.
Thanks in advance
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3626 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOWTGZ5VIAUAMXCVTONSU3T2EKDZANCNFSM5BEQYRMA>
.
|
Yes, I can confirm this, it does not happen if I remove publishConfig. |
Thank you very much for fixing it so quickly, you do awesome work here, keep up! |
pnpm version: 6.11.1
Code to reproduce the issue:
add a
prepublishOnly
script to a projectExpected behavior:
pnpm publish
runs theprepublishOnly
scriptActual behavior:
pnpm publish
does not run theprepublishOnly
scriptAdditional information:
node -v
prints: v14.17.3npm -v
prints: 7.20.2in 6.10.3 it works as expected.
I have noticed that
--ignore-scipts
was added here: https://github.com/pnpm/pnpm/blame/bff84dbca25cacc052d02d8324f394f47cb07be9/packages/plugin-commands-publishing/src/publish.ts#L167Can this be the reason? Is it intended (and so the prepublishOnly script is ignored in the next version) or just accidentally left there?
The text was updated successfully, but these errors were encountered: