@whatwg-node/fetch 0.9.8 → 0.9.9-rc-20230714153303-d7bb7e5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @whatwg-node/fetch
2
2
 
3
+ ## 0.9.9-rc-20230714153303-d7bb7e5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#567](https://github.com/ardatan/whatwg-node/pull/567)
8
+ [`f8715cd`](https://github.com/ardatan/whatwg-node/commit/f8715cd15175e348169a11fd5531b901fec47e62)
9
+ Thanks [@ardatan](https://github.com/ardatan)! - ### Faster HTTP Client experience in Node.js with
10
+ HTTP/2 support
11
+
12
+ If you install `node-libcurl` seperately, `@whatwg-node/fetch` will select `libcurl` instead of
13
+ `node:http` which is faster.
14
+
15
+ [See benchmarks](https://github.com/JCMais/node-libcurl/tree/develop/benchmark#ubuntu-1910-i7-5500u-24ghz---linux-530-42---node-v12162)
16
+
17
+ - Updated dependencies
18
+ [[`f8715cd`](https://github.com/ardatan/whatwg-node/commit/f8715cd15175e348169a11fd5531b901fec47e62)]:
19
+ - @whatwg-node/node-fetch@0.4.8-rc-20230714153303-d7bb7e5
20
+
3
21
  ## 0.9.8
4
22
 
5
23
  ### Patch Changes
@@ -369,8 +387,8 @@
369
387
  [`563cfaa`](https://github.com/ardatan/whatwg-node/commit/563cfaaacf8bb0b08371b7f44887321d7e7c472d)
370
388
  Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
371
389
  - Added dependency
372
- [`urlpattern-polyfill@^6.0.2` ↗︎](https://www.npmjs.com/package/urlpattern-polyfill/v/6.0.2) (to
373
- `dependencies`)
390
+ [`urlpattern-polyfill@^6.0.2` ↗︎](https://www.npmjs.com/package/urlpattern-polyfill/v/6.0.2)
391
+ (to `dependencies`)
374
392
 
375
393
  ## 0.5.4
376
394
 
package/README.md CHANGED
@@ -37,6 +37,15 @@ way.
37
37
  `Buffer` is faster than the native one unfortunately.
38
38
  - `Body.formData()` is not implemented by Node.js, so we implement it with `busboy` internally. So
39
39
  you can consume incoming multipart(file uploads) requests with `.formData` in Node.js.
40
+ - `fetch` implementation of Node.js uses `undici` and it doesn't support HTTP 2, our implementation
41
+ supports it natively thanks to `node-libcurl`.
42
+
43
+ ### Faster HTTP Client in Node.js with HTTP/2 support
44
+
45
+ If you install `node-libcurl` seperately, `@whatwg-node/fetch` will select `libcurl` instead of
46
+ `node:http` which is faster.
47
+
48
+ [See benchmarks](https://github.com/JCMais/node-libcurl/tree/develop/benchmark#ubuntu-1910-i7-5500u-24ghz---linux-530-42---node-v12162)
40
49
 
41
50
  ### Handling file uploads with Fetch API
42
51
 
@@ -2,6 +2,11 @@
2
2
  const createNodePonyfill = require('./create-node-ponyfill');
3
3
  const ponyfills = createNodePonyfill();
4
4
 
5
+ try {
6
+ const nodelibcurlName = 'node-libcurl'
7
+ globalThis.libcurl = globalThis.libcurl || require(nodelibcurlName);
8
+ } catch(e) {}
9
+
5
10
  module.exports.fetch = ponyfills.fetch;
6
11
  module.exports.Headers = ponyfills.Headers;
7
12
  module.exports.Request = ponyfills.Request;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/fetch",
3
- "version": "0.9.8",
3
+ "version": "0.9.9-rc-20230714153303-d7bb7e5",
4
4
  "description": "Cross Platform Smart Fetch Ponyfill",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,7 +16,7 @@
16
16
  "browser": "dist/global-ponyfill.js",
17
17
  "types": "dist/index.d.ts",
18
18
  "dependencies": {
19
- "@whatwg-node/node-fetch": "^0.4.7",
19
+ "@whatwg-node/node-fetch": "0.4.8-rc-20230714153303-d7bb7e5",
20
20
  "urlpattern-polyfill": "^9.0.0"
21
21
  },
22
22
  "publishConfig": {