Skip to content

Commit

Permalink
Bump Undici
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Sep 26, 2022
1 parent d5e2f04 commit c918527
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/curvy-pillows-compete.md
@@ -0,0 +1,5 @@
---
'@whatwg-node/fetch': patch
---

Bump Undici
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -11,7 +11,7 @@
"ci:lint": "eslint --ext .ts . --output-file eslint_report.json --format json",
"prettier": "prettier --ignore-path .gitignore --ignore-path .prettierignore --write --list-different .",
"prettier:check": "prettier --ignore-path .gitignore --ignore-path .prettierignore --check .",
"test": "jest --detectOpenHandles --detectLeaks",
"test": "jest --detectOpenHandles --detectLeaks --logHeapUsage --runInBand",
"prerelease": "yarn build",
"prerelease-canary": "yarn build",
"release": "changeset publish"
Expand Down
2 changes: 1 addition & 1 deletion packages/fetch/package.json
Expand Up @@ -24,7 +24,7 @@
"form-data-encoder": "^1.7.1",
"formdata-node": "^4.3.1",
"node-fetch": "^2.6.7",
"undici": "^5.8.0",
"undici": "^5.10.0",
"web-streams-polyfill": "^3.2.0"
},
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/server/CHANGELOG.md
Expand Up @@ -70,8 +70,8 @@

```ts
createServerAdapter(req => {
return new Response(`I got ${req.url}`);
});
return new Response(`I got ${req.url}`)
})
```

Breaking Changes;
Expand Down
8 changes: 4 additions & 4 deletions packages/server/test/node.spec.ts
Expand Up @@ -21,7 +21,7 @@ describe('Node Specific Cases', () => {
const serverAdapter = createServerAdapter(() => {
return undefined as any;
});
server.on('request', serverAdapter);
server.once('request', serverAdapter);
const response = await fetch(url);
await response.text();
expect(response.status).toBe(404);
Expand All @@ -39,7 +39,7 @@ describe('Node Specific Cases', () => {
status: 204,
});
});
server.on('request', serverAdapter);
server.once('request', serverAdapter);
const response$ = fetch(url);
const response = await response$;
await response.text();
Expand All @@ -60,7 +60,7 @@ describe('Node Specific Cases', () => {
foo: string;
}>(handleRequest);
const additionalCtx = { foo: 'bar' };
server.on('request', (...args) => serverAdapter(...args, additionalCtx));
server.once('request', (...args) => serverAdapter(...args, additionalCtx));
const response = await fetch(url);
await response.text();
expect(handleRequest).toHaveBeenCalledWith(expect.anything(), expect.objectContaining(additionalCtx));
Expand All @@ -80,7 +80,7 @@ describe('Node Specific Cases', () => {
})
)
);
server.on('request', serverAdapter);
server.once('request', serverAdapter);
const abortCtrl = new AbortController();
const response = await fetch(url, {
signal: abortCtrl.signal,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -5796,10 +5796,10 @@ unbox-primitive@^1.0.2:
has-symbols "^1.0.3"
which-boxed-primitive "^1.0.2"

undici@^5.8.0:
version "5.8.0"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.8.0.tgz#dec9a8ccd90e5a1d81d43c0eab6503146d649a4f"
integrity sha512-1F7Vtcez5w/LwH2G2tGnFIihuWUlc58YidwLiCv+jR2Z50x0tNXpRRw7eOIJ+GvqCqIkg9SB7NWAJ/T9TLfv8Q==
undici@^5.10.0:
version "5.10.0"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.10.0.tgz#dd9391087a90ccfbd007568db458674232ebf014"
integrity sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g==

unicode-canonical-property-names-ecmascript@^2.0.0:
version "2.0.0"
Expand Down

0 comments on commit c918527

Please sign in to comment.