Skip to content

yarn2npm#5080

Open
haslinghuis wants to merge 5 commits intobetaflight:masterfrom
haslinghuis:yarn2npm
Open

yarn2npm#5080
haslinghuis wants to merge 5 commits intobetaflight:masterfrom
haslinghuis:yarn2npm

Conversation

@haslinghuis
Copy link
Copy Markdown
Member

@haslinghuis haslinghuis commented May 2, 2026

Summary by CodeRabbit

  • Chores

    • Migrated package management from Yarn to npm across CI, build and Android workflows (including cache key updates) and removed the yarn devDependency.
    • Updated Storybook dev dependency versions.
    • Removed Yarn debug/error log ignore entries.
  • Documentation

    • Updated build, development, Android and test instructions to use npm-based commands and adjusted local dev URL.

@haslinghuis haslinghuis self-assigned this May 2, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 2, 2026

Walkthrough

CI workflows, README, .gitignore, and package.json were migrated from Yarn to npm: workflows now use npm ci / npm run build and cache package-lock.json; README commands switched to npm; yarn was removed from devDependencies; Yarn log ignores were removed; Storybook devDependency bumped.

Changes

Yarn → npm migration

Layer / File(s) Summary
Dependency Manifest
package.json
Removed yarn from devDependencies; updated @storybook/addon-essentials to ^8.6.14.
Lockfile / Cache Key
.github/workflows/build.yml
Cache key now uses hashFiles('package-lock.json') instead of hashFiles('yarn.lock').
Install / Build Steps (CI & Nightly)
.github/workflows/build.yml, .github/workflows/tauri-nightly.yml, .github/workflows/test.yml
Replaced Yarn flows (npm install yarn -g, yarn install, yarn build, yarn install --frozen-lockfile) with npm equivalents (npm ci, npm run build); updated actions/setup-node cache from yarn to npm.
Docs / Developer UX
README.md
Replaced documented Yarn commands with npm equivalents for dev, build, preview, Android run/dev flows, and tests; live-reload instruction changed to npm run dev -- --host; local URL updated to http://localhost:8080.
Ignore Rules
.gitignore
Removed yarn-debug.log* and yarn-error.log*; retained node_modules/ and npm-debug.log*.
Tests / Validation
.github/workflows/test.yml, README.md
CI continues lint/test via npm (npm run lint, npm run test); README updated to npm test.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • sugaarK
  • VitroidFPV
  • nerdCopter
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided by the author, whereas the template requires multiple important sections including coding style adherence, issue references, and CI/CD considerations. Add a comprehensive pull request description explaining the migration rationale, affected files, testing performed, and any breaking changes or migration notes for reviewers.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title 'yarn2npm' clearly summarizes the main objective of the pull request, which is to migrate the project from Yarn to npm package manager across workflows, configuration, and documentation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/tauri-nightly.yml (1)

250-258: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Android job's Setup Node step is missing cache: npm.

The desktop job (Line 94) specifies cache: npm in actions/setup-node, but the android job omits it. This means the Android build skips npm caching entirely and will re-download all packages on every run.

⚙️ Proposed fix
       - name: Setup Node
         uses: actions/setup-node@v5
         with:
           node-version-file: .nvmrc
+          cache: npm
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/tauri-nightly.yml around lines 250 - 258, The Android
job's "Setup Node" step uses actions/setup-node@v5 but omits the npm cache
option, causing no npm caching; update the "Setup Node" step in the Android job
to include the cache: npm option (same pattern used in the desktop job) so
actions/setup-node@v5 is invoked with node-version-file: .nvmrc and cache: npm
to enable npm package caching for the Android workflow steps (npm ci, npm run
build, node capacitor.config.generator.mjs, npx cap sync android).
🤖 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 87-90: The Storybook deps are version-mismatched:
`@storybook/addon-actions` is v9 while `@storybook/addon-essentials`,
`@storybook/addon-links` and `@storybook/vue3` are v8; fix by choosing one of two
actions—either revert `@storybook/addon-actions` to a compatible ^8.x to stay on
Storybook v8, or migrate fully to v9 by removing `@storybook/addon-essentials`
from package.json (its features are core in v9) and upgrading
`@storybook/addon-actions` and `@storybook/vue3` to ^9.x (keep
`@storybook/addon-links` only if you still need it); after editing the
package.json dependencies run the package manager install and verify Storybook
starts to confirm the chosen path.

In `@README.md`:
- Line 158: Update the README instruction to forward the host flag to the
underlying Vite process by using the double-dash separator: replace the current
usage of "npm run dev --host" with "npm run dev -- --host" (or alternatively
instruct to run "npx vite --host"); ensure the README text that references `npm
run dev --host` and `vite` is updated so readers know to include `--` to forward
args to Vite.

---

Outside diff comments:
In @.github/workflows/tauri-nightly.yml:
- Around line 250-258: The Android job's "Setup Node" step uses
actions/setup-node@v5 but omits the npm cache option, causing no npm caching;
update the "Setup Node" step in the Android job to include the cache: npm option
(same pattern used in the desktop job) so actions/setup-node@v5 is invoked with
node-version-file: .nvmrc and cache: npm to enable npm package caching for the
Android workflow steps (npm ci, npm run build, node
capacitor.config.generator.mjs, npx cap sync android).
🪄 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: 52ce0444-cc71-42a6-aa41-d781c5ec39ea

📥 Commits

Reviewing files that changed from the base of the PR and between a58d7e8 and 32363c6.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (6)
  • .github/workflows/build.yml
  • .github/workflows/tauri-nightly.yml
  • .github/workflows/test.yml
  • .gitignore
  • README.md
  • package.json
💤 Files with no reviewable changes (1)
  • .gitignore

Comment thread package.json Outdated
Comment thread README.md Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/build.yml (1)

56-65: Use cache: npm on actions/setup-node instead of manual node_modules caching for consistency.

The other workflows (test.yml, tauri-release.yml, tauri-nightly.yml) already use cache: npm on actions/setup-node. Since npm ci recreates node_modules from scratch anyway, align this workflow with the rest of the codebase.

♻️ Suggested workflow change
-      - 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
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build.yml around lines 56 - 65, Replace the manual cache
step named "Cache node_modules" with using the built-in npm cache support on the
setup step: remove the actions/cache step that keys node_modules-${{ runner.os
}}-${{ hashFiles('package-lock.json') }} and instead add cache: npm to the
actions/setup-node@v5 step (the step named "Install node.js") so the setup-node
action manages npm caching consistently with other workflows.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/build.yml:
- Around line 56-65: Replace the manual cache step named "Cache node_modules"
with using the built-in npm cache support on the setup step: remove the
actions/cache step that keys node_modules-${{ runner.os }}-${{
hashFiles('package-lock.json') }} and instead add cache: npm to the
actions/setup-node@v5 step (the step named "Install node.js") so the setup-node
action manages npm caching consistently with other workflows.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 69f22648-de28-4204-8ce9-2a58472772ab

📥 Commits

Reviewing files that changed from the base of the PR and between 32363c6 and ea30033.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (6)
  • .github/workflows/build.yml
  • .github/workflows/tauri-nightly.yml
  • .github/workflows/test.yml
  • .gitignore
  • README.md
  • package.json
💤 Files with no reviewable changes (1)
  • .gitignore
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/test.yml
🚧 Files skipped from review as they are similar to previous changes (3)
  • .github/workflows/tauri-nightly.yml
  • package.json
  • README.md

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 2, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

🎉 Do you want to test this code? 🎉

⚠️ CAUTION: The build may be unstable and result in corrupted configurations or data loss. Use only for testing! ⚠️

@haslinghuis haslinghuis moved this to App in 2026.6.0 May 2, 2026
@haslinghuis haslinghuis added this to the 2026.6 milestone May 2, 2026
@haslinghuis haslinghuis changed the title Testing yarn2npm yarn2npm May 3, 2026
@haslinghuis haslinghuis requested review from VitroidFPV and blckmn May 3, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: App

Development

Successfully merging this pull request may close these issues.

2 participants