arantes555 / electron-fetch

A light-weight module that brings window.fetch to the background process of Electron
Other
133 stars 21 forks source link

Agent option silently ignored when useElectronNet is enabled #34

Open sliminas opened 3 years ago

sliminas commented 3 years ago

In the options section the agent option is described like this: agent: null, // (/!\ only works when useElectronNet is false) Node HTTP Agent.,

If we know upfront that this option is not supported with useElectronNet enabled maybe there should be a check for that? Like this the user gets direct feedback when using the wrong option combination and would avoid problems when e.g. switching from node-fetch to electron-fetch in which case it's easy to miss that information and the agent option is just silently ignored.

What do you think?

arantes555 commented 3 years ago

Thank you for the PR !

This would be a breaking change, and in my opinion is not big enough to warrant a major version bump. I will keep this in mind for when I have enough changes to publish a major version.