Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/pnpm.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ Note that you could call `npm.npm_translate_lock` more than once, if you have mo
## Hoisting

The `node_modules` tree laid out by `rules_js` should be bug-for-bug compatible with the `node_modules` tree that
pnpm lays out, when [hoisting](https://pnpm.io/npmrc#hoist) is disabled.
pnpm lays out, when [hoisting](https://pnpm.io/settings#hoist) is disabled.

To make the behavior outside of Bazel match, we recommend adding `hoist=false` to your `.npmrc`:
To make the behavior outside of Bazel match, we recommend adding `hoist: false` to your `pnpm-workspace.yaml`:

```shell
echo "hoist=false" >> .npmrc
echo "hoist: false" >> pnpm-workspace.yaml
Comment on lines +107 to +110

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve pnpm 9 hoist guidance

For users still on pnpm 9, this version-agnostic replacement no longer tells them how to disable hoisting: the repo still supports pnpm v9+ (npm_translate_lock requires lock_version at least 9.0 in npm/private/test/parse_pnpm_lock_tests.bzl, and e2e modules still pin pnpm_version = "9.15.9"), while the workspace-settings path is treated as pnpm v10+ in npm/private/npm_translate_lock_state.bzl. Those users will follow this new pnpm-workspace.yaml guidance and keep pnpm's hidden hoist folder enabled, so their local node_modules will not match rules_js; please keep the .npmrc instruction for pnpm 9 or call out the pnpm 10+/11-only behavior.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm 9.x docs are nowhere to be found. Suspect EOL?

```

This will prevent pnpm from creating a hidden `node_modules/.pnpm/node_modules` folder with hoisted
Expand Down
Loading