mailjet / mailjet-apiv3-nodejs

[API v3] Official Mailjet API v3 NodeJS wrapper
https://dev.mailjet.com
MIT License
232 stars 67 forks source link

Upgrade superagent dependency #153

Closed PaulKiddle closed 2 years ago

PaulKiddle commented 3 years ago

There's a bug in one of the modules in superagent 3.8.3's dependency tree:

https://github.com/TooTallNate/node-agent-base/issues/35

It's causing unrelated code to break because it (badly) patches the core https module.

More recent versions of superagent don't use this module

rockebee commented 3 years ago

Can confirm this issue which just occurred for me when integrating mailjet into a project which uses got and afterwards failed to send out requests to other systems :/ Very uncomfortable situation, as I was only able to find a kind of hacky "workaround" in above mentioned thread, namely https://github.com/TooTallNate/node-agent-base/issues/35#issuecomment-619212453 (which seems to work for me as I'm not using any proxy configuration, but no idea whether this breaks anything else in the future ...)

However, @mailjet devs: Please prioritize this issue - the upstream fix in superagent-proxy is from October 2020 (https://github.com/TooTallNate/superagent-proxy/pull/37)

flo-sch commented 3 years ago

Seems like the (untagged?) v3.3.4 has bumped superagent@^2.1.0

This may have fixed this issue?

kenjinsama commented 2 years ago

Seems like the (untagged?) v3.3.4 has bumped superagent@^2.1.0

This may have fixed this issue?

I assume you wanted to say superagent-proxy@2.1.0 ? If so, yes it works with superagent-proxy@2.1.0 and superagent@6.1.0.

fivetwelve commented 2 years ago

Hello, I installed node-mailjet into my project today and there's an upstream warning recommending that superagent be upgraded:

superagent@6.1.0: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>

scroll17 commented 2 years ago

Hey @PaulKiddle @rockebee @flo-sch @kenjinsama @fivetwelve

This problem was resolved in PR fix: update vulnerable dependency - superagent

And now released version 3.1.11 with fixed all vulnerability dependencies.