Skip to content

feat(setup-node): add cache input for npm caching#9

Open
GoogilyBoogily wants to merge 1 commit into
mainfrom
feat/npm-caching
Open

feat(setup-node): add cache input for npm caching#9
GoogilyBoogily wants to merge 1 commit into
mainfrom
feat/npm-caching

Conversation

@GoogilyBoogily
Copy link
Copy Markdown
Contributor

Summary

Adds a cache input to the setup-node composite action, threaded through to actions/setup-node@v6's built-in caching.

  • Default is "npm", so all existing consumers get caching with zero changes on their end
  • Set to empty string to disable caching
  • Cache key generation is handled automatically by actions/setup-node@v6 (hashes package-lock.json)

Test plan

  • Trigger CI in any consumer repo — second run shows "Cache hit" in setup-node logs
  • Confirm no consumers need to be updated

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds configurable dependency caching to the repo’s actions/setup-node composite action by exposing and wiring through the cache input to actions/setup-node@v6, allowing consumers to enable caching by default or disable it explicitly.

Changes:

  • Introduces a new cache input (default: "npm") on the composite action.
  • Passes the cache input through to the underlying actions/setup-node@v6 step.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants