Skip to content

feat: add writeUpdateInfo option for zip builds#9486

Open
beyondkmp wants to merge 4 commits intoelectron-userland:masterfrom
beyondkmp:feat/mac-write-update-info
Open

feat: add writeUpdateInfo option for zip builds#9486
beyondkmp wants to merge 4 commits intoelectron-userland:masterfrom
beyondkmp:feat/mac-write-update-info

Conversation

@beyondkmp
Copy link
Contributor

@beyondkmp beyondkmp commented Jan 7, 2026

fix #9479

Add configurable writeUpdateInfo option to control whether update info is written for macOS zip targets.

🤖 Generated with Claude Code

Add configurable writeUpdateInfo option to control whether update info is written for macOS zip targets.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 7, 2026 03:42
@changeset-bot
Copy link

changeset-bot bot commented Jan 7, 2026

🦋 Changeset detected

Latest commit: 5bdbe70

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
app-builder-lib Patch
dmg-builder Patch
electron-builder-squirrel-windows Patch
electron-builder Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds a new configuration option writeUpdateInfo for macOS builds to provide fine-grained control over whether update information files (blockmaps) are generated for zip and DMG archives. This option defaults to true to maintain backward compatibility.

  • Added writeUpdateInfo boolean configuration option to MacConfiguration and DmgOptions interfaces
  • Updated macPackager.ts to respect the new configuration option when creating zip targets
  • Updated JSON schema to include the new configuration option for both MacConfiguration and MasConfiguration

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/app-builder-lib/src/options/macOptions.ts Added writeUpdateInfo optional boolean property to MacConfiguration interface with @private annotation and default value of true
packages/app-builder-lib/src/macPackager.ts Updated zip target creation to use writeUpdateInfo configuration option instead of hardcoded true value
packages/app-builder-lib/scheme.json Added JSON schema definitions for the new writeUpdateInfo boolean property in both MacConfiguration and MasConfiguration schemas

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* @private
* @default true
*/
writeUpdateInfo?: boolean
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The writeUpdateInfo property should be marked as readonly to maintain consistency with other optional properties in the MacConfiguration interface. All other optional properties in this interface use the readonly modifier.

Suggested change
writeUpdateInfo?: boolean
readonly writeUpdateInfo?: boolean

Copilot uses AI. Check for mistakes.
Comment on lines +240 to +244
/**
* @private
* @default true
*/
writeUpdateInfo?: boolean
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The documentation for this @private option lacks context about its purpose. Since this is a user-facing configuration option (even if marked private), it should include a description explaining what "update info" means and when a user might want to set this to false. Consider adding documentation similar to: "Whether to write update info files (blockmap) for zip archives. These files are used for differential updates."

Copilot uses AI. Check for mistakes.
* @private
* @default true
*/
writeUpdateInfo?: boolean
Copy link
Collaborator

@mmaietta mmaietta Jan 8, 2026

Choose a reason for hiding this comment

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

This applies to ALL mac targets, which isn't correct since that also includes pkg mas and dir targets, where this option would be irrelevant. I'm not sure I'm in favor of this approach

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated. added zip options.

…ic options

- Remove writeUpdateInfo from MacConfiguration (platform-level)
- Add ZipOptions interface with writeUpdateInfo for zip target
- DMG already has writeUpdateInfo in DmgOptions
- This allows independent control of writeUpdateInfo for zip and dmg targets

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@beyondkmp beyondkmp requested a review from mmaietta January 16, 2026 03:23
@beyondkmp beyondkmp changed the title feat: add writeUpdateInfo option for macOS builds feat: add writeUpdateInfo option for zip builds Jan 16, 2026
/**
* macOS zip options.
*/
readonly zip?: ZipOptions | null
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm definitely not a fan of this tbh for a couple reasons:

  • zip target is more than just macOS specific
  • ArchiveTarget supports a plethora of archive formats. Creating a zip target opens the door for other archive types having their own options too. That's a very slippery slope on an already-complex Configuration object

We need a different approach to this that scales and keeps complexity low for the end-user.

Before making further edits to this PR, let's please discuss the approach first so that we can limit the back n forth and time spent on your side 🙂

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for disabling blockmap generation for macOS ZIP files via zip.writeUpdateInfo option

3 participants