Allow set of directories present to change without affecting lock file #4108
youngderekm
started this conversation in
Ideas
Replies: 1 comment
-
|
I wonder how |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have a code base where different projects use different subsets of all possible source directories. Some collection of top level directories is checked out on developer machines and/or build machines. Some directories are common to different builds, but some only appear in one or two of these builds.
pnpm seems to be fine with directories in pnpm-workspace.yaml that aren't present in the file system (as would be the case when a developer only has a subset of the directories). If the build uses "pnpm install --frozen-lockfile", install works and the lockfile remains unchanged.
However, if you just use "pnpm install", or use "pnpm add" to modify a set of packages, the lockfile is updated and sections for any directory not currently on disk are removed from the file. If the developer adds a package, then commits the lockfile, then other developers end up with relevant pieces of the lock file removed.
If there was a mode where sections of the lock file weren't removed as long as they're explicitly listed in pnpm-workspace.yaml (without wildcards), then this would solve our problem. Sections of the lock file would only be removed if the directory is removed from pnpm-workspace.yaml, and pnpm operations could be run even if only a subset of the directories was present.
Is there any other way to work around this issue?
Beta Was this translation helpful? Give feedback.
All reactions