Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

turbo prune pnpm peer dependency repro

This repository reproduces a Turborepo lockfile pruning regression.

Reproduction

corepack enable
corepack prepare pnpm@11.5.3 --activate
pnpm install --lockfile-only --frozen-lockfile

pnpm dlx turbo@2.9.16 prune script-runner --docker --out-dir out-216
cd out-216/json
cp ../pnpm-lock.yaml ./pnpm-lock.yaml
pnpm install --frozen-lockfile

cd ../..
pnpm dlx turbo@2.9.17 prune script-runner --docker --out-dir out-217
cd out-217/json
cp ../pnpm-lock.yaml ./pnpm-lock.yaml
pnpm install --frozen-lockfile

cd ../..
pnpm dlx turbo@2.9.18 prune script-runner --docker --out-dir out-218
cd out-218/json
cp ../pnpm-lock.yaml ./pnpm-lock.yaml
pnpm install --frozen-lockfile

cd ../..
pnpm dlx turbo@2.9.19-canary.5 prune script-runner --docker --out-dir out-canary
cd out-canary/json
cp ../pnpm-lock.yaml ./pnpm-lock.yaml
pnpm install --frozen-lockfile

Expected: all installs pass.

Actual:

  • Turbo 2.9.16 passes.
  • Turbo 2.9.17 fails with ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY.
  • Turbo 2.9.18 fails with ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY.
  • Turbo 2.9.19-canary.5 fails with ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY.

Turbo 2.9.17+ drops the peer-resolved @nestjs/throttler package and snapshot entries from the pruned lockfile while keeping an importer reference to that version. The current canary at the time of verification, 2.9.19-canary.5, still has the issue.

Lockfile diff

The 2.9.16 pruned lockfile contains these entries:

packages:
  '@nestjs/throttler@6.5.0': ...

snapshots:
  ? '@nestjs/throttler@6.5.0(@nestjs/common@11.1.26(...))(@nestjs/core@11.1.26(...))(reflect-metadata@0.2.2)'
  : ...

The 2.9.17 and 2.9.18 pruned lockfiles keep the importer dependency but drop both entries above.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors