Skip to content

Commit 813fab0

Browse files
authored
fix: fix docs (#1248)
* fix: fix README * fix: fix MIGRATION.md
1 parent 0f9b9b8 commit 813fab0

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

MIGRATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
## Migration guide from v6.x.x to v7.0.0
44

55
- [Node.js v18 is no longer supported.](#nodejs-v18-is-no-longer-supported)
6-
- [When using global fetch with Node.js v22, v23, v24, undici v6 should be installed.](#when-using-global-fetch-with-nodejs-v22-v23-v24-undici-v6-should-be-installed)
6+
- [When using global fetch with Node.js v20, v22, v23, undici v6 should be installed.](#when-using-global-fetch-with-nodejs-v20-v22-v23-undici-v6-should-be-installed)
77
- [undici v7 supports](#undici-v7-supports)
88

99
### Node.js v18 is no longer supported.
1010

1111
Node.js v18 is no longer supported.
1212

13-
### When using global fetch with Node.js v22, v23, v24, undici v6 should be installed.
13+
### When using global fetch with Node.js v20, v22, v23, undici v6 should be installed.
1414

1515
The global fetch built-in to Node.js v20, v22, and v23 is undici v6.
1616

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ Allows cookies with every Node.js HTTP clients (e.g. Node.js global fetch, undic
2424
npm install http-cookie-agent tough-cookie
2525
```
2626

27-
When you want to use Node.js global fetch (aka. `undici`), you should install `undici` additionally.
28-
29-
```bash
30-
npm install undici
31-
```
32-
3327
## Usage
3428

3529
See also [examples](./examples) for more details.
@@ -60,11 +54,17 @@ See also [examples](./examples) for more details.
6054

6155
#### Node.js global fetch
6256

63-
`http-cookie-agent` supports global fetch since Node.js v18.2.0.
57+
When you want to use Node.js global fetch, you should install `undici` additionally.
58+
59+
| Node.js version | undici version |
60+
| --------------- | ---------------------- |
61+
| v23 | `npm install undici@6` |
62+
| v22 | `npm install undici@6` |
63+
| v20 | `npm install undici@6` |
6464

6565
```js
6666
import { CookieJar } from 'tough-cookie';
67-
import { CookieAgent } from 'http-cookie-agent/undici';
67+
import { CookieAgent } from 'http-cookie-agent/undici/v6';
6868

6969
const jar = new CookieJar();
7070
const agent = new CookieAgent({ cookies: { jar } });

0 commit comments

Comments
 (0)