Skip to content

fix(build): drop patchedDependencies from the packaged Electron package.json - #124

Merged
rozx merged 1 commit into
mainfrom
fix/electron-packaged-patched-deps
Oct 10, 2026
Merged

rozx merged 1 commit into
mainfrom
fix/electron-packaged-patched-deps

Conversation

@rozx

@rozx rozx commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Summary

The v0.18.0 Release run failed on all four desktop builds after #123 merged:

bun install --production  (in dist/electron/UnPackaged)
error: Couldn't find patch file: 'patches/@huggingface%2Ftransformers@4.3.0.patch'

Quasar copies package.json into dist/electron/UnPackaged and runs bun install --production there, but it doesn't copy patches/. Since 7228255 added patchedDependencies for the Transformers.js 4.3.0 recovery patch, that install can't find the patch file. PR CI never runs the Electron packaging step, so this only showed up in the release build.

This adds electron.extendPackageJson in quasar.config.ts to delete patchedDependencies from the packaged package.json. The patch only matters for the renderer, and the renderer bundle is built from the root node_modules, which is already patched, so the packaged app keeps the fix.

Verification

  • PUPPETEER_SKIP_DOWNLOAD=true bun run build:electron:app (same env as the release job) now gets through the UnPackaged install and finishes with "Build succeeded" (darwin arm64). Without the change it fails with the error above.
  • dist/electron/UnPackaged/package.json no longer contains patchedDependencies.
  • The bundled assets/transformers.web-*.js contains the patched x = x.then(fn, fn) chains and no unpatched x.then(fn) ones.
  • bun run type-check and bun run lint pass.

After merge

The build jobs check out the v0.18.0 tag, which currently points at the #123 merge commit (without this fix), so re-running the failed jobs would fail again. The tag needs to move to a commit that includes this fix before triggering Release via workflow_dispatch. The v0.18.0 release is still a draft, which the workflow is allowed to update.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T03:02:34.724858Z 65d4f70 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@rozx
rozx merged commit 11dbed2 into main Oct 10, 2026
6 checks passed
@kilo-code-bot

kilo-code-bot Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • quasar.config.ts - adds electron.extendPackageJson hook that strips patchedDependencies from the packaged Electron package.json, fixing the release build failure where bun install --production in dist/electron/UnPackaged could not find patches/
  • src/constants/version.ts - auto-generated build-number bump (pre-commit hook), consistent with repo convention

Verification notes:

  • extendPackageJson is the documented Quasar electron hook applied to the package.json copied into the UnPackaged folder before the production install step — the correct mechanism for this fix.
  • The stripped patchedDependencies is build-time only: @huggingface/transformers is imported solely by the renderer worker (src/services/embedding-runtime.ts:172) and bundled from the already-patched root node_modules; no src-electron (main/preload) imports exist, so the packaged runtime never loads the unpatched UnPackaged copy.
  • PR description claims verified: PR CI (ci.yml) runs lint/type-check/fallow only (no Electron packaging), and release build jobs check out the release tag (release.yml), so the "move the v0.18.0 tag before re-running Release" note is accurate.
  • delete pkg.patchedDependencies is type-safe on the optional property; no other consumer reads patchedDependencies from the packaged package.json.

Reviewed by glm-5.3 · Input: 39.5K · Output: 8.8K · Cached: 444.8K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant