`electron-winstaller` marked as optionalDependency causes missing transitive dependencies in `maker-squirrel`
- 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.
### Forge version
7.11.2
### Electron version
42.3.0
### Operating system
Win11 24H2
### Last known working Forge version
7.11.1
### Expected behavior
`electron-winstaller` should be installed with a complete and consistent dependency tree, regardless of package manager, so that:
- all required transitive dependencies are reliably resolved
- behavior is consistent across npm / `pnpm` / yarn
- CI builds are deterministic
### Actual behavior
Because `electron-winstaller` is an `optionalDependency`, its dependency resolution becomes unreliable in some package managers and environments.
### Steps to reproduce
Using pnpm:
```
pnpm add electron-forge @electron-forge/maker-squirrel
pnpm install
pnpm electron-forge make
```
In pnpm environments, this results in errors similar to:
```
Error: Cannot find module 'lodash'
```
missing transitive dependencies inside `electron-winstaller`.
### Additional information
`@electron-forge/maker-squirrel` depends on `electron-winstaller`, which is declared as an `optionalDependency`.
This leads to cases where `electron-winstaller` is installed, but its transitive dependencies are not reliably installed/resolved in certain package managers (notably pnpm), causing runtime or build failures.
Contributor guide
Assessment
This issue has not been assessed yet.