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
pnpm ≥ 7.20 runs prepublishOnly
even on --ignore-scripts
#5876
Comments
If you have a git-hosted dependency then it needs to be built. I don't think this can be changed. All we can do is to throw an exception if there is a git-hosted dependency that needs to be built and ignore-scripts is used. Related issue: #5826 |
The main problem is that
|
Looks like npm doesn't build the git-hosted dependencies when |
Thanks for fixing this, I highly appreciate all the hard work dedicated to pnpm 🙌 Unfortunately, v7.20 broke my CI pipeline as I’m trying to pull in moonlight-vscode-theme as a I could provide @zkochan is there a way to allowlist/blocklist scripts of certain packages, rather than either ignoring all or nothing? Thanks for your response in advance. |
Turns out my issue could be solved via `.pnpmfile.cjs: module.exports = {
hooks: {
readPackage: (pkg) => {
if (pkg.name === "moonlight") {
pkg.scripts = {};
}
return pkg;
},
},
}; |
@kripod I don't think it will work through There are currently two settings that control what projects are built: neverBuiltDependencies and onlyBuiltDependencies. Unfortunately, they currently don't work with git-hosted dependencies. |
@zkochan Thank you! 😊 I’ve tried the |
pnpm version:
7.22.0
Code to reproduce the issue:
I can’t reproduce it locally, but see on CI: https://github.com/evilmartians/oklch-picker/actions/runs/3831016173/jobs/6519618073
Expected behavior:
No
prepublishOnly
logs onpnpm install --frozen-lockfile --ignore-scripts
callActual behavior:
prepublishOnly
records (and a build error, but the whole build script should not be run).Additional information:
node -v
prints:18.12.1
The text was updated successfully, but these errors were encountered: