Skip to content

Commit

Permalink
doc: copyedit corepack.md
Browse files Browse the repository at this point in the history
PR-URL: #42620
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and targos committed Jul 31, 2022
1 parent 1bfff39 commit a9e97fc
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions doc/api/corepack.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ This feature simplifies two core workflows:
### Enabling the feature

Due to its experimental status, Corepack currently needs to be explicitly
enabled to have any effect. To do that simply run [`corepack enable`][], which
will set up the symlinks in your environment, next to the `node` binary
enabled to have any effect. To do that, run [`corepack enable`][], which
will set up the symlinks in your environment next to the `node` binary
(and overwrite the existing symlinks if necessary).

From this point forward, any call to the [supported binaries][] will work
without further setup. Should you experience a problem, just run
without further setup. Should you experience a problem, run
[`corepack disable`][] to remove the proxies from your system (and consider
opening up an issue on the [Corepack repository][] to let us know).
opening an issue on the [Corepack repository][] to let us know).

### Configuring a package

Expand All @@ -57,7 +57,7 @@ successfully retrieved.
When running outside of an existing project (for example when running
`yarn init`), Corepack will by default use predefined versions roughly
corresponding to the latest stable releases from each tool. Those versions can
be easily overriden by running the [`corepack prepare`][] command along with the
be overriden by running the [`corepack prepare`][] command along with the
package manager version you wish to set:

```bash
Expand All @@ -73,8 +73,8 @@ it can conflict with such environments. To avoid that happening, call the
the same time you're preparing your deploy image). This will ensure that the
required package managers are available even without network access.

The `prepare` command has [various flags][], consult the detailed
[Corepack documentation][] for more information on the matter.
The `prepare` command has [various flags][]. Consult the detailed
[Corepack documentation][] for more information.

## Supported package managers

Expand All @@ -87,10 +87,10 @@ The following binaries are provided through Corepack:

## Common questions

### How does Corepack currently interact with npm?
### How does Corepack interact with npm?

While Corepack could easily support npm like any other package manager, its
shims aren't currently enabled by default. This has a few consequences:
While Corepack could support npm like any other package manager, its
shims aren't enabled by default. This has a few consequences:

* It's always possible to run a `npm` command within a project configured to
be used with another package manager, since Corepack cannot intercept it.
Expand All @@ -103,13 +103,13 @@ shims aren't currently enabled by default. This has a few consequences:
npm prevents accidentally overriding the Corepack binaries when doing a global
install. To avoid this problem, consider one of the following options:

* Don't run this command anymore; Corepack will provide the package manager
* Don't run this command; Corepack will provide the package manager
binaries anyway and will ensure that the requested versions are always
available, so installing the package managers explicitly isn't needed anymore.
available, so installing the package managers explicitly isn't needed.

* Add the `--force` flag to `npm install`; this will tell npm that it's fine to
override binaries, but you'll erase the Corepack ones in the process (should
that happen, run [`corepack enable`][] again to add them back).
override binaries, but you'll erase the Corepack ones in the process. (Run
[`corepack enable`][] to add them back.)

[Corepack]: https://github.com/nodejs/corepack
[Corepack documentation]: https://github.com/nodejs/corepack#readme
Expand Down

0 comments on commit a9e97fc

Please sign in to comment.