-
Notifications
You must be signed in to change notification settings - Fork 1
feat: adopt pnpm #114
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
feat: adopt pnpm #114
Conversation
WalkthroughThe project transitioned from using Yarn to pnpm as its Node.js package manager. Workflow scripts, configuration files, and ignore lists were updated to reflect this change. Yarn-specific files and settings were removed or replaced, and new pnpm configuration files were introduced. The Node.js version pinning file was also removed. Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant pnpm
participant Elm
GitHub Actions->>pnpm: Setup pnpm (install latest)
GitHub Actions->>pnpm: Install dependencies
GitHub Actions->>pnpm: Run format check
GitHub Actions->>pnpm: Run tests
GitHub Actions->>pnpm: Run build
GitHub Actions->>Elm: Setup Elm (unchanged)
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for sync-timer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Actionable comments posted: 1
🧹 Nitpick comments (6)
.tool-versions (1)
2-2: Normalize spacing in version file.
There are two spaces betweenelmand its version; consider using a single space or aligning columns uniformly for readability..npmrc (1)
1-4: Add trailing newline for compatibility.
Include a newline at the end of.npmrcto satisfy POSIX conventions and prevent warnings from editors or linters.pnpm-workspace.yaml (1)
1-2: Add newline at end of file.
YAML files should end with a newline to satisfy linters and avoid parsing warnings.🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 2-2: no new line character at the end of file
(new-line-at-end-of-file)
.gitignore (1)
21-25: Add newline at end of file.
Ensure the file ends with a newline to prevent warnings from certain Git clients and linters..github/workflows/check.yml (2)
20-20: Update step name to reflect pnpm usage
The step label "Install npm packages" is now misleading. Consider renaming it to "Install dependencies" for clarity and to avoid confusion.- - name: Install npm packages + - name: Install dependencies
26-26: Add newline at end of file
YAMLLint reports a missing newline at EOF. Please ensure there's a terminating newline character at the end of this file.🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 26-26: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
⛔ Files ignored due to path filters (2)
.yarn/install-state.gzis excluded by!**/.yarn/**,!**/*.gzyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (8)
.github/workflows/check.yml(1 hunks).gitignore(1 hunks).node-version(0 hunks).npmrc(1 hunks).tool-versions(1 hunks).yarnrc.yml(0 hunks)package.json(1 hunks)pnpm-workspace.yaml(1 hunks)
💤 Files with no reviewable changes (2)
- .node-version
- .yarnrc.yml
🧰 Additional context used
🪛 YAMLlint (1.37.1)
pnpm-workspace.yaml
[error] 2-2: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/check.yml
[error] 26-26: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (8)
.tool-versions (1)
3-3: Pin pnpm version in toolchain.
Addingpnpm 10.11.0ensures a consistent package manager version across all development and CI environments, aligning with the migration objectives..npmrc (1)
1-4: Configuration for pnpm integration.
The.npmrcsettings (shamefully-hoist,strict-peer-dependencies=false,auto-install-peers,node-linker=hoisted) align with typical pnpm workspace requirements and will smooth the transition from Yarn.package.json (1)
33-33: Specify pnpm as the package manager.
The"packageManager": "pnpm@10.11.0"entry correctly declares pnpm for future installs and lockfile generation.pnpm-workspace.yaml (1)
1-2: Configure pnpm workspace correctly.
Defining the root package underpackages: ['.']allows pnpm to manage dependencies across the workspace as intended.🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 2-2: no new line character at the end of file
(new-line-at-end-of-file)
.gitignore (1)
23-25: Ignore pnpm artifacts.
The new entries exclude the.pnpm-store/directory andpnpm-lock.yaml, ensuring pnpm-specific files aren’t committed..github/workflows/check.yml (3)
22-22: Approve format-check integration
Switching topnpm check-formatcorrectly invokes your format validation script under pnpm. Well aligned with the migration.
24-24: Approve test command migration
Usingpnpm testis the proper equivalent ofyarn testand aligns with your workspace setup.
26-26: Approve build command migration
pnpm buildcorrectly replacesyarn build, ensuring your static assets are generated under pnpm.🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 26-26: no new line character at the end of file
(new-line-at-end-of-file)
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v3 | ||
| with: | ||
| version: latest |
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.
💡 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.
| - 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.
Summary by CodeRabbit