Skip to content
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

Support running pnpm fetch without triggering package scripts #4453

Closed
1 task done
Silic0nS0ldier opened this issue Mar 20, 2022 · 1 comment · Fixed by #4460
Closed
1 task done

Support running pnpm fetch without triggering package scripts #4453

Silic0nS0ldier opened this issue Mar 20, 2022 · 1 comment · Fixed by #4460
Assignees

Comments

@Silic0nS0ldier
Copy link
Sponsor Contributor

Describe the user story

As a developer, I want to disable execution of package scripts, but cannot as no CLI flag nor config file option exists that applies to pnpm fetch.

Describe the solution you'd like

A lot of what happens in pnpm fetch also occurs in pnpm install, which makes sense given its purpose (splitting up download and install steps to enable better caching in differential systems like Docker or (in my case) the Please build system.

Holistically it would make sense that any pnpm install flags applicable to pnpm fetch be copied over. For the scope of this request however, bringing over --ignore-scripts would suffice.

Describe the drawbacks of your solution

pnpm fetch is experimental, so my request here my be standing at odds with the intended design. For all I know, its entirely possible that the command was not supposed to trigger package scripts (though the side effects cache being on by default in v7 implies this would not be the case).

Beyond that, the only drawback I see is a small increase to the source focused on a specific command. Something which wouldn't really apply for an alternative solution such as using a config file.

Stability shouldn't be impacted by this.

Describe alternatives you've considered

For my use case there are 3 options.

  1. Allow package scripts to run (failing currently as I haven't made NodeJS an input to the build step, but an easy change)
  2. Instead use pnpm install (much less granularity in build steps meaning more cache misses, need to redo integration)
  3. Create a much deeper API-level integration with Please (huge amount of effort, not justifiable for the current POC, may be done later on subject to justification e.g. project size, reuse in other projects).
@Silic0nS0ldier Silic0nS0ldier changed the title Support --ignore-scripts in pnpm fetch command Support running pnpm fetch without triggering package scripts Mar 20, 2022
@zkochan
Copy link
Member

zkochan commented Mar 21, 2022

--ignore-scripts already works, just run pnpm fetch --config.ignore-scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants