yarn2npm#908
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
WalkthroughThe PR migrates the project from Yarn to npm: CI and build steps now use ChangesYarn → npm migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 15 minutes and 33 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/build.yml (1)
28-39:node_modulescache is inefficient withnpm ci.Caching
node_modules(Lines 28–33) adds overhead without meaningful benefit.npm ciworks efficiently with npm's built-in cache rather than a cachednode_modulesdirectory. Theactions/setup-nodeaction with thecache: 'npm'option is the recommended approach for GitHub Actions workflows.Suggested refactor
- - name: Cache node_modules - uses: actions/cache@v4 - with: - path: node_modules/ - key: node_modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }} - name: Install node.js uses: actions/setup-node@v5 with: node-version-file: '.nvmrc' + cache: 'npm' + cache-dependency-path: 'package-lock.json'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build.yml around lines 28 - 39, Remove the "Cache node_modules" step and instead enable npm caching via the setup action: modify the "Install node.js" step (uses: actions/setup-node@v5) to include the cache: 'npm' option so npm's cache is used with the subsequent "run: npm ci" step; ensure the explicit node-version-file: '.nvmrc' remains and delete the standalone "Cache node_modules" step and its key/path entries to avoid caching node_modules directly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Around line 42-45: The nested override under "overrides" that sets "lodash": {
"lodash.template": "^4.5.0" } is ineffective because lodash@4.18.1 has no
transitive dependency on "lodash.template"; either remove this nested override
entry entirely from the "overrides" object or change it to a global override
targeting "lodash.template": "^4.5.0" at the top level of "overrides" so the pin
applies across the dependency tree; update the "overrides" block accordingly and
ensure only the intended key ("lodash.template") is present if you need to
enforce that version globally.
In `@README.md`:
- Around line 91-95: The README currently instructs users to run only `npm
start`; update the startup instructions to include a dependency installation
step (e.g., `npm ci` or `npm install`) immediately before the `npm start`
command so fresh clones won't fail; edit the section containing the `npm start`
example to add the chosen install command and a brief note that this is required
for first-time setup.
---
Nitpick comments:
In @.github/workflows/build.yml:
- Around line 28-39: Remove the "Cache node_modules" step and instead enable npm
caching via the setup action: modify the "Install node.js" step (uses:
actions/setup-node@v5) to include the cache: 'npm' option so npm's cache is used
with the subsequent "run: npm ci" step; ensure the explicit node-version-file:
'.nvmrc' remains and delete the standalone "Cache node_modules" step and its
key/path entries to avoid caching node_modules directly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bb92fcd3-8591-4997-a944-6e0ba480bebc
⛔ Files ignored due to path filters (2)
package-lock.jsonis excluded by!**/package-lock.jsonyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (4)
.github/workflows/build.yml.gitignoreREADME.mdpackage.json
💤 Files with no reviewable changes (1)
- .gitignore
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai approve |
✅ Actions performedComments resolved and changes approved. |
There was a problem hiding this comment.
Pull request overview
This PR migrates the project’s developer workflow and CI pipeline from Yarn to npm so the repository can use package-lock.json and npm-native install/build commands across local development and GitHub Actions.
Changes:
- Replaces Yarn-specific package management settings in
package.jsonwith npm-compatible equivalents. - Updates the build workflow to install dependencies and build with npm instead of Yarn.
- Revises developer documentation and cleanup files to remove Yarn-specific references.
Reviewed changes
Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
package.json |
Switches the GitHub dependency URL to npm-compatible syntax, removes the Yarn dev dependency, and replaces resolutions with overrides. |
README.md |
Updates local setup and build instructions from Yarn commands to npm commands. |
.gitignore |
Removes Yarn-specific log ignore entries as part of the package-manager migration. |
.github/workflows/build.yml |
Replaces Yarn installation/build steps with npm ci and npm run build, and enables npm cache support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai approve |
✅ Actions performedComments resolved and changes approved. |
|
Preview URL: https://pr908.betaflight-blackbox.pages.dev |
|



Yarn to NPM Migration Plan
Current State
yarn.lock(4258 lines).nvmrc).yarnrcfilespackage-lock.jsonKey Challenges
1. GitHub URL dependency
"Leaflet.MultiOptionsPolyline": "hgoebl/Leaflet.MultiOptionsPolyline"— yarn v1 shorthand. npm requiresgit+https://github.com/hgoebl/Leaflet.MultiOptionsPolyline.git.2.
resolutionsfieldYarn-specific — replaced with npm
overrides.3.
vite-plugin-pwapeer dep conflictvite-plugin-pwa@0.19.xonly supports vite 3-5. Bumped to^0.21.2which supports vite 6.4. Git lockfile SSH URLs
npm writes
git+ssh://git@github.com/...for git dependencies in the lockfile regardless of git config. Requires sed rewrite in CI.5. CI/CD (
build.yml)Converted from yarn to
npm ci+ setup-node npm caching.6. Documentation (
README.md)All yarn refs → npm, including added
npm installstep beforenpm start.Migration Steps
git+https://github.com/hgoebl/Leaflet.MultiOptionsPolyline.gityarnfrom devDependenciesresolutionswith globaloverrides:"lodash.template": "^4.5.0"vite-plugin-pwafrom^0.19.7→^0.21.2(vite 6 support)package-lock.json(lockfileVersion 3)yarn.lock.github/workflows/build.yml:npm ci, npm cache via setup-node, sed for SSH→HTTPS.gitignore: removed yarn log patternsREADME.md: npm commands + addednpm installstepFiles Modified
package.jsonyarn.lockpackage-lock.json.github/workflows/build.yml.gitignoreREADME.mdnpm installbeforenpm startVerification
npm installsucceedsnpm run buildsucceedsSummary by CodeRabbit
Chores
Documentation