Skip to content

Commit 0fed151

Browse files
committed
fixup! doc: clarify some points around Corepack
1 parent ed3f421 commit 0fed151

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

doc/api/corepack.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,18 @@ The following binaries are provided through Corepack:
7878
| [Yarn][] | `yarn`, `yarnpkg` |
7979
| [pnpm][] | `pnpm`, `pnpx` |
8080

81-
## Troubleshooting
81+
## Common questions
82+
83+
### How does Corepack currently interact with npm?
84+
85+
While Corepack could easily support npm like any other package manager, its
86+
shims aren't currently enabled by default. This has a few consequences:
87+
88+
* It's always possible to run a `npm` command within a project configured to
89+
be used with another package manager, since Corepack cannot intercept it.
90+
91+
* While `npm` is a valid option in the [`"packageManager"`][] property, the
92+
lack of shim will cause the global npm to be used.
8293

8394
### Running `npm install -g yarn` doesn't work
8495

doc/api/packages.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,9 @@ tool called [Corepack][] that aims to make all package managers transparently
167167
available in your environment - provided you have Node.js installed.
168168

169169
By default Corepack won't enforce any specific package manager and will use
170-
generic "Last Known Good" versions, but you can improve this experience by
171-
setting the [`"packageManager"`][] field in your project's `package.json`.
170+
the generic "Last Known Good" versions associated with each Node.js release,
171+
but you can improve this experience by setting the [`"packageManager"`][] field
172+
in your project's `package.json`.
172173

173174
## Package entry points
174175

0 commit comments

Comments
 (0)