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
I've got an app A which uses B as a dependency (using pnpm workspace).
I need the devDeps of A to be included in my CI, so I used the includeDevDependencies flag. The deps are correctly kept in package.json and pnpm-lock.yaml
However, the devDependencies of B are also kept in the pnpm-lock.yaml, but are not kept in B's package.json.
Creating a isolate.config.json file with {includeDevDependencies: true} in B does not change this behaviour.
I guess the most simple choice would be to trim all devDependencies except those of the isolated package in pnpm-lock.yaml?
The text was updated successfully, but these errors were encountered:
@RDeluxe The feature was aimed solely at keeping the dev dependencies for you main package (A).
I struggle to see the use-case for needing dev dependencies for sub-dependencies.
As far as the lockfile goes, I suspect it was just easy to keep all the dev dependencies in there. I personally do not see the problem with having them in the lockfile.
Could you elaborate on why you need the dev dependencies from your internal / sub-dependencies?
I agree, I feel like it should only keep the devDeps of the main package.
But having all devDeps in the lock file will throw a "frozen lockfile error" with PNPM in CI, which forces me to regenerate a lockfile before install. That partially defeats the purpose of isolating my package.
Ah right, yes it definitely isn't supposed to cause a frozen lockfile error. Seems like this feature was not properly tested at the time, and possibly you are the first to use it 😄
0x80
changed the title
includeDevDependencies includes deps devDependencies in lockfile but removes them from package.json
The includeDevDependencies option results in incorrect lockfile
Jan 11, 2025
I've got an app A which uses B as a dependency (using pnpm workspace).
I need the devDeps of A to be included in my CI, so I used the
includeDevDependencies
flag. The deps are correctly kept inpackage.json
andpnpm-lock.yaml
However, the devDependencies of B are also kept in the
pnpm-lock.yaml
, but are not kept in B'spackage.json
.Creating a
isolate.config.json
file with{includeDevDependencies: true}
in B does not change this behaviour.I guess the most simple choice would be to trim all devDependencies except those of the isolated package in
pnpm-lock.yaml
?The text was updated successfully, but these errors were encountered: