fix(desktop): include ms in packaged runtime#1506
Conversation
Ensure packaged desktop apps include the transitive debug dependency needed by extract-zip during startup. Fusion-Task-Id: FN-5988
Greptile SummaryThis PR fixes a Linux packaging regression where the
Confidence Score: 5/5Safe to merge — the change is a minimal, targeted fix for a confirmed Linux packaging failure with a corresponding regression test and author-verified asar inspection. The only code touched is a single new direct dependency, its lockfile entry, and a test that checks glob patterns in a config file. All three changes are consistent with each other and with the existing No files require special attention. The lockfile and config test are straightforward companions to the Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[electron-builder packages desktop app] --> B{Resolve node_modules/ms}
B -- Before fix: pnpm virtual store only --> C[Symlink not followed by electron-builder]
C --> D[ms missing from app.asar]
D --> E[Linux startup crashes: Cannot find module 'ms']
B -- After fix: ms is direct dep in package.json --> F[Real package entry exists]
F --> G[electron-builder includes node_modules/ms/**/*]
G --> H[debug → ms → extract-zip loads successfully]
H --> I[Desktop app starts on Linux]
Reviews (1): Last reviewed commit: "fix(FN-5988): include ms in desktop pack..." | Re-trigger Greptile |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR declares ChangesDependency Declaration and Configuration Validation
🎯 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 docstrings
🧪 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. Comment |
Summary
Linux desktop builds can no longer ship without the
msmodule required bydebugduringextract-zipstartup. The previous packaging config listednode_modules/ms/**/*, butmswas only present through pnpm's virtual store and was not actually copied into the generatedapp.asar; making it a desktop runtime dependency gives electron-builder a real package entry to include.This also adds a desktop config regression test that keeps the startup/archive dependency globs in place for future package changes.
Refs #1472.
Verification
pnpm --filter @fusion/desktop exec vitest run src/__tests__/electron-builder-config.test.ts --silent=passed-only --reporter=dotpnpm --filter @fusion/core exec vitest run src/__tests__/agent-companies-parser.test.ts --silent=passed-only --reporter=dotpnpm --filter @fusion/desktop run packpackages/desktop/dist-electron/mac-arm64/Fusion.app/Contents/Resources/app.asarand confirmed it contains/node_modules/ms/index.js, plusdebug,extract-zip, andtar.Summary by CodeRabbit