MarshallOfSound / pruner

Prune production dependencies in a package manager agnostic way
2 stars 1 forks source link

Pruner not respecting transitive optional dependencies #3

Closed gerges-zz closed 6 years ago

gerges-zz commented 6 years ago

I think pruner might not be respecting transitive dependencies that are marked as optional. In this case

myapp@2.10.2 /Users/me/source/myapp
└─┬ electron-windows-notifications@2.0.1
  └── UNMET OPTIONAL DEPENDENCY @nodert-win10-au/windows.applicationmodel@0.2.96

fails prune with

An unhandled rejection has occurred inside Forge:
Failed to locate module "@nodert-win10-au/windows.applicationmodel" from "/var/folders/v1/901xmbvx413g7vfw031f7f300000gp/T/electron-packager/darwin-x64/MyApp-darwin-x64/Electron.app/Contents/Resources/app/node_modules/electron-windows-notifications"

In the meantime, working around this by marking the parent dependency as optional

MarshallOfSound commented 6 years ago

Module is deprecated in favor of galactus and this is fixed over there