Skip to content

fix(cached-node-modules): read node-version when building the cache key - #265

Merged
dreamorosi merged 1 commit into
mainfrom
fix/cached-node-modules-cache-key
Sep 7, 2026
Merged

fix(cached-node-modules): read node-version when building the cache key#265
dreamorosi merged 1 commit into
mainfrom
fix/cached-node-modules-cache-key

Conversation

@svozza

@svozza svozza commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

v1.5.0 renamed the cached-node-modules input from nodeVersion to node-version but left the cache key reading the old name. inputs.nodeVersion evaluates to an empty string, so every key is -node-modules-<lockfile hash> and all Node.js matrix cells share one node_modules cache per lockfile. This restores the version prefix so each Node.js version gets its own cache, as the input's description promises.

Changes

  • Read inputs.node-version instead of inputs.nodeVersion when building the actions/cache key.

Existing caches are invalidated once, since the key shape changes back to <version>-node-modules-<hash>.

Issue number: closes #264


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

v1.5.0 renamed the input from nodeVersion to node-version but left the
cache key reading the old name, so the version was always empty and
every Node.js matrix cell shared one cache per lockfile.

Closes #264
@dreamorosi
dreamorosi merged commit 81453ca into main Sep 7, 2026
10 checks passed
@dreamorosi
dreamorosi deleted the fix/cached-node-modules-cache-key branch September 7, 2026 20:05
@powertools-for-aws-oss-automation

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: cached-node-modules ignores node-version in the cache key

2 participants