-
Notifications
You must be signed in to change notification settings - Fork 120
ci: use pnpm/setup and devEngines
#1530
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -26,14 +26,7 @@ jobs: | |||||||||
| with: | ||||||||||
| ref: ${{ github.event.pull_request.head.sha }} | ||||||||||
|
|
||||||||||
| - run: npm i -g --force corepack && corepack enable | ||||||||||
|
|
||||||||||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||||||||||
| with: | ||||||||||
| node-version: lts/* | ||||||||||
|
|
||||||||||
| - name: 📦 Install dependencies | ||||||||||
| run: pnpm install | ||||||||||
| - uses: pnpm/setup@703c52620218391530e48b9e8870d5c0082e1b9b # v2.1.0 | ||||||||||
| env: | ||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||
|
|
||||||||||
|
|
@@ -68,14 +61,7 @@ jobs: | |||||||||
| with: | ||||||||||
| ref: ${{ github.base_ref }} | ||||||||||
|
|
||||||||||
| - run: npm i -g --force corepack && corepack enable | ||||||||||
|
|
||||||||||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||||||||||
| with: | ||||||||||
| node-version: lts/* | ||||||||||
|
|
||||||||||
| - name: 📦 Install dependencies | ||||||||||
| run: pnpm install | ||||||||||
| - uses: pnpm/setup@703c52620218391530e48b9e8870d5c0082e1b9b # v2.1.0 | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
base_ref="$(gh pr view --json baseRefName --jq '.baseRefName')"
git fetch --depth=1 origin "$base_ref"
printf '%s\n' '--- base manifest runtime declarations ---'
git show "origin/$base_ref:package.json" | jq '{packageManager, devEngines}'
printf '%s\n' '--- pinned setup action runtime behavior ---'
curl --fail --silent --show-error \
https://raw.githubusercontent.com/pnpm/setup/703c52620218391530e48b9e8870d5c0082e1b9b/action.yml |
sed -n '/runtime:/,/^[^[:space:]]/p'Repository: nuxt/cli Length of output: 219 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- workflow ---'
sed -n '1,110p' .github/workflows/size.yml
printf '%s\n' '--- package runtime declarations ---'
if [ -f package.json ]; then
jq '{packageManager, devEngines, engines}' package.json
fi
printf '%s\n' '--- setup action metadata at pinned commit ---'
curl --fail --silent --show-error \
https://raw.githubusercontent.com/pnpm/setup/703c52620218391530e48b9e8870d5c0082e1b9b/action.yml |
sed -n '1,220p'Repository: nuxt/cli Length of output: 8256 🤖 get_repo_knowledge executed:
Length of output: 411 Set an explicit Node runtime for If Set Proposed fix - uses: pnpm/setup@703c52620218391530e48b9e8870d5c0082e1b9b # v2.1.0
+ with:
+ runtime: node@24
env:📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| env: | ||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||
|
|
||||||||||
|
|
||||||||||
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 | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: nuxt/cli
Length of output: 8129
🤖 get_repo_knowledge executed:
get_repo_knowledge nuxt/cli /tmp/coderabbit-repo-knowledge/nuxt-cli-03732b1c/learningsLength of output: 738
🌐 Web query:
github pnpm/setup v2 runtime input devEngines runtime precedence node@latest💡 Result:
The pnpm/setup v2 GitHub Action determines the Node.js runtime version based on a specific order of precedence, prioritizing explicit user input over project configuration [1][2][3]. The runtime resolution precedence is as follows [2]: 1. Explicit runtime input (e.g., runtime: node@22): When a full runtime specification (name and version) is provided via the runtime input, this version is used [2]. 2. Runtime name input with version fallback (e.g., runtime: node): If only the runtime name is provided in the input, the action resolves the version by looking for a matching runtime declaration in the project's devEngines.runtime field in package.json [2][3]. If no version is found in devEngines, it defaults to lts (for node) or latest (for others) [1][3]. 3. Omitted runtime input: If the runtime input is omitted entirely, the action automatically reads the runtime name and version from the devEngines.runtime field in package.json [2][3]. 4. No runtime specified: If neither the input is provided nor the devEngines.runtime field exists, no runtime is installed [2][3]. Additionally, when a runtime input is explicitly set, the action automatically appends --no-runtime to the subsequent pnpm install command (requires pnpm >= 11.1.0) [4][5]. This prevents pnpm from potentially shadowing the action's installed runtime with a different version that might be declared in the project's devEngines.runtime [4][5].
Citations:
Keep the release job on Node 24.
pnpm/setupgivesruntime: node@latestprecedence overpackage.jsondevEngines.runtime, which requires Node^24.0.0. A future Node major can therefore run the preview and nightly builds with an unsupported runtime.Remove the override so
pnpm/setupusesdevEngines.runtime, or set it tonode@24.Suggested fix
- runtime: node@latest📝 Committable suggestion
🤖 Prompt for AI Agents
Source: MCP tools