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

[rush] strictPeerDependencies is not enforced for monorepo packages #1865

Closed
1 of 2 tasks
dfee opened this issue May 12, 2020 · 5 comments
Closed
1 of 2 tasks

[rush] strictPeerDependencies is not enforced for monorepo packages #1865

dfee opened this issue May 12, 2020 · 5 comments
Labels
bug Something isn't working as intended repro confirmed The issue comments included repro instructions, and the maintainers reproduced the problem

Comments

@dfee
Copy link

dfee commented May 12, 2020

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

Is this a feature or a bug?

  • Feature
  • Bug

Please describe the actual behavior.
If you've got @mono/package-a that has a peerDependency on foo, you can install it into another project @mono/package-b (while strictPeerDependencies=true and you won't get an error.

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.

What is the expected behavior?

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

  • Tool: Rush
  • Tool Version: 5.23.1
  • Node Version: 12.16.3
    • Is this a LTS version? Yes
    • Have you tested on a LTS version? ...
  • OS: Ubuntu / MacOS
@dfee
Copy link
Author

dfee commented May 12, 2020

Here's an example: https://github.com/dfee/rush-issues/tree/peer-deps

You'll notice that service-b relies on lib-b which has a peer-dep on luxon. Rush doesn't seem to mind.

@iclanton iclanton added bug Something isn't working as intended repro confirmed The issue comments included repro instructions, and the maintainers reproduced the problem labels May 13, 2020
@iclanton
Copy link
Member

Thanks for reporting this. Looks like this is an issue. @D4N14L - this will probably be fixed by the workspaces work that you're doing. Can you explicitly test this?

@iclanton iclanton changed the title strictPeerDependencies is not enforced for monorepo packages [rush] strictPeerDependencies is not enforced for monorepo packages May 13, 2020
@D4N14L
Copy link
Member

D4N14L commented Jul 13, 2020

Closing out, this is resolved when using PNPM workspaces (see #1938)

@D4N14L D4N14L closed this as completed Jul 13, 2020
@dietergeerts
Copy link

This is closed, though it still doesn't seem to work. The docs also doesn't tell more about how to actually get it working. My config:

{
  "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
  "rushVersion": "5.26.0",
  "pnpmVersion": "5.2.6",
  "pnpmOptions": {
    "strictPeerDependencies": true
  },
  "nodeSupportedVersionRange": ">=12.0.0 <13.0.0",
  "ensureConsistentVersions": true,

@D4N14L
Copy link
Member

D4N14L commented Aug 31, 2020

This is closed, though it still doesn't seem to work. The docs also doesn't tell more about how to actually get it working.

This is intentional. The feature is still experimental. However, if you would like to try it out, it can be enabled by setting:

"pnpmOptions": {
   "useWorkspaces": true
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended repro confirmed The issue comments included repro instructions, and the maintainers reproduced the problem
Projects
Archived in project
Development

No branches or pull requests

4 participants