Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup npm
uses: actions/setup-node@v4
with:
node-version: '22'
- uses: jorelali/setup-elm@v6
with:
elm-version: 0.19.1
- name: Enable corepack
run: corepack enable
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: latest
Comment on lines +15 to +18
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Pin pnpm version & ensure Node.js availability
Using version: latest can lead to unexpected CI failures when a new pnpm version is released. Pin to the version specified in package.json (10.11.0) for consistency and stability. Also confirm that the runner provides a compatible Node.js version or that this step installs Node; otherwise, re-add an actions/setup-node step to explicitly set the desired Node version.

-        with:
-          version: latest
+        with:
+          version: 10.11.0

🏁 Script executed:

#!/bin/bash
# Show the first 200 lines of the workflow to locate Node setup and pnpm setup steps
sed -n '1,200p' .github/workflows/check.yml || echo "Workflow file not found"

# Check for actions/setup-node usage in the workflow
rg 'uses:.*setup-node' -n .github/workflows/check.yml || echo "No setup-node step found"

# Inspect package.json for pnpm version declarations
rg 'packageManager' -n package.json || echo "No packageManager field in package.json"
rg '"pnpm@' -n package.json || echo "No explicit pnpm version in package.json"

# Check engines entry for Node.js version constraints
rg '"engines"' -n package.json -A5 || echo "No engines field in package.json"

Length of output: 951


Pin pnpm version and explicitly set up Node.js
Using version: latest can introduce unexpected CI failures when pnpm releases a breaking change. Replace it with the 10.11.0 version declared in your package.json. Additionally, your workflow doesn’t install or pin Node.js—ubuntu-latest may change its default Node version over time. Add an actions/setup-node step to lock in a known Node version (and consider declaring it in package.json under "engines" for consistency).

Example diff:

     jobs:
       check:
         runs-on: ubuntu-latest
         steps:
           - name: Checkout
             uses: actions/checkout@v4
+          - name: Setup Node.js
+            uses: actions/setup-node@v3
+            with:
+              node-version: '18.x'
           - name: Setup pnpm
             uses: pnpm/action-setup@v3
             with:
-              version: latest
+              version: 10.11.0
           - name: Install npm packages
             run: pnpm install

• Add an "engines": { "node": ">=18" } entry in package.json to keep your workflow and code aligned.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: latest
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 10.11.0
🤖 Prompt for AI Agents
In .github/workflows/check.yml around lines 15 to 18, replace the pnpm setup
step's version from 'latest' to the pinned version '10.11.0' as specified in
package.json to ensure CI stability. Additionally, add a step before this to
explicitly set up Node.js using actions/setup-node with a fixed Node version
(e.g., 18) to avoid unexpected changes in the runner environment. Also, update
package.json to include an "engines" field specifying the Node.js version
constraint (e.g., "node": ">=18") to keep the workflow and code aligned.

- name: Install npm packages
run: yarn install --immutable
run: pnpm install
- name: Check Format
run: yarn check-format
run: pnpm check-format
- name: Test
run: yarn test
run: pnpm test
- name: Build static files
run: yarn build
run: pnpm build
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ node_modules
.parcel-cache/

# dotenv
.env
.env

# pnpm
.pnpm-store/
pnpm-lock.yaml
1 change: 0 additions & 1 deletion .node-version

This file was deleted.

4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
shamefully-hoist=true
strict-peer-dependencies=false
auto-install-peers=true
node-linker=hoisted
3 changes: 2 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
nodejs 22.9.0
elm 0.19.1
elm 0.19.1
pnpm 10.11.0
Binary file removed .yarn/install-state.gz
Binary file not shown.
1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
"targets": {
"main": false
},
"packageManager": "yarn@4.7.0"
"packageManager": "pnpm@10.11.0"
}
2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages:
- '.'
Loading