app-builder
app-builder copied to clipboard
fix: searching outside folder unnecessarily
I found an issue where an electron project which happened to be inside another nodejs project was bundling dependencies from the parent directory unnecessarily https://github.com/electron-userland/electron-builder/issues/7745
This appears to be happening because resolveDependency can return nil when either the dependency is unresolved, or when the dependency has already been resolved. Dependencies which had already been resolved were then being re-resolved with the correct path to them being rejected, which resulted in it looking in the parent directory for this 'unresolved' dependency, causing my issue
This is not the prettiest solution, but as this repository appears unmaintained, I expect this will only serve as a reference for others