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

Packages without version in manifest ignored when sorting dependency graph #3933

Closed
rossng opened this issue Oct 31, 2021 · 1 comment · Fixed by #4112
Closed

Packages without version in manifest ignored when sorting dependency graph #3933

rossng opened this issue Oct 31, 2021 · 1 comment · Fixed by #4112
Assignees
Labels
area: monorepo Everything related to the pnpm workspace feature type: bug
Milestone

Comments

@rossng
Copy link

rossng commented Oct 31, 2021

pnpm version: 6.19.1

Code to reproduce the issue:

Not included, but I can probably put something together if desired. I found the easiest way to see this was to debug node ../<path-to-pnpm-repo>/pnpm/packages/pnpm/spnpm.js <script> -r from a pnpm monorepo I had locally.

Breakpoint location:

const versions = pkgs.filter(({ manifest }) => manifest.version)

Expected behavior:

If a workspace dependency is referenced with workspace:*, it should be added to the list of dependencies in the package graph - even if the target dependency is missing the version field in its manifest.

Actual behavior:

pnpm filters out all dependencies without a version field. This can cause recursive run to execute in non-topological order.

Additional information:

  • node -v prints:
  • Windows, macOS, or Linux?:
@zkochan zkochan added the area: monorepo Everything related to the pnpm workspace feature label Oct 31, 2021
@guillaumewuip
Copy link

guillaumewuip commented Nov 15, 2021

I've noticed too that with pnpm@6.19.1 or pnpm@6.22.1 in a monorepo where every local package dependency is configured via workspace:latest, recursive topological order is not respected so the commands using recursive or --recursive now fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: monorepo Everything related to the pnpm workspace feature type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants