diff --git a/README.md b/README.md index 0c554898..443849e2 100644 --- a/README.md +++ b/README.md @@ -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: '' diff --git a/__tests__/README.md b/__tests__/README.md index c1489843..e3ea789c 100644 --- a/__tests__/README.md +++ b/__tests__/README.md @@ -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 diff --git a/action.yml b/action.yml index 99db5869..3877f3b2 100644 --- a/action.yml +++ b/action.yml @@ -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: diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index bf62e071..12e59874 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -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.