1
0
Fork 0
mirror of https://github.com/actions/setup-node synced 2025-03-31 22:30:57 +00:00

Update documentation

This commit is contained in:
Kyle Leonhard 2025-03-19 09:38:27 -07:00
parent 7cfc90cf21
commit 9aee14b09c
4 changed files with 4 additions and 4 deletions

View file

@ -25,7 +25,7 @@ See [action.yml](action.yml)
# Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node
node-version: ''
# File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions.
# File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions, .npmrc.
# If node-version and node-version-file are both provided the action will use version from node-version.
node-version-file: ''

View file

@ -2,7 +2,7 @@ Files located in data directory are used only for testing purposes.
## Here the list of files in the data directory
- `.nvmrc`, `.tools-versions` and `package.json` are used to test node-version-file logic
- `.nvmrc`, `.tools-versions`, `package.json` and `.npmrc` are used to test node-version-file logic
- `package-lock.json`, `pnpm-lock.yaml` and `yarn.lock` are used to test cache logic
- `versions-manifest.json` is used for unit testing to check downloading Node.js versions from the node-versions repository.
- `node-dist-index.json` is used for unit testing to check downloading Node.js versions from the official site. The file was constructed from https://nodejs.org/dist/index.json

View file

@ -8,7 +8,7 @@ inputs:
node-version:
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.'
node-version-file:
description: 'File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions.'
description: 'File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions, .npmrc.'
architecture:
description: 'Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.'
check-latest:

View file

@ -56,7 +56,7 @@ steps:
## Node version file
The `node-version-file` input accepts a path to a file containing the version of Node.js to be used by a project, for example `.nvmrc`, `.node-version`, `.tool-versions`, or `package.json`. If both the `node-version` and the `node-version-file` inputs are provided then the `node-version` input is used.
The `node-version-file` input accepts a path to a file containing the version of Node.js to be used by a project, for example `.nvmrc`, `.node-version`, `.tool-versions`, `package.json`, or `.npmrc`. If both the `node-version` and the `node-version-file` inputs are provided then the `node-version` input is used.
See [supported version syntax](https://github.com/actions/setup-node#supported-version-syntax).
> The action will search for the node version file relative to the repository root.