electron / electron/forge

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

Open
#3,426 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
7.1k
Forks
641
Avg merge
3d 1h
Merged PRs (30d)
30

Description

### Pre-flight checklist

- [X] I have read the [contribution documentation](https://github.com/electron/forge/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) 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.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: https://github.com/SpacingBat3/ReForged/issues/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):
https://github.com/electron/forge/blob/7370d6e9e3e08be22e169c6712144ff24b08ecee/packages/api/core/src/api/make.ts#L185

### Additional information

Related commit: https://github.com/electron/forge/commit/7370d6e9e3e08be22e169c6712144ff24b08ecee
Related PR: https://github.com/electron/forge/pull/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).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.