You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add ‑‑no‑save CLI option for the pnpm add command #2020
I don't think it is worth adding but I don't have objections. However, --no-save will also need to prevent saving changes to the wanted lockfile (changes should be still done to node_modules/.pnpm-lock.yaml). And these not saved deps will be removed on running pnpm install
Reacted by ExE Boss, Manuel Lopez, Thiago Oliveira Santos and Ferdinand Prantl
I think I need that one as well, to create a script that install peer dependencies packages in a monorepo. This would prevent multiple copies of a package as we were using the devDependencies to install peerDependencies (like people do with a single package repo).
Any update on the implementation?
Reacted by Thiago Oliveira Santos and Kari Söderholm
For @rollup/plugin-typescript we have to simulate a user not having a particular dependency during a test and are using execa to remove and then add the dependency back. The kicker is that the particular dep is a workspace root dependency, and we'd like to keep it that way. We've resorted to running git checkout pnpm-lock.yml after adding the dependency back. It's not a burdensome extra step, but a --no-save option would come in handy, and I'm leveraging that in a few other webpack plugins I maintain to run v4 and v5 tests without effecting the repo's package and package-lock files.
Reacted by ExE Boss, Thiago Oliveira Santos, Camo30, tmm, Aankhen and Ryan Ku
@zkochan I need that one as well: to install temporary needed packages in a monorepo without modifying the package file. Currently a workaround is necessary to accomplish this and it would be great to get rid of that.
Reacted by ExE Boss, Kari Söderholm, Oleh Vanin, lsdsjy, Arno Schlipf, Aankhen and Ryan Ku
Activity
zkochan commentedon Sep 19, 2019
pnpx dts-gen --dt module <temp-package>won't work?ExE-Boss commentedon Sep 19, 2019
No, because
dts‑genneeds the<temp‑package>to be installed.Also, it´s:
zkochan commentedon Sep 19, 2019
There was a discussion about it here also: #1237
I don't think it is worth adding but I don't have objections. However,
--no-savewill also need to prevent saving changes to the wanted lockfile (changes should be still done tonode_modules/.pnpm-lock.yaml). And these not saved deps will be removed on runningpnpm installExE-Boss commentedon Aug 31, 2020
@zkochan
Now that
save = falseis supported in.npmrc, it should be possible to enable support for the‑‑no‑saveCLI option forpnpm add.zkochan commentedon Aug 31, 2020
One change is still needed. The lockfile should not be modified when no save is set
soundstep commentedon Oct 6, 2020
I think I need that one as well, to create a script that install peer dependencies packages in a monorepo. This would prevent multiple copies of a package as we were using the devDependencies to install peerDependencies (like people do with a single package repo).
Any update on the implementation?
shellscape commentedon Feb 5, 2021
For
@rollup/plugin-typescriptwe have to simulate a user not having a particular dependency during a test and are usingexecato remove and then add the dependency back. The kicker is that the particular dep is a workspace root dependency, and we'd like to keep it that way. We've resorted to runninggit checkout pnpm-lock.ymlafter adding the dependency back. It's not a burdensome extra step, but a--no-saveoption would come in handy, and I'm leveraging that in a few other webpack plugins I maintain to run v4 and v5 tests without effecting the repo's package and package-lock files.Camo30 commentedon Jul 5, 2021
@zkochan I need that one as well: to install temporary needed packages in a monorepo without modifying the package file. Currently a workaround is necessary to accomplish this and it would be great to get rid of that.
0liver commentedon Feb 8, 2023
@ExE-Boss Please link to the docs for this feature because I cannot find it here: https://pnpm.io/npmrc.
antitoxic commentedon Oct 27, 2024
Adding this for future reference, in our project we have some weird cases where we need such transient installs so we use:
which doesn't touch the lock file.
silverwind commentedon Sep 4, 2025
Duplicate of #1237.
Fix node lint actions
Fix node lint actions (#1285)
zkochan commentedon Sep 19, 2026
Closing as a duplicate of #1237 (2018-06-21), which is the older report of the same thing.
Both ask for
--no-save: install or add a package without writing it into package.json.Follow #1237 for this. If you think the two differ in a way that matters, say so here and we will reopen.
Written by an agent (Claude Code, claude-opus-5).