Enhance caching in setup-node with automatic package manager detection by priya-kinthali · Pull Request #1348 · actions/setup-node
and others added 7 commits
December 11, 2023 18:20Copilot AI review requested due to automatic review settings
August 22, 2025 11:11renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request
Sep 5, 2025josephfrazier added a commit to josephfrazier/reported-web that referenced this pull request
Sep 9, 2025…dependency caching See actions/setup-node#1348: > **Description:** This PR improves the caching behaviour in setup-node by introducing enhanced logic for detecting and enabling caching based on the package manager field in package.json when the cache input is not explicitly set. > > Key changes: > > * Updated the caching behaviour to be enabled by default when a `packageManager` field is detected in the `package.json` file and no `cache` input is provided. > > * Introduced a new input `package-manager-cache` to control this automatic caching behaviour. By default, `package-manager-cache` is set to `true`, enabling caching when a valid package manager field is detected. To disable this automatic caching, set `package-manager-cache` to `false`. > > * Updated documentation to reflect the new default caching behaviour and the addition of the `package-manager-cache` input.
josephfrazier added a commit to josephfrazier/reported-web that referenced this pull request
Sep 9, 2025* build(deps): bump actions/setup-node from 4 to 5 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v4...v5) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Add `"packageManager": "yarn@1.22.22"` to package.json for GitHub CI dependency caching See actions/setup-node#1348: > **Description:** This PR improves the caching behaviour in setup-node by introducing enhanced logic for detecting and enabling caching based on the package manager field in package.json when the cache input is not explicitly set. > > Key changes: > > * Updated the caching behaviour to be enabled by default when a `packageManager` field is detected in the `package.json` file and no `cache` input is provided. > > * Introduced a new input `package-manager-cache` to control this automatic caching behaviour. By default, `package-manager-cache` is set to `true`, enabling caching when a valid package manager field is detected. To disable this automatic caching, set `package-manager-cache` to `false`. > > * Updated documentation to reflect the new default caching behaviour and the addition of the `package-manager-cache` input. * Change package.json `engines.npm` to `engines.yarn` See https://dashboard.heroku.com/apps/reported-web-dependabot-caimh5/activity/builds/26daa6e1-cc6d-48c4-82f2-9f62e61053b1: > -----> Building on the Heroku-22 stack > -----> Using buildpacks: > 1. heroku/nodejs > 2. jontewks/puppeteer > -----> Node.js app detected > -----> Build failed > ! Multiple package managers declared in package.json > Installing dependencies using the wrong package manager can result in missing packages or subtle bugs > in production. Only one of the following fields should be used, all others should be removed: > - npm version detected in engines.npm (>=3.10.10) > - yarn version declared in packageManager (yarn@1.22.22) > > https://devcenter.heroku.com/articles/nodejs-support > ! Push rejected, failed to compile Node.js app. > ! Push failed --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Joseph Frazier <1212jtraceur@gmail.com>
SukkaW added a commit to SukkaW/setup-node that referenced this pull request
Sep 10, 2025renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request
Oct 15, 2025aparnajyothi-y pushed a commit to aparnajyothi-y/setup-node that referenced this pull request
Oct 21, 2025actions#1348) * setup node in local * Enhance caching in setup-node with package manager filed detection * updated with array * update the field
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request
Dec 4, 2025thekbb added a commit to thekbb/expand-aws-iam-wildcards that referenced this pull request
Dec 13, 2025Upgrade github actions to latest add `packageManager` to `package.json` should level up caching without additonal config see: actions/setup-node#1348
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request
Jan 15, 2026renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request
Mar 8, 2026This was referenced
Mar 13, 2026This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters