Skip to content

fix(maker-dmg): respect appVersion in the default artifact name - #4453

Draft
a5768549 wants to merge 1 commit into
electron:mainfrom
a5768549:fix/dmg-app-version
Draft

a5768549 wants to merge 1 commit into
electron:mainfrom
a5768549:fix/dmg-app-version

Conversation

@a5768549

Copy link
Copy Markdown

AI assistance disclosure: Hermes Agent assisted with the code, tests, and this description. The operator authorized this draft submission; it remains pending human code review and macOS packaging validation.

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:

Addresses the DMG case in #3523.

Use forgeConfig.packagerConfig.appVersion || packageJSON.version in the default DMG artifact name, matching Packager's fallback for an absent or empty appVersion. An explicit MakerDMG name still takes precedence; the architecture-specific output directory and installer options are unchanged. Other makers are outside this PR's scope.

Verification

  • New regression cases fail on the unmodified source (4 failed / 6 passed) and pass with the fix (10 passed). Tests cover the override, missing/empty fallback and custom-name precedence; installer/filesystem operations are mocked.
  • yarn test:fast packages/maker: 14 files / 138 tests passed, independently rerun after review.
  • yarn build, scoped oxfmt --check, oxlint, and git diff --check passed.
  • Full yarn test:fast: 715 passed, 2 failed, 6 todo. Both failures are Vite configuration tests expecting fixed ports (5173/5183) that were occupied locally; the same failures were reproduced with the unmodified production source. The full-suite checkbox is therefore left unchecked.

Tested on Windows with Node 24.19.0 and Yarn 4.18.0 against main at 16d47dc2. No real DMG was created or mounted on macOS, including no real MAS/architecture packaging matrix; this is why the PR is a draft. The branch merges cleanly with fdb682ce.

Prefer packagerConfig.appVersion over packageJSON.version when naming the
DMG artifact, matching Packager's fallback for an absent or empty version.
Keep explicit maker names unchanged.

Add regression coverage for version overrides, fallback and custom names.
This change is limited to maker-dmg.

Fixes electron#3523

Assisted-By: Hermes Agent

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant