-
Notifications
You must be signed in to change notification settings - Fork 9
chore(deps): combine the passing dependency updates #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3ea63c0
ci: update the GitHub Actions to v7
Decipher 5e4c661
chore(deps): update the Nuxt dependencies
Decipher 0bb39ee
build(deps): let Renovate own the dependency updates
Decipher bceb2b4
build(lint): fail on references to private hosts
Decipher 1adaa3e
test(lint): measure the private host reporting
Decipher 624bfff
fix(lint): match the host past a URL's userinfo
Decipher 67b6472
ci: key the npm cache on the lockfile each job installs from
Decipher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This 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
This 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
This 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
This 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
This 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: druxt/quickstart
Length of output: 205
🏁 Script executed:
Repository: druxt/quickstart
Length of output: 8381
🌐 Web query:
actions/setup-node v7 README package-manager-cache cache-dependency-path packageManager automatic caching💡 Result:
In actions/setup-node v7, automatic caching for npm dependencies is enabled by default if your package.json file includes a top-level packageManager field or a devEngines.packageManager field set to npm, and no explicit cache input is provided [1][2][3]. This automatic behavior is controlled by the package-manager-cache input, which defaults to true [1][2]. You can disable this automatic caching by setting package-manager-cache: false in your workflow step [4][1][5]. Regarding dependency paths, actions/setup-node defaults to searching for lockfiles (such as package-lock.json, npm-shrinkwrap.json, or yarn.lock) in the repository root [1][2]. If you need to cache dependencies in monorepos or projects with complex structures where multiple dependency files are used or located in subdirectories, you should use the cache-dependency-path input [1][2][6]. Key points for cache-dependency-path: - It requires the cache input to be explicitly set (e.g., cache: 'npm') [1][3]. - It supports specifying a single file path, multiple files via a list, or wildcard patterns (e.g., /package-lock.json) to match multiple dependency files [4][1][7]. - It uses the hash of the matched files to generate the cache key [1][3][7]. Example usage for multiple dependency paths: steps: - uses: actions/checkout@v7 - uses: actions/setup-node@v7 with: node-version: '24' cache: 'npm' cache-dependency-path: | server/app/package-lock.json frontend/app/package-lock.json - run: npm ci - run: npm test Example usage with wildcards: steps: - uses: actions/checkout@v7 - uses: actions/setup-node@v7 with: node-version: '24' cache: 'npm' cache-dependency-path: '/package-lock.json' - run: npm ci - run: npm test
Citations:
🌐 Web query:
site:github.com/actions/setup-node package-manager-cache automatic caching cache-dependency-path source v7💡 Result:
In the actions/setup-node GitHub Action (version 7 and later), the package-manager-cache input controls the automatic caching of dependencies [1][2]. Key details regarding this functionality include: Automatic Caching Logic: When no explicit cache input is provided, the action automatically enables dependency caching if the repository's package.json file contains either a top-level packageManager field or a devEngines.packageManager field [1][3]. Control via Input: The package-manager-cache input defaults to true, which activates this automatic behavior [1][4]. To disable it, set package-manager-cache: false in your workflow step [1][2]. Dependency Path Management: The cache-dependency-path input is used to specify the location of dependency files (e.g., package-lock.json, yarn.lock) [1][4]. By default, the action looks for these files in the repository root [1][3]. If you have multiple dependency files or they are located in subdirectories, you can use cache-dependency-path to specify them, supporting wildcards or lists of file paths [1][2]. Security Recommendation: Because automatic caching can be enabled simply by the presence of a packageManager field, it is recommended that you explicitly set package-manager-cache: false in workflows that handle elevated privileges or sensitive information where caching is not required, to prevent potential cache poisoning or credential exposure [2][3][4]. This functionality was introduced to improve the developer experience by reducing the manual configuration required for caching across various Node.js projects [5][6].
Citations:
packageManagerfield is defined in package.json actions/setup-node#686🌐 Web query:
actions/setup-node v7 package-manager-cache packageManager root package-lock cache-dependency-path automatic cache source💡 Result:
In actions/setup-node v7, the caching mechanism has been updated to include automatic caching for npm [1]. Below is a breakdown of how the requested components function: Automatic Caching for npm The action automatically enables caching for npm if your package.json contains either a devEngines.packageManager or a top-level packageManager field set to npm, provided no explicit cache input is configured [1]. This behavior is controlled by the package-manager-cache input, which defaults to true [1]. You can disable this automatic behavior by setting package-manager-cache: false in your workflow step [1]. Caching Dependency Paths The cache-dependency-path input allows you to specify the location of dependency lock files (such as package-lock.json, yarn.lock, etc.) when they are not in the repository root or when you have multiple dependency files [2][3][1]. - When used, the action calculates a hash from the specified file(s) and uses it as part of the cache key [2][3]. - It supports both specific file paths and wildcard patterns (e.g., /package-lock.json) [4][2]. - If you have multiple dependency files, you can pass a list of paths or use wildcards to include them all in the cache hash [4][5]. If you do not specify a cache-dependency-path, the action defaults to searching for the lock file (e.g., package-lock.json, yarn.lock, or npm-shrinkwrap.json) in the repository root [2][3]. Note that while automatic caching is available for npm, for other package managers like yarn or pnpm, you must still explicitly configure the cache input to enable caching functionality [1].
Citations:
🏁 Script executed:
Repository: druxt/quickstart
Length of output: 205
🌐 Web query:
site:github.com/actions/setup-node/blob/v7 action.yml cache-dependency-path package-manager-cache cache input implementation💡 Result:
The
actions/cacheGitHub action does not have an input namedcache-dependency-path[1][2][3][4]. The standard inputs foractions/cacheare: -path: A list of files, directories, or wildcard patterns to cache and restore [1][2]. -key: An explicit key for a cache entry, typically generated using thehashFilesfunction to ensure the cache updates when dependencies change [1][3]. -restore-keys: An ordered list of keys used to restore a stale cache if no exact match is found for the primarykey[1][2]. -enableCrossOsArchive: A boolean that, if enabled, allows caches to be shared across different operating systems [1]. -fail-on-cache-miss: A boolean that causes the workflow to fail if no cache entry is found [1]. -lookup-only: A boolean that, if true, only checks for the existence of a cache without downloading it [1]. Users typically manage cache dependency paths by specifying the target directory or file (such as a lockfile or node_modules) directly within thepathinput and incorporating the file's hash into thekeyinput usinghashFiles[1][2][4].Citations:
🏁 Script executed:
Repository: druxt/quickstart
Length of output: 1919
🏁 Script executed:
Repository: druxt/quickstart
Length of output: 17423
Set
cache-dependency-path: nuxt/package-lock.json. Automatic npm caching uses the rootpackage-lock.jsonby default, but this job installs dependencies fromnuxt/. Setpackage-manager-cache: falseif caching is not required.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 67b6472, for this workflow and the two jobs in ci.yml with the same shape.
You are right about the mechanism: setup-node v5 turns caching on wherever package.json names a package manager, and keys it on the root lockfile alone, so the jobs installing from
nuxt/were keyed on a file unrelated to what they install. Those three now setcache: npmwith both lockfiles incache-dependency-path.Left alone deliberately: the jobs that install at the root, where the default key is already correct, and
test_giget, which never checks out and so has no root package.json for detection to find. Adding an explicitcache: npmthere would fail on the missing lockfile rather than skip.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Decipher, confirmed. The explicit npm cache configuration now keys the Nuxt-installing jobs on both lockfiles. The unchanged jobs have valid reasons.🐇 ✅
✏️ Learnings added
If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!
@DecipherThanks for confirming the fix. I couldn't resolve this review thread on the repository platform, so it remains open. Please retry or resolve it manually.You are interacting with an AI system.