Documentation update

This commit is contained in:
Aparna Jyothi 2025-03-10 18:19:35 +05:30
parent f338189333
commit e91964252d
24 changed files with 94 additions and 5914 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +1,4 @@
# setup-node
[![basic-validation](https://github.com/actions/setup-node/actions/workflows/basic-validation.yml/badge.svg)](https://github.com/actions/setup-node/actions/workflows/basic-validation.yml)
@ -76,6 +77,10 @@ See [action.yml](action.yml)
# Set always-auth option in npmrc file.
# Default: ''
always-auth: ''
# Optional mirror to download nodejs binaries from.
# Default: ''
mirror-url: ''
```
<!-- end usage -->
@ -86,7 +91,7 @@ steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
- run: npm ci
- run: npm test
```
@ -103,7 +108,7 @@ The `node-version` input supports the Semantic Versioning Specification, for mor
Examples:
- Major versions: `18`, `20`
- Major versions: `20`, `22`
- More specific versions: `10.15`, `16.15.1` , `18.4.0`
- NVM LTS syntax: `lts/erbium`, `lts/fermium`, `lts/*`, `lts/-n`
- Latest release: `*` or `latest`/`current`/`node`
@ -163,7 +168,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 14, 16, 18 ]
node: [ 18, 20, 22 ]
name: Node ${{ matrix.node }} sample
steps:
- uses: actions/checkout@v4
@ -203,6 +208,7 @@ If the runner is not able to access github.com, any Nodejs versions requested du
- [Publishing to npmjs and GPR with npm](docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-npm)
- [Publishing to npmjs and GPR with yarn](docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-yarn)
- [Using private packages](docs/advanced-usage.md#use-private-packages)
- [Using mirror-url)](https://github.com/aparnajyothi-y/setup-node/edit/add-mirror-url/docs/advanced-usage.md#node-mirrors-nodejs-version-mirrors)
## Recommended permissions
@ -224,3 +230,5 @@ Contributions are welcome! See [Contributor's Guide](docs/contributors.md)
## Code of Conduct
:wave: Be nice. See [our code of conduct](CODE_OF_CONDUCT.md)

2905
dist/cache-save/index.js vendored

File diff suppressed because it is too large Load Diff

2905
dist/setup/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,5 @@
## Working with lockfiles
All supported package managers recommend that you **always** commit the lockfile, although implementations vary doing so generally provides the following benefits:
@ -76,10 +78,10 @@ When using the `package.json` input, the action will look for `volta.node` first
```json
{
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"volta": {
"node": "16.0.0"
"node": "22.0.0"
}
}
```
@ -100,7 +102,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '22'
architecture: 'x64' # optional, x64 or x86. If not specified, x64 will be used by default
- run: npm ci
- run: npm test
@ -239,7 +241,7 @@ steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '22'
cache: 'yarn'
- run: yarn install --frozen-lockfile # optional, --immutable
- run: yarn test
@ -261,7 +263,7 @@ steps:
version: 6.32.9
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '22'
cache: 'pnpm'
- run: pnpm install
- run: pnpm test
@ -277,7 +279,7 @@ steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '22'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- run: npm ci
@ -290,7 +292,7 @@ steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '22'
cache: 'npm'
cache-dependency-path: |
server/app/package-lock.json
@ -312,9 +314,9 @@ jobs:
- macos-latest
- windows-latest
node_version:
- 12
- 14
- 16
- 18
- 20
- 22
architecture:
- x64
# an extra windows-x86 run:
@ -340,7 +342,7 @@ steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14.x'
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
@ -360,7 +362,7 @@ steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14.x'
node-version: '22'
registry-url: <registry url>
- run: yarn install --frozen-lockfile
- run: yarn publish
@ -380,7 +382,7 @@ steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14.x'
node-version: '22'
registry-url: 'https://registry.npmjs.org'
# Skip post-install scripts here, as a malicious
# script could steal NODE_AUTH_TOKEN.
@ -418,3 +420,15 @@ Please refer to the [Ensuring workflow access to your package - Configuring a pa
### 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.
### Using mirror-url
You can use the new mirror-url parameter to specify a custom mirror for downloading node.js versions from a different location
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
mirror-url: 'https://mirror.example.com/node'
```

142
package-lock.json generated
View File

@ -9,7 +9,7 @@
"version": "4.0.0",
"license": "MIT",
"dependencies": {
"@actions/cache": "^4.0.0",
"@actions/cache": "^4.0.2",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1",
@ -49,9 +49,9 @@
}
},
"node_modules/@actions/cache": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-4.0.0.tgz",
"integrity": "sha512-WIuxjnZ44lNYtIS4fqSaYvF00hORdy3cSin+jx8xNgBVGWnNIAiCBHjlwusVQlcgExoQC9pHXGrDsZyZr7rCDQ==",
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-4.0.2.tgz",
"integrity": "sha512-cBr7JL1q+JKjbBd3w3SZN5OQ1Xg+/D8QLMcE7MpgpghZlL4biBO0ZEeraoTxCZyfN0YY0dxXlLgsgGv/sT5BTg==",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.11.1",
@ -63,8 +63,7 @@
"@azure/ms-rest-js": "^2.6.0",
"@azure/storage-blob": "^12.13.0",
"@protobuf-ts/plugin": "^2.9.4",
"semver": "^6.3.1",
"twirp-ts": "^2.5.0"
"semver": "^6.3.1"
}
},
"node_modules/@actions/cache/node_modules/@actions/glob": {
@ -2488,16 +2487,6 @@
"node": ">=6"
}
},
"node_modules/camel-case": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz",
"integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==",
"license": "MIT",
"dependencies": {
"pascal-case": "^3.1.2",
"tslib": "^2.0.3"
}
},
"node_modules/camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
@ -2632,15 +2621,6 @@
"node": ">= 0.8"
}
},
"node_modules/commander": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz",
"integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==",
"license": "MIT",
"engines": {
"node": ">= 6"
}
},
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@ -2788,19 +2768,6 @@
"node": ">=6.0.0"
}
},
"node_modules/dot-object": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/dot-object/-/dot-object-2.1.5.tgz",
"integrity": "sha512-xHF8EP4XH/Ba9fvAF2LDd5O3IITVolerVV6xvkxoM8zlGEiCUrggpAnHyOoKJKCrhvPcGATFAUwIujj7bRG5UA==",
"license": "MIT",
"dependencies": {
"commander": "^6.1.0",
"glob": "^7.1.6"
},
"bin": {
"dot-object": "bin/dot-object"
}
},
"node_modules/electron-to-chromium": {
"version": "1.4.563",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.563.tgz",
@ -3363,7 +3330,8 @@
"node_modules/fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
"dev": true
},
"node_modules/fsevents": {
"version": "2.3.3",
@ -3431,6 +3399,7 @@
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"dev": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@ -3598,6 +3567,7 @@
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"dev": true,
"dependencies": {
"once": "^1.3.0",
"wrappy": "1"
@ -3606,7 +3576,8 @@
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true
},
"node_modules/is-arrayish": {
"version": "0.2.1",
@ -4457,12 +4428,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"license": "MIT"
},
"node_modules/lodash.memoize": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
@ -4475,15 +4440,6 @@
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
"dev": true
},
"node_modules/lower-case": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
"integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
"license": "MIT",
"dependencies": {
"tslib": "^2.0.3"
}
},
"node_modules/lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
@ -4608,16 +4564,6 @@
"integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==",
"dev": true
},
"node_modules/no-case": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
"integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
"license": "MIT",
"dependencies": {
"lower-case": "^2.0.2",
"tslib": "^2.0.3"
}
},
"node_modules/node-fetch": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
@ -4779,16 +4725,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/pascal-case": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
"integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==",
"license": "MIT",
"dependencies": {
"no-case": "^3.0.4",
"tslib": "^2.0.3"
}
},
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@ -4802,6 +4738,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
@ -4821,12 +4758,6 @@
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"node_modules/path-to-regexp": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz",
"integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==",
"license": "MIT"
},
"node_modules/path-type": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
@ -4940,6 +4871,7 @@
"version": "2.8.8",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
},
@ -5466,16 +5398,6 @@
}
}
},
"node_modules/ts-poet": {
"version": "4.15.0",
"resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-4.15.0.tgz",
"integrity": "sha512-sLLR8yQBvHzi9d4R1F4pd+AzQxBfzOSSjfxiJxQhkUoH5bL7RsAC6wgvtVUQdGqiCsyS9rT6/8X2FI7ipdir5g==",
"license": "Apache-2.0",
"dependencies": {
"lodash": "^4.17.15",
"prettier": "^2.5.1"
}
},
"node_modules/tslib": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
@ -5510,35 +5432,6 @@
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
}
},
"node_modules/twirp-ts": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/twirp-ts/-/twirp-ts-2.5.0.tgz",
"integrity": "sha512-JTKIK5Pf/+3qCrmYDFlqcPPUx+ohEWKBaZy8GL8TmvV2VvC0SXVyNYILO39+GCRbqnuP6hBIF+BVr8ZxRz+6fw==",
"license": "MIT",
"dependencies": {
"@protobuf-ts/plugin-framework": "^2.0.7",
"camel-case": "^4.1.2",
"dot-object": "^2.1.4",
"path-to-regexp": "^6.2.0",
"ts-poet": "^4.5.0",
"yaml": "^1.10.2"
},
"bin": {
"protoc-gen-twirp_ts": "protoc-gen-twirp_ts"
},
"peerDependencies": {
"@protobuf-ts/plugin": "^2.5.0",
"ts-proto": "^1.81.3"
},
"peerDependenciesMeta": {
"@protobuf-ts/plugin": {
"optional": true
},
"ts-proto": {
"optional": true
}
}
},
"node_modules/type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@ -5780,15 +5673,6 @@
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
"dev": true
},
"node_modules/yaml": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
"license": "ISC",
"engines": {
"node": ">= 6"
}
},
"node_modules/yargs": {
"version": "17.7.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",

View File

@ -25,7 +25,7 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@actions/cache": "^4.0.0",
"@actions/cache": "^4.0.2",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1",