feat: add writeUpdateInfo option for zip builds#9486
feat: add writeUpdateInfo option for zip builds#9486beyondkmp wants to merge 4 commits intoelectron-userland:masterfrom
Conversation
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>
🦋 Changeset detectedLatest commit: 5bdbe70 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
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 |
There was a problem hiding this comment.
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
writeUpdateInfoboolean configuration option toMacConfigurationandDmgOptionsinterfaces - Updated
macPackager.tsto 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 |
There was a problem hiding this comment.
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.
| writeUpdateInfo?: boolean | |
| readonly writeUpdateInfo?: boolean |
| /** | ||
| * @private | ||
| * @default true | ||
| */ | ||
| writeUpdateInfo?: boolean |
There was a problem hiding this comment.
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."
| * @private | ||
| * @default true | ||
| */ | ||
| writeUpdateInfo?: boolean |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>
| /** | ||
| * macOS zip options. | ||
| */ | ||
| readonly zip?: ZipOptions | null |
There was a problem hiding this comment.
I'm definitely not a fan of this tbh for a couple reasons:
ziptarget is more than justmacOSspecific- ArchiveTarget supports a plethora of archive formats. Creating a
ziptarget 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 🙂
fix #9479
Add configurable writeUpdateInfo option to control whether update info is written for macOS zip targets.
🤖 Generated with Claude Code