Commit Graph

80 Commits

Author SHA1 Message Date
Max Gerber e87b093fd6
fix(Headers): don't forward secure headers on protocol change (#1599)
* fix(Headers): don't forward secure headers on protocol change

* fix lint
2022-07-18 17:20:30 +02:00
Krisi Ves 1c5ed6b981
fix: undefined reference to response.body when aborted (#1578) 2022-06-09 10:55:02 +00:00
Felipe Contreras 043a5fcfc8
Fix leaking listeners (#1295) (#1474)
Since 8eeeec1 it seems listeners have been leaking on keep-alive
sockets.

Apparently abort() has been deprecated since v17, using close() the
onSocketClose listener is properly removed, and by creating a new onData
function I'm able to remove the 'data' listener too.
2022-05-07 23:56:37 +02:00
Jimmy Wärting 81b1378bb3
feat: export Blob, File and FormData + utilities (#1463)
* feat: export FormData, Blob and Files

* use import from index instead

* sort a-z

* explicit export

* bump version

* xo lint
2022-01-20 21:42:44 +01:00
Maciej Goszczycki dd2cea4672
Handle zero-length OK deflate responses (master) (#965)
* Handle zero-length OK deflate responses

* Also handle pump callback in the deflate branch

* Update the use of pump everywhere and link to the original PR

* Address lints
2022-01-17 00:41:37 +01:00
Travis D. Warlick, Jr 5304f3f7f7
Don't change relative location header on manual redirect (#1105)
* Don't change relative location header on manual redirect

* c8 ignores for node-version-specific code and fix c8 ignore in Headers constructor
2022-01-15 22:08:16 +01:00
Jimmy Wärting f5d3cf5e25
fix(Headers): don't forward secure headers to 3th party (#1449)
* fix(Headers): don't forward secure headers to 3th party
* added more narrow test for isDomainOrSubdomain
2022-01-14 15:55:41 +01:00
Jimmy Wärting 1493d046bc
core: Don't use global buffer (#1422)
* remove unused file

* two test is coveraged by the Uint8Array test

* use arrayBuffer to test base64 instead

* avoid testing buffer

* avoid using Buffer

* import buffer module

* use one same textEncoder

* import stream consumer that can test iterable objects

* fix a test

* fix test where type should be empty
2021-12-21 20:34:30 +01:00
Tasos Bitsios 6e4c1e4f67
fix(Redirect): Better handle wrong redirect header in a response (#1387)
* Fixed crash when an invalid Location URL is returned from a redirect. Fixes #1386

* CHANGELOG entry

* changed catch(e) -> catch(error) to match rest of code, added comment

Co-authored-by: Linus Unnebäck <[email protected]>

* suppress error on invalid redirect URL when options.redirect == manual

Co-authored-by: Tasos Bitsios <[email protected]>
Co-authored-by: Linus Unnebäck <[email protected]>
2021-11-26 11:19:25 +01:00
Dmitry Merkulov 2d5399ed56
fix: handle errors from the request body stream (#1392)
* fix: handle errors from the request body stream

* lint: fix linting

Co-authored-by: Linus Unnebäck <[email protected]>
2021-11-19 14:40:51 +01:00
Jimmy Wärting 0284826de6
fix(http.request): Cast URL to string before sending it to NodeJS core (#1378)
* Add some jsdoc

* cast url to string before sending it to NodeJS core
2021-11-12 12:37:51 +01:00
Travis D. Warlick, Jr 2d80b0bb3f
Add support for Referrer and Referrer Policy (#1057)
* Support referrer and referrerPolicy

* Test TS types for addition of referrer and referrerPolicy

* Fix lint issues and merge error
2021-11-05 10:26:13 +01:00
dnalborczyk 47d9cde0b0
refactor: use node: prefix for imports (#1346)
* refactor: use node: prefix for imports
2021-10-26 11:06:52 +02:00
Jimmy Wärting 8721d79208
fix(Body.body): Normalize `Body.body` into a `node:stream` (#924)
* body conversion and test

* also handle blobs

* typeof null is object

* test for blob also

* lowercase boundary are easier

* unreachable code, body should never be a blob or buffer any more.

* stream singleton

* use let

* typo

* convert blob stream into a whatwg stream

* lint fix

* update changelog

Co-authored-by: Antoni Kepinski <[email protected]>
2021-09-14 11:39:33 +02:00
Ambrose Chua 8b54ab4509
fix: Pass url string to http.request (#1268)
* fix: IPv6 literal parsing

* docs: Explain why search is overwritten

* test: Document the reason for square brackets

* docs: Mention basic auth support as a difference

* fix: Raise a TypeError when URL includes credentials
2021-09-09 06:02:05 +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
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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Linus Unnebäck <[email protected]>
2021-07-18 22:15:19 +02: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 <[email protected]>
2021-02-23 07:14:09 +00: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
Jimmy Wärting cbd4d89576
Minor optimization (#956) 2020-09-18 12:33:15 +02:00
Antoni Kepinski eaff0094c4
Honor the `size` option after following a redirect 2020-09-05 14:44:41 +02: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 69d25b904a
Fix Data URI handling and drop all URL analysis RegExps (#853)
* add breaking test
* don't use RegExp for URLs
2020-05-31 11:15:27 -04:00
Konstantin Vyatkin 769f75d054
Drop custom Promises and refactor to `async` functions (#845)
* refactor to async

* no custsom promises anymore

* restore server premature handler

* simplify

* fixing break

* lint

* remove promise dependency

* fix docs
2020-05-28 23:57:57 +02:00
Antoni Kepinski 079b11e257
fix: export 2020-05-25 19:20:30 +02:00
Antoni Kepinski fa627f4b0c
Follow xo linter rules more strictly (#829)
Co-authored-by: Moni <[email protected]>
2020-05-25 17:11:56 +02:00
Konstantin Vyatkin ca4703dd15
revamp Headers module (#834)
Co-authored-by: Antoni Kepinski <[email protected]>
2020-05-25 16:43:10 +02:00
Richie Bendall 94e5b92de1
Remove `timeout` option (#831) 2020-05-25 13:30:05 +02:00
Antoni Kepinski c822ff4719
Replace istanbul ignore next with c8 ignore next 2020-05-24 00:28:17 +02:00
Konstantin Vyatkin ead6b458e9
normalize export (#827) 2020-05-23 13:32:10 -04:00
Konstantin Vyatkin 07c6b7490d
Move `isRedirect` function to a seperate file (#821)
* fix isRedirect export

Co-authored-by: Richie Bendall <[email protected]>
2020-05-23 00:00:02 -04:00
Konstantin Vyatkin 28655e1390
Add Brotli support in Request (#819)
* document and request brotli

* Document different minimum version

Co-authored-by: Richie Bendall <[email protected]>
2020-05-22 22:48:14 -04:00
Jonathan Stewmon 63d3663466
fix: disambiguate timeout behavior for response headers and body (#770)
There is a single timeout option which applies to both the receiving of
response headers and the receiving of the entire response body. Once
the response is received, the socket timeout must be cleared to allow
the timeout to apply to the receiving of the entire response body.

Without clearing the socket timeout, if the nearing the idle timeout
when the Promise for the body is created, then the request's timeout
handler will abort the request, emitting ERR_STREAM_PREMATURE_CLOSE in
the body Promise.

By clearing the socket timeout once the response headers are received,
the timeout for the entire body can be started when the body is awaited.
Since the request will no longer be aborted by the socket timeout,
destroy is called on the body to prevent it continuing to emit data
events.
2020-05-22 15:19:05 -04:00
Konstantin Vyatkin 0f97d62844
drop Babel (while keeping ESM) (#805)
* drop Babel

* fix lint

* just to trigger CI

* Update package.json

Co-authored-by: Linus Unnebäck <[email protected]>

* fix all imports

* coverage only from Node 14.x

* remove esm

* restore travis

* fix lint

Co-authored-by: Linus Unnebäck <[email protected]>
2020-05-21 02:50:31 -04:00
Richie Bendall 553bb5dc56
Export `AbortError` (Fixes: #792)
Signed-off-by: Richie Bendall <[email protected]>
2020-05-06 23:47:43 +12:00
Richie Bendall d15476bb5d
Compile CJS modules as a seperate set of files (#778)
* Switch to seperate babel compilation

Signed-off-by: Richie Bendall <[email protected]>

* resolve merge conflict

* add missing devDependency

* fix wrong name

* Specify ES version under `module` property and specify `sideEffects`

Co-authored-by: Antoni Kepinski <[email protected]>
2020-04-14 13:03:24 +02:00
Antoni Kepinski c167190c6e
revert fix: Properly export fetch 2020-03-28 19:03:23 +01:00
Richie Bendall 7c66f9ce82
fix: Properly export fetch
Signed-off-by: Richie Bendall <[email protected]>
2020-03-14 23:08:36 +13:00
David Frank 0959ca9739
merge 3.x into master branch (#745)
* feat: Migrate TypeScript types (#669)

* style: Introduce linting via XO

* fix: Fix tests

* chore!: Drop support for nodejs 4 and 6

* chore: Fix Travis CI yml

* Use old Babel (needs migration)

* chore: lint everything

* chore: Migrate to microbundle

* Default response.statusText should be blank (#578)

* fix: Use correct AbortionError message

Signed-off-by: Richie Bendall <[email protected]>

* chore: Use modern @babel/register

Signed-off-by: Richie Bendall <[email protected]>

* chore: Remove redundant packages

Signed-off-by: Richie Bendall <[email protected]>

* chore: Readd form-data

Signed-off-by: Richie Bendall <[email protected]>

* fix: Fix tests and force utf8-encoded urls

Signed-off-by: Richie Bendall <[email protected]>

* lint index.js

* Update devDependencies & ignore `test` directory in linter options

* Remove unnecessary eslint-ignore comment

* Update the `lint` script to run linter on every file

* Remove unused const & unnecessary import

* TypeScript: Fix Body.blob() wrong type (DefinitelyTyped/DefinitelyTyped#33721)

* chore: Lint as part of the build process

* fix: Convert Content-Encoding to lowercase (#672)

* fix: Better object checks (#673)

* Fix stream piping (#670)

* chore: Remove useless check

Signed-off-by: Richie Bendall <[email protected]>

* style: Fix lint

Signed-off-by: Richie Bendall <[email protected]>

* style: Fix lint

Signed-off-by: Richie Bendall <[email protected]>

* refactor: Modernise code

Signed-off-by: Richie Bendall <[email protected]>

* chore: Ensure all files are properly included

Signed-off-by: Richie Bendall <[email protected]>

* chore: Update deps and utf8 should be in dependencies

Signed-off-by: Richie Bendall <[email protected]>

* test: Drop Node v4 from tests

Signed-off-by: Richie Bendall <[email protected]>

* test: Modernise code

Signed-off-by: Richie Bendall <[email protected]>

* chore: Move errors to seperate directory

Signed-off-by: Richie Bendall <[email protected]>

* refactor: Add fetch-blob (#678)

* feat: Migrate data uri integration

Signed-off-by: Richie Bendall <[email protected]>

* Allow setting custom highWaterMark via node-fetch options (#386) (#671)

* Expose highWaterMark option to body clone function

* Add highWaterMark to responseOptions

* Add highWaterMark as node-fetch-only option

* a way to silently pass highWaterMark to clone

* Chai helper

* Server helper

* Tests

* Remove debug comments

* Document highWaterMark option

* Add TypeScript types for the new highWaterMark option

* feat: Include system error in FetchError if one occurs (#654)

* style: Add editorconfig

Signed-off-by: Richie Bendall <[email protected]>

* chore!: Drop NodeJS v8

Signed-off-by: Richie Bendall <[email protected]>

* chore: Remove legacy code for node < 8

Signed-off-by: Richie Bendall <[email protected]>

* chore: Use proper checks for ArrayBuffer and AbortError

Signed-off-by: Richie Bendall <[email protected]>

* chore: Use explicitly set error name in checks

Signed-off-by: Richie Bendall <[email protected]>

* Propagate size and timeout to cloned response (#664)

* Remove --save option as it isn't required anymore (#581)

* Propagate size and timeout to cloned response


Co-authored-by: Steve Moser <[email protected]>
Co-authored-by: Antoni Kepinski <[email protected]>

* Update Response types

* Update devDependencies

* feat: Fallback to blob type (Closes: #607)

Signed-off-by: Richie Bendall <[email protected]>

* style: Update formatting

Signed-off-by: Richie Bendall <[email protected]>

* style: Fix linting issues

Signed-off-by: Richie Bendall <[email protected]>

* docs: Add info on patching the global object

* docs: Added non-globalThis polyfill

* Replace deprecated `url.resolve` with the new WHATWG URL

* Update devDependencies

* Format code in examples to use `xo` style

* Verify examples with RunKit and edit them if necessary

* Add information about TypeScript support

* Document the new `highWaterMark` option

* Add Discord badge & information about Open Collective

* Style change

* Edit acknowledgement & add "Team" section

* fix table

* Format example code to use xo style

* chore: v3 release changelog

* Add the recommended way to fix `highWaterMark` issues

* docs: Add simple Runkit example

* fix: Properly set the name of the errors.

Signed-off-by: Richie Bendall <[email protected]>

* docs: Add AbortError to documented types

Signed-off-by: Richie Bendall <[email protected]>

* docs: AbortError proper typing parameters

Signed-off-by: Richie Bendall <[email protected]>

* docs: Add example code for Runkit

Signed-off-by: Richie Bendall <[email protected]>

* Replace microbundle with @pika/pack (#689)

* gitignore the pkg/ directory

* Move TypeScript types to the root of the project

* Replace microbundle with @pika/pack

* chore: Remove @pika/plugin-build-web and revert ./dist output directory

Signed-off-by: Richie Bendall <[email protected]>


Co-authored-by: Richie Bendall <[email protected]>

* fix incorrect statement in changelog

* chore: v3.x upgrade guide

* Change the Open Collective button

* docs: Encode support button as Markdown instead of HTML

* chore: Ignore proper directory in xo

* Add an "Upgrading" section to readme

* Split the upgrade guide into 2 files & add the missing changes about v3.x

* style: Lint test and example files

Signed-off-by: Richie Bendall <[email protected]>

* Move *.md files to the `docs` folder (except README.md)

* Update references to files

* Split LIMITS.md into 2 files (as of v2.x and v3.x)

* chore: Remove logging statement

Signed-off-by: Richie Bendall <[email protected]>

* style: Fix lint

* docs: Correct typings for systemError in FetchError (Fixes #697)

* refactor: Replace `encoding` with `fetch-charset-detection`. (#694)

* refactor: Replace `encoding` with `fetch-charset-detection`.

Signed-off-by: Richie Bendall <[email protected]>

* refactor: Move writing to stream back to body.js

Signed-off-by: Richie Bendall <[email protected]>

* refactor: Only put convertBody in fetch-charset-detection and refactor others.

Signed-off-by: Richie Bendall <[email protected]>

* test: Readd tests for getTotalBytes and extractContentType

Signed-off-by: Richie Bendall <[email protected]>

* chore: Revert package.json indention

Signed-off-by: Richie Bendall <[email protected]>

* chore: Remove optional dependency

* docs: Replace code for fetch-charset-detection with documentation.

Signed-off-by: Richie Bendall <[email protected]>

* chore: Remove iconv-lite

* fix: Use default export instead of named export for convertBody

Signed-off-by: Richie Bendall <[email protected]>

* chore: Remove unneeded installation of fetch-charset-detection in the build

* docs: Fix typo

* fix: Throw SyntaxError instead of FetchError in case of invalid… (#700)

* fix: Throw SyntaxError instead of FetchError in case of invalid JSON

Signed-off-by: Richie Bendall <[email protected]>

* docs: Add to upgrade guide

Signed-off-by: Richie Bendall <[email protected]>

* Remove deprecated url.parse from test

* Remove deprecated url.parse from server

* fix: Proper data uri to buffer conversion (#703)

Signed-off-by: Richie Bendall <[email protected]>

* chore: Add funding info

* fix: Flawed property existence test (#706)

Fix a problem where not all prototype methods are copied from the Body via the mixin method due to a failure to properly detect properties in the target. The current code uses the `in` operator, which may return properties lower down the inheritance chain, thus causing them to fail the copy. The new code properly calls the `.hasOwnProperty()` method to make the determination.

* fix: Properly handle stream pipeline double-fire

Signed-off-by: Richie Bendall <[email protected]>

* docs: Fix spelling

Signed-off-by: Richie Bendall <[email protected]>

* chore: Add `funding` field to package.json (#708)

* Fix: Do not set ContentLength to NaN (#709)

* do not set ContentLength to NaN

* lint

* docs: Add logo

Signed-off-by: Richie Bendall <[email protected]>

* chore: Update repository name from bitinn/node-fetch to node-fetch/node-fetch.

Signed-off-by: Richie Bendall <[email protected]>

* chore: Fix unit tests

Signed-off-by: Richie Bendall <[email protected]>

* chore(deps): Bump @pika/plugin-copy-assets from 0.7.1 to 0.8.1 (#713)

Bumps [@pika/plugin-copy-assets](https://github.com/pikapkg/builders) from 0.7.1 to 0.8.1.
- [Release notes](https://github.com/pikapkg/builders/releases)
- [Commits](https://github.com/pikapkg/builders/compare/v0.7.1...v0.8.1)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* chore(deps): Bump @pika/plugin-build-types from 0.7.1 to 0.8.1 (#710)

Bumps [@pika/plugin-build-types](https://github.com/pikapkg/builders) from 0.7.1 to 0.8.1.
- [Release notes](https://github.com/pikapkg/builders/releases)
- [Commits](https://github.com/pikapkg/builders/compare/v0.7.1...v0.8.1)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Bump nyc from 14.1.1 to 15.0.0 (#714)

Bumps [nyc](https://github.com/istanbuljs/nyc) from 14.1.1 to 15.0.0.
- [Release notes](https://github.com/istanbuljs/nyc/releases)
- [Changelog](https://github.com/istanbuljs/nyc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/istanbuljs/nyc/compare/v14.1.1...v15.0.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* chore: Update travis ci url

Signed-off-by: Richie Bendall <[email protected]>

* chore(deps): Bump mocha from 6.2.2 to 7.0.0 (#711)

Bumps [mocha](https://github.com/mochajs/mocha) from 6.2.2 to 7.0.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v6.2.2...v7.0.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* feat: Allow excluding a user agent in a fetch request by setting… (#715)

Signed-off-by: Richie Bendall <[email protected]>

* Bump @pika/plugin-build-node from 0.7.1 to 0.8.1 (#717)

Bumps [@pika/plugin-build-node](https://github.com/pikapkg/builders) from 0.7.1 to 0.8.1.
- [Release notes](https://github.com/pikapkg/builders/releases)
- [Commits](https://github.com/pikapkg/builders/compare/v0.7.1...v0.8.1)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Bump @pika/plugin-standard-pkg from 0.7.1 to 0.8.1 (#716)

Bumps [@pika/plugin-standard-pkg](https://github.com/pikapkg/builders) from 0.7.1 to 0.8.1.
- [Release notes](https://github.com/pikapkg/builders/releases)
- [Commits](https://github.com/pikapkg/builders/compare/v0.7.1...v0.8.1)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Bump form-data from 2.5.1 to 3.0.0 (#712)

Bumps [form-data](https://github.com/form-data/form-data) from 2.5.1 to 3.0.0.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Commits](https://github.com/form-data/form-data/compare/v2.5.1...v3.0.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* fix: typo

* update suggestion

* feat: Added missing redirect function (#718)

* added missing redirect function
* chore: Add types

Co-authored-by: Richie Bendall <[email protected]>

* fix: Use req.setTimeout for timeout (#719)

* chore: Update typings comment

Signed-off-by: Richie Bendall <[email protected]>

* chore: Update deps

Signed-off-by: Richie Bendall <[email protected]>

* docs: center badges & Open Collective button

* docs: add missing comma

* Remove current stable & LTS node version numbers from the comments

I don't think we really want to update them

* Bump xo from 0.25.4 to 0.26.1 (#730)

Bumps [xo](https://github.com/xojs/xo) from 0.25.4 to 0.26.1.
- [Release notes](https://github.com/xojs/xo/releases)
- [Commits](https://github.com/xojs/xo/compare/v0.25.4...v0.26.1)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Bump @pika/plugin-build-types from 0.8.3 to 0.9.2 (#729)

Bumps [@pika/plugin-build-types](https://github.com/pikapkg/builders) from 0.8.3 to 0.9.2.
- [Release notes](https://github.com/pikapkg/builders/releases)
- [Commits](https://github.com/pikapkg/builders/compare/v0.8.3...v0.9.2)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Bump @pika/plugin-standard-pkg from 0.8.3 to 0.9.2 (#726)

Bumps [@pika/plugin-standard-pkg](https://github.com/pikapkg/builders) from 0.8.3 to 0.9.2.
- [Release notes](https://github.com/pikapkg/builders/releases)
- [Commits](https://github.com/pikapkg/builders/compare/v0.8.3...v0.9.2)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* docs: Update information about `req.body` type in v3.x release

* Add information about removed body type to the v3 upgrade guide

* add awesome badge

* Show 2 ways of importing node-fetch (CommonJS & ES module)

* update dependencies

* lint

* refactor: Replace `url.parse` with `new URL()` (#701)

* chore: replace `url.parse` with `new URL()`

* lint

* handle relative URLs

* Change error message

* detect whether the url is absolute or not

* update tests

* drop relative url support

* lint

* fix tests

* typo

* Add information about dropped arbitrary URL support in v3.x upgrade guide

* set xo linting rule (node/no-deprecated-api) to on

* remove the `utf8` dependency

* fix

* refactor: split tests into several files, create the `utils` directory

* Update package.json scripts & remove unnecessary xo linting rules

* refactor: turn on some xo linting rules to improve code quality

* fix tests

* Remove invalid urls

* fix merge conflict

* update the upgrade guide

* test if URLs are encoded as UTF-8

* update xo to 0.28.0

* chore: Build before publishing

* v3.0.0-beta.1

* fix lint on test/main.js

Co-authored-by: Richie Bendall <[email protected]>
Co-authored-by: Antoni Kepinski <[email protected]>
Co-authored-by: aeb-sia <[email protected]>
Co-authored-by: Nazar Mokrynskyi <[email protected]>
Co-authored-by: Steve Moser <[email protected]>
Co-authored-by: Erick Calder <[email protected]>
Co-authored-by: Yaacov Rydzinski <[email protected]>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Jimmy Wärting <[email protected]>
2020-03-13 23:06:25 +08:00
Ramit Mittal 1e99050f94 fix: Change error message thrown with redirect mode set to error (#653)
The original error message does not provide enough information about what went wrong. It simply states a configuration setting.
2019-10-11 09:26:58 +13:00
Richie Bendall eb3a57255b
feat: Data URI support (#659)
Adds support for Data URIs using native methods in Node 5.10.0+
2019-09-08 09:44:40 +12:00
David Frank 0c2294ec48
2.5.0 release (#630)
* redirected property
* changelog update
* readme update
* 2.5.0
2019-05-01 13:05:32 +08:00
David Frank 49d77600a7
Pass custom timeout to subsequent requests on redirect (#615) 2019-04-27 00:46:53 +08:00
Muhammet Öztürk 2a2d4384af Adding Brotli Support (#598)
* adding brotli support
* support old node versions
* better test
2019-04-27 00:20:15 +08:00
David Frank 5367fe6a97
v2.3.0 (#548)
* doc update
* handle corrupted location header during redirect
2018-11-13 14:35:09 +08:00
Joseph Nields ecd3d52c55 Add support for AbortSignal to cancel requests (#539)
Thx @jnields @FrogTheFrog @TimothyGu for their work!
2018-11-13 12:40:11 +08:00
David Frank 1daae67e9e
Fix import style to workaround node < 10 and webpack issues. (#544)
* fix import rule for stream PassThrough

* avoid named export for compatibility below node 10

* compress flag should not overwrite accept encoding header

* doc update

* 2.2.1
2018-11-05 17:42:51 +08:00