forge icon indicating copy to clipboard operation
forge copied to clipboard

MakerDMG config requiring `appPath` even thought it is never used in typescript project

Open eXhumer opened this issue 1 year ago • 0 comments

Pre-flight checklist

  • [X] I have read the contribution documentation for this project.
  • [X] I agree to follow the code of conduct that this project uses.
  • [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

7.5.0

Electron version

v32.1.1

Operating system

macOS 15.1 Beta (24B5046f)

Last known working Electron Forge version

7.4.0

Expected behavior

Being able to create a DMG installer without having to specify a fake appPath in config needing to satisfy type check.

Actual behavior

Additional config property appPath being needed to add to the config to satisfy type check. This appPath is never used for anything other than to satisfy the type check as appPath is always overridden in the make method.

https://github.com/electron/forge/blob/420458bd2e6f34e4298c3a8d028c26e6e43ff90e/packages/maker/dmg/src/MakerDMG.ts#L29

Steps to reproduce

  1. Add @electron-forge/[email protected] to package.json in a typescript forge project.
  2. Add MakerDMG to forge.config.ts with empty config object, typescript will complain about appPath not being present.

Additional information

875ee549020edbdfab6409e96ca6f367ccc8fe33 upgraded electron-installer-dmg from 4.0.0 to 5.0.1.

MakerDMGConfig was modified to extend ElectronInstallerDMGOptions from electron-installer-dmg, which requires appPath by default to be included in the config.

eXhumer avatar Sep 21 '24 10:09 eXhumer