mirror of
https://github.com/actions/setup-node.git
synced 2025-07-04 00:24:58 +00:00
update docs
This commit is contained in:
parent
9a425941d6
commit
d1f29d3cd9
2 changed files with 19 additions and 4 deletions
|
@ -306,9 +306,9 @@ NOTE: As per https://github.com/actions/setup-node/issues/49 you cannot use `sec
|
|||
### always-auth input
|
||||
The always-auth input sets `always-auth=true` in .npmrc file. With this option set [npm](https://docs.npmjs.com/cli/v6/using-npm/config#always-auth)/yarn sends the authentication credentials when making a request to the registries.
|
||||
|
||||
## Automatically enable `corepack`
|
||||
## Enable and/or configure `corepack`
|
||||
|
||||
_Requires Node >=14.19.0
|
||||
_Requires Node >=14.19 or >=16.9_
|
||||
|
||||
`corepack` is a new experimental feature that automatically installs package managers as they are used. [Read more about it here](https://nodejs.org/docs/latest/api/corepack.html)
|
||||
|
||||
|
@ -327,9 +327,24 @@ e.g.
|
|||
```json
|
||||
{
|
||||
"name": "example",
|
||||
"packageManager": "pnpm@7.9.5",
|
||||
"packageManager": "pnpm@7.13.2",
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
Passing anything but `true` will pass the options to the `corepack enable` command:
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14.x'
|
||||
corepack: npm
|
||||
```
|
||||
|
||||
will call
|
||||
|
||||
```shell
|
||||
corepack enable npm
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue