Skip to content

Electron Forge 7.0.0 and newer does not handle correctly older @electron-forge/maker-base and third-party makers. #3426

Open
@SpacingBat3

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

  1. Install a maker depending on maker-base:^6.0.0 (i.e. anything older than 7.0.0).
  2. Install Forge 7.0.0 or newer.
  3. Configure it to use the maker.
  4. 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):
    makers.push(() => maker.clone());

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).

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions