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

node-linker=hoisted support autoinstallpeers #6680

Merged
merged 3 commits into from Jun 17, 2023

Conversation

2239559319
Copy link
Contributor

PeerDependencies should be installed when autoInstallPeers is set to true and nodeLinker is set to hoisted.

@2239559319 2239559319 requested a review from zkochan as a code owner June 15, 2023 09:42
@zkochan
Copy link
Member

zkochan commented Jun 17, 2023

I don't understand what this PR is fixing. I just tested this package.json:

{
  "name": "foo",
  "version": "1.0.0",
  "peerDependencies": {
    "is-odd": "*"
  }
}

With this .npmrc:

node-linker=hoisted

is-odd is installed in the root of node_modules.

@2239559319
Copy link
Contributor Author

I don't understand what this PR is fixing. I just tested this package.json:

{
  "name": "foo",
  "version": "1.0.0",
  "peerDependencies": {
    "is-odd": "*"
  }
}

With this .npmrc:

node-linker=hoisted

is-odd is installed in the root of node_modules.

I don't understand what this PR is fixing. I just tested this package.json:

{
  "name": "foo",
  "version": "1.0.0",
  "peerDependencies": {
    "is-odd": "*"
  }
}

With this .npmrc:

node-linker=hoisted

is-odd is installed in the root of node_modules.

When autoinstallpeers is set to true, not only the peerDependencies of the rootProject will be installed, but also the peerDependencies of the depedencies will be installed.

react is a peerDependency of react-dom. When autoInstallPeers is true to install react-dom, react will be installed automatically.

{
  "name": "foo",
  "version": "1.0.0",
  "dependencies": {
    "react-dom": "18.2.0"
  }
}

react should be installed in the root of node_modules.

@zkochan zkochan merged commit 59aba9e into pnpm:main Jun 17, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants