fix: use a single version of electron-forge #432
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have two versions of electron-forge kicking around. ember-electron has it as a
dependency
so it can use it from the blueprint to create the Electron project using electron-forge'sinit
command. When electron-forge creates a project, it installs itself in that project, so we end up with another version inelectron-app/package.json
.When
ember-electron
was calling electron forge commands fromember electron:*
commands, it was justrequire()
ing electron-forge, which would get it the version in/node_modules
. This could be a different version from the one inelectron-app/node_modules
, so the user could get different behavior running, e.g.ember electron:make
vs.cd electron-app && yarn electron-forge make
, breaking the simple mental model.Also, recently electron-forge released a new beta version that changed the maker interface slighty, so the makers installed in
electron-app/
could be out of sync with theelectron-forge
version that theember electron
commands use. This is probably only a problem while electron-forge is in beta, but is also addressed by this change.Now, other than the initial Electron project creation that happens from the blueprint, we only use the electron-forge in
electron-app
, which puts it right next to the makes inpackage.json
allowing the user to easily see and manage the version without any hidden complexity.Fixes #431