setup-node icon indicating copy to clipboard operation
setup-node copied to clipboard

Add node-version-file support for use-node-version in .npmrc files

Open kyle-leonhard opened this issue 9 months ago • 1 comments

Description: Add node-version-file support for determining the Node version from the use-node-version key of a .npmrc file. See the PNPM docs.

Here's an example .npmrc file:

use-node-version=23.10.0

Related issue: Resolves https://github.com/actions/setup-node/issues/1130

Check list:

  • [x] Mark if documentation changes are required.
  • [x] Mark if tests were added or updated to cover the changes.

kyle-leonhard avatar Mar 17 '25 22:03 kyle-leonhard

Hi @aparnajyothi-y , when you get a chance, please take a look! I forked this from https://github.com/actions/setup-node/pull/1149.

kyle-leonhard avatar Mar 19 '25 17:03 kyle-leonhard

Hi @aparnajyothi-y or @priya-kinthali, apologies for the follow ups, could I trouble you to peek at this PR?

kyle-leonhard avatar Apr 21 '25 15:04 kyle-leonhard

not sure if this is best suited for a separate PR, but pnpm also supports this setting via pnpm-workspace.yaml using camelCase key useNodeVersion

https://pnpm.io/settings#usenodeversion

sebws avatar May 01 '25 13:05 sebws

Hi @aparnajyothi-y or @priya-kinthali, apologies for the follow ups, could I trouble you to peek at this PR or suggest a reviewer?

kyle-leonhard avatar May 07 '25 02:05 kyle-leonhard

Hey @HarithaVattikuti, any chance I can nag you to take a look at this PR?

kyle-leonhard avatar May 26 '25 18:05 kyle-leonhard

@aparnajyothi-y can I nag you to give this PR a look?

kyle-leonhard avatar May 26 '25 18:05 kyle-leonhard

There is also:

executionEnv.nodeVersion field of package.json

and #1255

It is just a mess …

sdavids avatar Jul 11 '25 09:07 sdavids