chai-http icon indicating copy to clipboard operation
chai-http copied to clipboard

Update superagent dependecy to avoid deprecation warnings

Open johnkrzywanek opened this issue 5 years ago • 2 comments

Hi, I am experiencing the following deprecation warning:

DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

on chai-http requests.

After a quick investigation that is an issue that was resolved in the latest version of superagent (5.1.2) https://github.com/visionmedia/superagent/issues/1502

Is there a reason for locking the superagent to version 3.x?

  "dependencies": {
...
    "@types/superagent": "^3.8.3",
...
    "superagent": "^3.7.0"
  },

from https://github.com/chaijs/chai-http/blob/master/package.json

If not, I am happy to add a PR to remove this lock

johnkrzywanek avatar Dec 05 '19 10:12 johnkrzywanek

Hey, thanks for the issue! I'm not sure exactly what breaking changes are in superagent >3, but our use of superagent is mostly in https://github.com/chaijs/chai-http/blob/master/lib/request.js. Do you still have time to add a PR/ would you mind checking if our usage is compatible?

austince avatar Dec 11 '19 15:12 austince

Hi. What's the status of this issue? Looks fixed but not released (?)

gian1200 avatar Oct 04 '22 01:10 gian1200