Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: node-modules/urllib
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.0.0
Choose a base ref
...
head repository: node-modules/urllib
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 2,245 additions and 248 deletions.
  1. +1 −2 .eslintrc
  2. +23 −0 .github/workflows/nodejs-16.yml
  3. +1 −1 .github/workflows/nodejs.yml
  4. +23 −0 .github/workflows/pkg.pr.new.yml
  5. +1 −0 .gitignore
  6. +147 −0 CHANGELOG.md
  7. +94 −35 README.md
  8. +34 −0 examples/h2-other-side-closed-exit-0-fetch.cjs
  9. +34 −0 examples/h2-other-side-closed-exit-0.cjs
  10. +49 −0 examples/longruning.cjs
  11. +1 −0 examples/search_github.cjs
  12. +1 −1 examples/timing.cjs
  13. +17 −15 package.json
  14. +3 −2 scripts/replace_urllib_version.js
  15. +27 −0 src/BaseAgent.ts
  16. +29 −0 src/FetchOpaqueInterceptor.ts
  17. +38 −0 src/FormData.ts
  18. +16 −12 src/HttpAgent.ts
  19. +119 −106 src/HttpClient.ts
  20. +8 −2 src/Request.ts
  21. +1 −1 src/Response.ts
  22. +40 −15 src/diagnosticsChannel.ts
  23. +265 −0 src/fetch.ts
  24. +62 −5 src/index.ts
  25. +1 −0 src/symbols.ts
  26. +95 −1 src/utils.ts
  27. +239 −2 test/HttpClient.test.ts
  28. +158 −13 test/diagnostics_channel.test.ts
  29. +94 −0 test/fetch-head-request-should-keepalive.test.ts
  30. +123 −0 test/fetch.test.ts
  31. +72 −0 test/fixtures/BufferStream.ts
  32. +26 −4 test/fixtures/server.ts
  33. +43 −0 test/formData-with-BufferStream.test.ts
  34. +97 −0 test/head-request-should-keepalive.test.ts
  35. +3 −1 test/index.test.ts
  36. +10 −6 test/keep-alive-header.test.ts
  37. +3 −3 test/options.compressed.test.ts
  38. +11 −0 test/options.digestAuth.test.ts
  39. +1 −1 test/options.dispatcher.test.ts
  40. +25 −5 test/options.files.test.ts
  41. +48 −6 test/options.followRedirect.test.ts
  42. +47 −2 test/options.timeout.test.ts
  43. +4 −3 test/options.timing.test.ts
  44. +9 −4 test/options.writeStream.test.ts
  45. +7 −0 test/patch-structuredClone.cjs
  46. +2 −0 test/setup.ts
  47. +19 −0 test/urllib.options.allowH2.test.ts
  48. +71 −0 test/urllib.options.rejectUnauthorized-false.test.ts
  49. +3 −0 vite.config.ts
3 changes: 1 addition & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"extends": [
"eslint-config-egg/typescript",
"eslint-config-egg/lib/rules/enforce-node-prefix"
"eslint-config-egg/typescript"
]
}
23 changes: 23 additions & 0 deletions .github/workflows/nodejs-16.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Node.js 16 CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '16.x'
- run: npm install
- run: npm run prepublishOnly
- run: node -v
- run: npm run test-node16
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -12,6 +12,6 @@ jobs:
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
with:
os: 'ubuntu-latest, macos-latest, windows-latest'
version: '18.19.0, 20, 22'
version: '16, 18, 20, 22, 23'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Any Commit
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm install

- name: Build
run: npm run prepublishOnly

- run: npx pkg-pr-new publish
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -16,3 +16,4 @@ test/fixtures/ts-cjs-es2021/*.js
test/fixtures/ts-esm/*.js
.eslintcache
.tshy*
.idea/
147 changes: 147 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,152 @@
# Changelog

## [4.6.11](https://github.com/node-modules/urllib/compare/v4.6.10...v4.6.11) (2024-12-20)


### Bug Fixes

* compressed option should be false by default ([#567](https://github.com/node-modules/urllib/issues/567)) ([a0a8dc5](https://github.com/node-modules/urllib/commit/a0a8dc565ed5fcbe21c8a8e4e07d6bb51b185c96))

## [4.6.10](https://github.com/node-modules/urllib/compare/v4.6.9...v4.6.10) (2024-12-19)


### Bug Fixes

* should HEAD request keepalive by default ([#566](https://github.com/node-modules/urllib/issues/566)) ([54c4a2c](https://github.com/node-modules/urllib/commit/54c4a2cc3950e091ef7bdbd0f1cfa3a0c032f6e6))

## [4.6.9](https://github.com/node-modules/urllib/compare/v4.6.8...v4.6.9) (2024-12-17)


### Bug Fixes

* should got undici:client:sendHeaders message on H2 ([#553](https://github.com/node-modules/urllib/issues/553)) ([bd19f6d](https://github.com/node-modules/urllib/commit/bd19f6d9e6b845ca0d31c1c7a77d744dfa87f894))

## [4.6.8](https://github.com/node-modules/urllib/compare/v4.6.7...v4.6.8) (2024-12-11)


### Bug Fixes

* patch TransformStream on Node.js 16 ([#564](https://github.com/node-modules/urllib/issues/564)) ([503dbd8](https://github.com/node-modules/urllib/commit/503dbd8908320d4aa468c058221eb286f3df3cf2))

## [4.6.7](https://github.com/node-modules/urllib/compare/v4.6.6...v4.6.7) (2024-12-11)


### Bug Fixes

* should not throw when fetch a Request with post ([#563](https://github.com/node-modules/urllib/issues/563)) ([6f9f353](https://github.com/node-modules/urllib/commit/6f9f353c57cd5327b1a00564774830eac29cbcbd))

## [4.6.6](https://github.com/node-modules/urllib/compare/v4.6.5...v4.6.6) (2024-12-07)


### Bug Fixes

* allow set rejectUnauthorized = true on urllib.request options ([#561](https://github.com/node-modules/urllib/issues/561)) ([88785e1](https://github.com/node-modules/urllib/commit/88785e16560f60989f388f2a4354f076693d2876))

## [4.6.5](https://github.com/node-modules/urllib/compare/v4.6.4...v4.6.5) (2024-12-07)


### Bug Fixes

* set opaque on request ([#560](https://github.com/node-modules/urllib/issues/560)) ([8cf5c3b](https://github.com/node-modules/urllib/commit/8cf5c3ba50eee03f6363ad68416db8ef618adffd))

## [4.6.4](https://github.com/node-modules/urllib/compare/v4.6.3...v4.6.4) (2024-12-06)


### Bug Fixes

* export WebFormData ([#559](https://github.com/node-modules/urllib/issues/559)) ([dec6b12](https://github.com/node-modules/urllib/commit/dec6b1248ef68c1679f3d7f32c5544655e726045))

## [4.6.3](https://github.com/node-modules/urllib/compare/v4.6.2...v4.6.3) (2024-12-05)


### Bug Fixes

* only set extend notation on non-ascii filename ([#558](https://github.com/node-modules/urllib/issues/558)) ([0cd9b06](https://github.com/node-modules/urllib/commit/0cd9b06031eb5bed08677b6503a8a0fba4ac7fd8))

## [4.6.2](https://github.com/node-modules/urllib/compare/v4.6.1...v4.6.2) (2024-12-04)


### Bug Fixes

* fix socket info if fetch failed ([#556](https://github.com/node-modules/urllib/issues/556)) ([e9f4258](https://github.com/node-modules/urllib/commit/e9f425885aaa51258180048c5178d62af6da91d3))

## [4.6.1](https://github.com/node-modules/urllib/compare/v4.6.0...v4.6.1) (2024-12-04)


### Bug Fixes

* fix socket info in response ([#555](https://github.com/node-modules/urllib/issues/555)) ([629c7a3](https://github.com/node-modules/urllib/commit/629c7a304998f921b5a9678808be3f28ac267f81))

## [4.6.0](https://github.com/node-modules/urllib/compare/v4.5.1...v4.6.0) (2024-12-04)


### Features

* exports undici ([#554](https://github.com/node-modules/urllib/issues/554)) ([3c9fca7](https://github.com/node-modules/urllib/commit/3c9fca7c339753fa6d6430fb5659e6d11fc20997))

## [4.5.1](https://github.com/node-modules/urllib/compare/v4.5.0...v4.5.1) (2024-12-02)


### Bug Fixes

* support use on Node.js 16 ([#550](https://github.com/node-modules/urllib/issues/550)) ([78e1336](https://github.com/node-modules/urllib/commit/78e1336997dc0f86b8e7da98f572753da0de91cb))

## [4.5.0](https://github.com/node-modules/urllib/compare/v4.4.0...v4.5.0) (2024-11-30)


### Features

* upgrade to undici v7 ([#547](https://github.com/node-modules/urllib/issues/547)) ([9803c4e](https://github.com/node-modules/urllib/commit/9803c4e1fda2b56a7540eb45dde57caf25f969d6))

## [4.4.0](https://github.com/node-modules/urllib/compare/v4.3.1...v4.4.0) (2024-10-08)


### Features

* impl fetch ([#542](https://github.com/node-modules/urllib/issues/542)) ([55a634c](https://github.com/node-modules/urllib/commit/55a634c1784365f35ab69139549b47d24f500069))

## [4.3.1](https://github.com/node-modules/urllib/compare/v4.3.0...v4.3.1) (2024-09-19)


### Bug Fixes

* add export type ([#540](https://github.com/node-modules/urllib/issues/540)) ([1765806](https://github.com/node-modules/urllib/commit/1765806792c7aaf91c6095fa45e37ca98ede9496))

## [4.3.0](https://github.com/node-modules/urllib/compare/v4.2.2...v4.3.0) (2024-09-14)


### Features

* Added support for x-www-authenticate header ([#533](https://github.com/node-modules/urllib/issues/533)) ([d52a3e0](https://github.com/node-modules/urllib/commit/d52a3e0b32db305e7839af2aa8464201319c0504))

## [4.2.2](https://github.com/node-modules/urllib/compare/v4.2.1...v4.2.2) (2024-09-14)


### Bug Fixes

* uncaught exception due to second response with digest auth ([#530](https://github.com/node-modules/urllib/issues/530)) ([9a7833e](https://github.com/node-modules/urllib/commit/9a7833e17b07c696feb4a0a32476a01c3156b7ae))

## [4.2.1](https://github.com/node-modules/urllib/compare/v4.2.0...v4.2.1) (2024-09-11)


### Bug Fixes

* allow ":" character in digestAuth password ([#532](https://github.com/node-modules/urllib/issues/532)) ([c6b6f88](https://github.com/node-modules/urllib/commit/c6b6f881bb1f33fc944482d9060d3576788c7c74))

## [4.2.0](https://github.com/node-modules/urllib/compare/v4.1.0...v4.2.0) (2024-07-08)


### Features

* add hostname for checkAddress ([#525](https://github.com/node-modules/urllib/issues/525)) ([88b6e56](https://github.com/node-modules/urllib/commit/88b6e56a02988a0887f095c2ac5f0308cdf6e9c0))

## [4.1.0](https://github.com/node-modules/urllib/compare/v4.0.0...v4.1.0) (2024-06-27)


### Features

* support HTTP2 ([#518](https://github.com/node-modules/urllib/issues/518)) ([21d4260](https://github.com/node-modules/urllib/commit/21d4260410ca7ca53bc60af34a2f86dc9b4f8e8a))

## [4.0.0](https://github.com/node-modules/urllib/compare/v3.25.1...v4.0.0) (2024-06-23)


Loading