Commit Graph

16 Commits

Author SHA1 Message Date
Alex Potsides 50536d1e02
fix: premature close with chunked transfer encoding and for async iterators in Node 12 (#1172)
* fix: premature close with chunked transfer encoding and for async iterators in Node 12

This PR backports the fix from #1064 to the `2.x.x` branch following
the [comment here](https://github.com/node-fetch/node-fetch/pull/1064#issuecomment-849167400).

I had to add some extra babel config to allow using the `for await..of`
syntax in the tests.  The config is only needed for the tests as
this syntax is not used in the implementation.

* chore: fix up tests for node 6+

* chore: codecov dropped support for node < 8 without shipping major

* chore: npm7 strips empty dependencies hash during install

* chore: pin deps to versions that work on node 4

* chore: do not emit close error after aborting a request

* chore: test on node 4-16

* chore: simplify chunked transer encoding bad ending

* chore: avoid calling .destroy as it is not in every node.js release

* chore: listen for response close as socket is reused and shows warnings
2022-07-16 15:16:51 +02:00
David Frank 05f5ac12a2
Node 12 compatibility (#614)
* dev package bump
* test invalid header differently as node 12 no longer accepts invalid headers in response
* add node v10 in travis test list as node 12 has been released
2019-04-27 00:11:52 +08:00
Timothy Gu 989c8434a9
Uninstall encoding before first Travis test run
encoding can be included in the Travis CI cache, and thus needs to be
manually uninstalled first.
2018-03-25 18:59:21 -07:00
Timothy Gu 6b42bd68cb
Consolidate Travis CI matrix for encoding (#436)
See: #431
2018-03-25 14:56:37 -07:00
David Frank 6192398c46
Travis CI fix (#366)
* a quick test to see if we can drop npm install before script
* adding node 8 lts
2017-11-19 12:22:28 +08:00
Jared Kantrowitz 432cd8a31e remove `encoding` as a dependency, throw detailed Error if not installed (#302)
* remove `encoding` as a dependency, throw descriptive Error if textConverted() is used without it in env

* remove rollup ext dep resolution since we don't need it

* switch to programmer error, rm unneeded test conditions, bump timeout for slow CI

* more kill `encoding` dep PR changes

keep blank "dependencies" prop in package.json so rollup's external config func doesn't seize
add ext dep checks back to the rollup config
no implicit var
clarify test comment

* [squash] alter travis cfg to test with and without `encoding`, various

fix devDeps
separate `encoding` tests to their own block

* [squash] fixing nits

* [squash] ci: full matrix of form-data versions and encoding existence

and nits
2017-07-02 12:32:48 -04:00
Tino Vyatkin edb28a6c50 Drop Node.js v0.12 support (#240) 2017-02-26 13:17:47 -08:00
Timothy Gu 25d139a4d0 Officially drop support for 0.10
Current LTS releases are added.
2016-11-23 11:50:36 -08:00
Timothy Gu ba8c392965 Cache node_modules in Travis
[ci skip]
2016-10-13 00:42:26 -07:00
David Frank 523a6920aa testing both form-data 1.x and 2.x support 2016-09-26 12:58:04 +08:00
David Frank 054fbb4d8c no longer test for deprecated iojs 2016-03-19 15:34:14 +08:00
David Frank a3e14b503a make sure we support latest node and legacy node 2015-09-28 20:46:39 +08:00
David Frank 281037c795 travis and tests update, plus some doc clean up 2015-03-19 23:38:27 +08:00
David Frank 41806e3330 try iojs travis support 2015-02-06 19:11:15 +08:00
David Frank ff81206c4a better test coverage 2015-01-28 01:00:53 +08:00
David Frank b1e70e149e travis integration 2015-01-27 21:18:30 +08:00