Electron Forge 7.0.0 and newer does not handle correctly older @electron-forge/maker-base
and third-party makers. #3426
Description
Pre-flight checklist
- I have read the contribution documentation for this project.
- I agree to follow the code of conduct that this project uses.
- I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
7.0.0 and newer
Electron version
(irrelevant, this is a Forge issue)
Operating system
(irrelevant, the issue is not associated with any platform-specific code in Forge)
Last known working Electron Forge version
6.x.y
Expected behavior
When there's an older and incompatible maker-base
used by a maker, Forge should gracefully handle such case by like implementing a backwards compatibility logic for them or ignoring makers that use too old maker-base
class and warning end-users about this.
Actual behavior
Electron Forge does quite a naive check for makers in order to verify if they are actually makers. This is currently problematic when extending Forge by own makers' implementation and causes stuff to happen like this: SpacingBat3/ReForged#12.
Steps to reproduce
- Install a maker depending on
maker-base:^6.0.0
(i.e. anything older than7.0.0
). - Install Forge
7.0.0
or newer. - Configure it to use the maker.
- See an uncaught exception pointing to the use of
.clone
method (it is very likely undefined in older maker-base versions, or at least not a function) in this line (the commit in permalink is the exact commit that introduces this regression):
forge/packages/api/core/src/api/make.ts
Line 185 in 7370d6e
Additional information
Related commit: 7370d6e
Related PR: #3363
This issue could also be associated with another API components, like publishers and plugins (I haven't checked how Forge handles detection of them).