Skip to content

[rush] Rush doesn't support PNPM Workspace Ranges yet? #1498

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

Open
1 task
joeljeske opened this issue Aug 31, 2019 · 4 comments
Open
1 task

[rush] Rush doesn't support PNPM Workspace Ranges yet? #1498

joeljeske opened this issue Aug 31, 2019 · 4 comments
Labels
enhancement The issue is asking for a new feature or design change needs design The next step is for someone to propose the details of an approach for solving the problem

Comments

@joeljeske
Copy link

Please prefix the issue title with the project name i.e. [rush], [api-extractor] etc.

Is this a feature or a bug?

  • Feature
  • [ X] Bug

Please describe the actual behavior.

I would like to use the recently added Workspace Ranges from PNPM inside my rush mono repo.

Currently, after upgrading to pnpm v3.7.5 and using a dependency in my project as version workspace:*, I get the error;

ERROR  No matching version found for my-example-package-name@* inside the workspace

If the issue is a bug, how can we reproduce it? Please provide detailed steps and include a GitHub branch if applicable. Your issue will get resolved faster if you can make it easy to investigate.

Mark a dependency version as "workspace:*" instead of a normal semver range and attempt to rush update

What is the expected behavior?

Workspace ranges should work as PNPM documents.

If this is a bug, please provide the tool version, Node.js version, and OS.

  • Tool: Rush
  • Tool Version: 5.11.4
  • Node Version: 8.15..1
    • Is this a LTS version? Yes
    • Have you tested on a LTS version? Yes
  • OS: macOS 10.14.4
@iclanton iclanton changed the title Rush doesn't support PNPM Workspace Ranges yet? [rush] Rush doesn't support PNPM Workspace Ranges yet? Sep 4, 2019
@rakeshpatnaik rakeshpatnaik added the enhancement The issue is asking for a new feature or design change label Sep 4, 2019
@iclanton iclanton added the needs design The next step is for someone to propose the details of an approach for solving the problem label Sep 4, 2019
@iclanton
Copy link
Member

iclanton commented Sep 4, 2019

I think this is more of an enhancement than a bug. We've been talking about better supporting the workspace features of pnpm/yarn.

We should prototype this, @octogonz.

@joeljeske
Copy link
Author

Interesting. Maybe I do not understand the difference between rush and PNPM workspaces. I would have thought that rush used PNPM workspaces and build on top of it.

Could you explain the difference with my assumption and reality?

I am coming from Lerna which leverages yarn workspaces.

@kloy
Copy link

kloy commented Sep 6, 2019

This would be a great addition. It would really cut down on merge conflicts for package.json files in popular directories.

@octogonz
Copy link
Collaborator

octogonz commented Sep 6, 2019

Maybe I do not understand the difference between rush and PNPM workspaces. I would have thought that rush used PNPM workspaces and build on top of it.

Rush existed long before PNPM and Yarn implemented their workspace features. Rush's approach is to install all the packages centrally in the common/temp folder, and then Rush creates its own symlinks from each project into common/temp. PNPM workspaces is essentially equivalent, but some work would be required to integrate it with Rush's other features.

Classic Yarn/Lerna essentially just installs everything in the repo root (which they call "hoisting"). This approach is vulnerable to the phantom/doppelganger problems. Yarn Plug'n'Play solves that problem, but it's relatively new.

Anyway nowadays the package managers all support monorepos relatively well, so Rush is planning to delegate this role to the package manager. See #886 (comment) for more info.

@iclanton iclanton moved this to Needs Investigation in Bug Triage Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is asking for a new feature or design change needs design The next step is for someone to propose the details of an approach for solving the problem
Projects
Status: Needs Investigation
Development

No branches or pull requests

5 participants