-
Notifications
You must be signed in to change notification settings - Fork 30
ci: use pnpm/setup and devEngines
#484
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
+154
−11
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: nuxt/telemetry
Length of output: 3630
🌐 Web query:
pnpm/setup v2 README runtime input node@22 devEngines runtime💡 Result:
The pnpm/setup v2 GitHub Action simplifies CI by installing both pnpm and a specified JavaScript runtime (Node.js, Bun, or Deno) in a single step, eliminating the need for dedicated actions like actions/setup-node [1][2]. Runtime Inputs and devEngines.runtime The action uses a runtime input to specify which environment to install [3]. The input supports syntax like node@22, bun@latest, or deno@2 [4][3]. 1. Explicit Input: If you provide an explicit input (e.g., runtime: node@22), the action installs that specific runtime and version [4][5]. 2. Implicit/Automatic Resolution: If the runtime input is omitted, the action automatically reads the devEngines.runtime configuration from the project's package.json [4][3]. 3. Fallback: If you provide a name but omit the version (e.g., runtime: node), the action resolves the version using devEngines.runtime in package.json or defaults to lts (for Node.js) or latest (for others) [3][5]. Integration with devEngines.runtime You can define the runtime directly in your package.json to manage versions centrally [4]: { "devEngines": { "runtime": { "name": "node", "version": "^22.0.0", "onFail": "download" } } } When this is defined, the action will automatically pick up these settings unless overridden by an explicit runtime input [6][3]. Important Considerations - Compatibility: pnpm/setup v2 requires pnpm v11 or newer [6][7]. - Context-Aware Shims: pnpm v12+ uses context-aware shims that might switch to a project-pinned runtime, potentially overriding the runtime installed by the action [8]. To prevent this and ensure the action's installed runtime remains authoritative, the action automatically disables the specific runtime in PNPM_CONFIG_GLOBAL_SHIMS [4][8]. If you wish to opt back into shim switching, you can explicitly set the environment variable: env: PNPM_CONFIG_GLOBAL_SHIMS: '{"node":"auto"}' - Installation Behavior: By default, the action runs pnpm install. If a runtime is specified, it automatically appends --no-runtime to prevent shadowing the installed runtime with a different version found in devEngines [4][3]. You can disable the installation step entirely by setting install: false [3].
Citations:
Document the Node.js 22 compatibility split.
The
cimatrix explicitly selects Node.js 22. Thetestjob omits the runtime input, sopnpm/setupusespackage.jsonand selects Node.js 24. These jobs therefore use different runtimes.If Node.js 22 is intentional compatibility coverage, document the split. Otherwise, remove the override so this job uses Node.js 24.
🤖 Prompt for AI Agents