actions / actions/setup-node

Include Node.js version in cache key

Open
#1,171 4 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
TypeScript
Stars
5k
Forks
1.7k
Avg merge
3d 12h
Merged PRs (30d)
2

Description

Description:
The Node.js version should be included in the cache key. The major version number, (e.g., 22 in 22.12) should be used to avoid unnecessary invalidation when upgrading to patch or minor versions.

This is similar to https://github.com/actions/setup-node/issues/1008.

Justification:
Some dependencies need to be rebuilt for specific Node versions. Reusing the cache for an older version results in dependency installation failures.

Are you willing to submit a PR?
Yes.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the related setup-node issue #1008 and locating cache-key construction and cache-related tests in this repository. Done means the key includes Node.js's major version, while patch and minor version changes do not unnecessarily invalidate it; run the relevant test suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, node.js, typescript
Domain
ci-cd, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.