Commit Graph

613 Commits

Author SHA1 Message Date
Jimmy Wärting 2f1b426a98
docs: Add example for loading ESM from CommonJS (#1236)
* docs: Documented other ways to load ESM

* finegraned -> fine graned

* change require to import

* await response and discourage res.buffer()

* corrected minimum node version required

* updated changelog

* docs: Fix spelling

* docs: encourage v2 from cjs
2021-08-28 02:10:08 +02:00
Travis D. Warlick, Jr 51861e98a8
Fix(premature close) Redirect failing when response is chunked but empty (#1222)
* Fix redirect failing when response is chunked but empty. #1220 #1064

* Handle chunked responses where the final chunk and EOM code are in separate packets and where there is an additional data chunk in the same packet before the final chunk and EOM code.
2021-08-12 18:37:22 +02:00
Richie Bendall 136a5f1433
Add link to v2 docs (#1202) 2021-08-08 02:42:00 +12:00
Antoni Kepinski b50fbc1057
Require Node.js 12.20.0 and move to ESM (#1141)
* Use ESM import in runkit example file

* Update dependencies, version and transition to ESM

* Use ESM imports, add ESM-related info

* Remove rollup

* Lint TypeScript-related files

* Update dependency

* Lint & update dependency

* Lint

* Remove commonjs tests

* chore: update changelog

* Remove commonjs GitHub action

* Update funding.yml

* Update linter rules

* Lint

* Fix tsd

* Remove unnecessary types

* Simplify

* Use top-level await

* Update GitHub Actions

* Use Mocha with ESM

* Revamp

* specify what node version

* update formdata-node dep

* remove lint from example using top await

* updated name and link to formdata-polyfill

* Stop recommend form-data

* filter example - it has many duplicate variables

* Update type definitions to ESM

* Remove unused lint rule disable comment

* Remove leftover rollup and dist folder

* updated depn

* updated d.ts

* lint

* Fix breaking changes with blob v3 stream()

* revert eslint comment

* revert back to xo 0.39

Don't want to deal with all those new rules right now. will fix it later
fixed some of them...

* none TS fan trying to fix type definition

* Give me a break

* Test on all minimum supported Node.js versions (#1170)

* Test on all minimum supported Node.js versions

* Tweak Node.js workaround version range

* Handle Node.js 16 aborted error message

* fix node version string compare

Co-authored-by: Jimmy Wärting <jimmy@warting.se>

* bumped fetch-blob version

* import from dom lib

* rm unused comment

* updated required version in docs

* fixed named import

* set lowest support to 12.20.0

* comment explaining both

* rm log

Co-authored-by: Jimmy Wärting <jimmy@warting.se>
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
2021-07-18 22:15:19 +02:00
Josephus Paye II ffef5e3c23
Fix `this` arg for URLSearchParams prototype call (#1111) 2021-05-04 00:28:50 +02:00
dependabot-preview[bot] 694b11a8ba
Upgrade to GitHub-native Dependabot (#1139)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-04 00:14:45 +02:00
Tanguy Krotoff 3b50b0c4e6
Add support for Response.error() (#1078) 2021-05-03 23:09:37 +02:00
Jiralite 1780f5ae89
fix: Add missing insecureHTTPParser in RequestInit interface (#964) 2021-03-10 21:51:31 -05:00
Berkan Sivri 9e50c5bbc1
Update README.md (#1112) 2021-03-10 21:45:43 -05:00
Travis D. Warlick, Jr d8fc32d6b2
Fully test both AbortController implementations, Bump abortcontroller-polyfill to 1.7.1 (#1065) 2021-03-04 10:01:38 -05:00
Travis D. Warlick, Jr f2ff9ecd04
Test empty status text (#1069) 2021-02-28 15:05:23 -05:00
Travis D. Warlick, Jr 8eeeec18c1
Fix premature close with chunked transfer encoding and for async iterators in Node 12 (#1064)
Co-authored-by: Irakli Gozalishvili <contact@gozala.io>
2021-02-23 07:14:09 +00:00
Leonardo Quixada 6ee9d3186f
Improve Header's forEach method compliance with browser implementation. (#1074)
* Improve Header's forEach method compliance with browser implementation.

* Replaced callback.call with Reflect.apply on Headers' forEach.

* Set undefined as default value for Header' forEach second argument.

* Rewrote test case where 'this' is undefined.

* Ignored lint issues (no-eq-null and eqeqeq).
2021-01-25 19:59:55 -05:00
Sami Jaber e333578417
fix formdata-node example (#1068) 2021-01-24 00:50:15 +01:00
James Bart Dorsey 1c30aec334
Removing confusingly named 'json' variable in examples (#1073)
Using a variable named "json" for the parsed JSON data is confusing, because at that point the data is __not__ JSON anymore.
2021-01-24 00:49:29 +01:00
Travis D. Warlick, Jr 4abbfd231f
Test custom inspect function for `Header` (#1017) 2021-01-01 18:39:48 +13:00
Travis D. Warlick, Jr cb032ea44f
Throw a `TypeError` on an invalid redirect option (#1019) 2021-01-01 18:38:44 +13:00
Travis D. Warlick, Jr 5c657e7990
Fix missing return after reject (#1022)
The bad Location header is escaped by the URL module, so any "corrupted" headers become valid or otherwise cause errors earlier in processing
2021-01-01 18:38:11 +13:00
William Orr 1f4f85e1bb
Support instances of `EventTarget` as a `signal` (#1001)
Co-authored-by: Richie Bendall <richiebendall@gmail.com>
2021-01-01 18:37:26 +13:00
Travis D. Warlick, Jr c86886249a
Allow `signal` to be `null` or `undefined` (#1050) 2021-01-01 18:35:46 +13:00
Sean d016690cd3
Fix indent (#1043) 2020-12-20 12:23:26 -05:00
ritmos 17b6c10052
Fix changelog (#1025)
Link was broken
2020-12-06 22:43:16 +01:00
Travis D. Warlick, Jr 7038d8d0c1
Readme tweaks (#1021)
Co-authored-by: Richie Bendall <richiebendall@gmail.com>
2020-12-06 22:42:56 +01:00
David Frank 0d35ddbf73
remove automatic title assignment from issue templates, prevent users submitting default title. (#976) 2020-10-18 13:33:06 +02:00
Jimmy Wärting cbd4d89576
Minor optimization (#956) 2020-09-18 12:33:15 +02:00
Antoni Kepinski 38839c53bd
lint 2020-09-05 14:51:31 +02:00
Antoni Kepinski 7d190b46f8
update dependencies 2020-09-05 14:49:09 +02:00
Antoni Kepinski 53b40fb3ea
update version number 2020-09-05 14:46:35 +02:00
Antoni Kepinski eaff0094c4
Honor the `size` option after following a redirect 2020-09-05 14:44:41 +02:00
Antoni Kepinski 64c5c296a0
Release 3.0.0-beta.8 (#912)
Co-authored-by: Richie Bendall <richiebendall@gmail.com>
2020-08-10 10:39:52 +02:00
Rhys Evans b7076bb24f
Export package.json (#908)
* Export package.json

* Correct exports structure to support multiple modules
2020-08-07 00:10:06 +02:00
bbodela ca50c22e34
Fix typo in ERROR-HANDLING.md:required -> require (#898) 2020-07-12 14:08:34 +02:00
dependabot-preview[bot] 8fed3137f8
Bump tsd from 0.11.0 to 0.13.1 (#895)
Bumps [tsd](https://github.com/SamVerschueren/tsd) from 0.11.0 to 0.13.1.
- [Release notes](https://github.com/SamVerschueren/tsd/releases)
- [Commits](https://github.com/SamVerschueren/tsd/compare/v0.11.0...v0.13.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-09 16:09:46 +02:00
Konstantin Vyatkin 0f0e6253ae
remove parted dependency (#883) 2020-06-13 11:43:45 +02:00
Konstantin Vyatkin 2751bd56eb
allow to run mocha tests in parallel (#880) 2020-06-13 05:34:59 -04:00
Konstantin Vyatkin 96431ed4a1
remove string-to-arraybuffer (#882) 2020-06-13 03:13:50 -04:00
Antoni Kepinski e17cefbb90
Remove duplicated tests (#873)
* move some of the previously deleted tests to the external-encoding.js
2020-06-12 14:06:30 -04:00
Konstantin Vyatkin 1fdc218a64
fix window.fetch (#875) 2020-06-11 15:52:02 -04:00
Konstantin Vyatkin 91155d6be6
fix: min semver Node version (#874)
* fix semver node version

* add package.json to editorconfig
2020-06-11 15:27:45 -04:00
Antoni Kepinski 2c005872ae
Release 3.0.0-beta.7 (#869) 2020-06-11 11:29:21 +02:00
Nick K a38b533ad6
feat: Implement form-data encoding (#603)
Co-authored-by: Steve Moser <contact@stevemoser.org>
Co-authored-by: Antoni Kepinski <xxczaki@pm.me>
Co-authored-by: Richie Bendall <richiebendall@gmail.com>
Co-authored-by: Konstantin Vyatkin <tino@vtkn.io>
Co-authored-by: aeb-sia <50743092+aeb-sia@users.noreply.github.com>
Co-authored-by: Nazar Mokrynskyi <nazar@mokrynskyi.com>
Co-authored-by: Erick Calder <e@arix.com>
Co-authored-by: Yaacov Rydzinski <yaacovCR@gmail.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-10 22:31:35 +02:00
Konstantin Vyatkin 2d796bde76
upgrade fetch-blob to 1.0.7 (#870)
Co-authored-by: Antoni Kepinski <xxczaki@pm.me>
2020-06-10 21:14:32 +02:00
Richie Bendall e945b6b846
Update logging statement for commonjs artifact testing (#868) 2020-06-10 08:30:07 -04:00
Konstantin Vyatkin 8f406b789a
chore: remove code duplication in custom errors (#842)
* remove code duplication in custom errors

* check using base class
2020-06-10 07:17:35 -04:00
Konstantin Vyatkin 1cb9070cce
[Spec] Should check body _source_ on redirect (#866)
* correct stream tests

* bump Node.JS min to 10.17

* lint
2020-06-10 07:16:51 -04:00
Konstantin Vyatkin df1a4fafa9
fix: Correct Node versions were not installed on test matrix (#846)
* fix Node install and add engines

* use minimum-node-version
2020-06-09 20:26:24 -04:00
Konstantin Vyatkin 5c909797d6
Polyfill `http.validateHeaderName` and `http.validateHeaderValue` (#843)
* prefer native node function

* use RegExp from Node 14.3
2020-06-09 19:51:22 -04:00
arc298 1973503453
fix: updates README to use correct response variable in Advanced Usage (#862)
Co-authored-by: arc298 <rarcega@users.noreply.github.com>
2020-06-05 22:24:32 +02:00
Moni d351058cae
Update Url (#864) 2020-06-05 19:00:13 +02:00
Matti Schneider b121feb8f5
Fix Headers import statement (#859) 2020-06-04 13:33:22 -04:00