Skip to content

Bump @electron/packager to 20.3.1 and restore derefSymlinks: false - #23248

Draft
sergiou87 wants to merge 1 commit into
developmentfrom
sergiou87-bump-electron-packager-20-3-1
Draft

sergiou87 wants to merge 1 commit into
developmentfrom
sergiou87-bump-electron-packager-20-3-1

Conversation

@sergiou87

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 6e088bec1550dce6556e90c2fd609d27598b74c6

Dimension Assessment Rationale
Change confidence 5/10 ↑ Upstream electron/packager v20.3.1 adds verbatimSymlinks: !dereference when derefSymlinks: false, and all other copy/packaging steps (script/build.ts, script/copilot.ts, script/package.ts) already preserve symlinks.
↓ package-lock.json is not yet updated because @electron/[email protected] is not yet available in CFS (ETARGET).
↓ Local lint, build, macOS codesigning, and packaged bundle-size verification have not been run yet.
Diagnosis confidence 9.5/10 ↑ Confirmed script/build.ts:216 sets derefSymlinks: true (introduced in 8f5248464c / #22928) and upstream @electron/packager v20.3.0 omitted verbatimSymlinks in fs.cp.
Evidence fit 9.5/10 ↑ Directly explains the ~145–148 expanded git-core binary copies (~495 MiB uncompressed) reported in #23236.

Closes #23236

Description

  • Bumps @electron/packager to ^20.3.1, which includes fix: preserve relative symlink targets electron/packager#1964 (released via fix: preserve relative symlink targets electron/packager#1985) setting verbatimSymlinks: !dereference so relative symlinks are preserved instead of rewritten to absolute build-machine paths.
  • Reverts derefSymlinks: true back to derefSymlinks: false in script/build.ts (originally changed in Bump @electron/packager to 20.3.0 #22928 as a workaround for macOS codesigning failures caused by rewritten symlinks). Without reverting derefSymlinks, bumping @electron/packager alone would still dereference bundled git-core symlinks into full binary copies.
  • Verified the rest of the packaging pipeline (cpSync(..., { verbatimSymlinks: true }) in script/build.ts and script/copilot.ts, Assets.car as the only extraResource, and ditto -ck --keepParent in script/package.ts) already preserves symlinks.

Outstanding gaps (draft)

  • package-lock.json has not been updated yet because @electron/[email protected] (published 2026-11-27) is not yet available in CFS (gh cfs -- npm install returned ETARGET).
  • npm run lint, npm run build:dev, macOS codesigning, and packaged .app symlink/size verification have not been run yet and must be completed once package-lock.json is updated.

Screenshots

N/A (build/packaging change).

Team-authored review

Evidence: Pending — not yet validated at 6e088bec1550dce6556e90c2fd609d27598b74c6. package-lock.json update, npm run lint, npm run build:dev, macOS codesigning verification, and packaged git-core symlink/size inspection are blocked until @electron/[email protected] is available in CFS.

Review path: needs-deep-review.
This change updates packaging infrastructure (@electron/packager) and symlink handling (derefSymlinks: false in script/build.ts), which directly affects macOS codesigning, notarization, and distribution integrity. Please review signed/notarized macOS CI artifacts and confirm all bundled git-core symlinks remain relative and valid inside the .app bundle before merging. Maintainer: please apply the needs-deep-review label if not already applied.

Release notes

Notes: [Fixed] macOS application bundle size regression caused by dereferencing bundled Git symlinks

Copilot AI balanced review requested due to automatic review settings November 30, 2026 07:50
@sergiou87 sergiou87 added the needs-deep-review Requires in-depth human code review of affected paths; agent review is not sufficient. label Nov 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The lockfile still pins @electron/packager to 20.3.0, which conflicts with the declared ^20.3.1 range and will cause CI’s npm ci step to fail before the symlink fix can build.

1 open issue
What changed in this PR

This PR addresses the macOS bundle-size regression in #23236 by preserving bundled Git symlinks instead of expanding them into executable copies.

Changes:

  • Raises @electron/packager to ^20.3.1 for its relative-symlink preservation fix.
  • Restores derefSymlinks: false, reversing the workaround introduced in #22928.
File Description
script/​build.ts Preserves symlinks during application packaging.
package.json Requires the packager release containing the symlink fix.

Review effort: Balanced

Comment thread package.json
},
"devDependencies": {
"@electron/packager": "^20.3.0",
"@electron/packager": "^20.3.1",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Blocked until this version makes it to CFS. Then we should deploy a test build to make sure everything works as expected.

This branch has not been deployed

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

Labels

needs-deep-review Requires in-depth human code review of affected paths; agent review is not sufficient.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS arm64 release expands 145 Git symlinks into executables, adding ~495 MiB

2 participants