Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update undici to 4.0.0 #7931

Closed

Conversation

michalkvasnicak
Copy link
Contributor

Closes #7539

@CLAassistant
Copy link

CLAassistant commented Jun 29, 2021

CLA assistant check
All committers have signed the CLA.

import { URL } from 'url'
export class Undici {
private pool: Pool
private closed = false
private url: string | URL
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this one. unidici requires origin in Dispatcher.DispatchOptions even if it isn't required in their tests. I can remove this code and use type casting to Omit<Dispatcher.DispatchOptions, 'origin'> in this.pool.request() to fix that and get rid of this code.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok and how exactly I'm on a phone

@janpio
Copy link
Member

janpio commented Jun 29, 2021

I unblocked the GH Actions run, so you should get test run feedback on this soon @michalkvasnicak

}),
// copy wasm files, etc necessary for undici
fs.copy(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar enough with esbuild. The problem is that undici uses path.resolve to establish a path to wasm files (https://github.com/nodejs/undici/blob/e705509ab22ab80aadf0fc1a394afff7dc014fdf/lib/client.js#L390-L398) and I wasn't able to find a plugin that could resolve that and copy files accordingly.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just don't know what I'm doing myself.

@@ -51,7 +51,7 @@
"new-github-issue-url": "^0.2.1",
"p-retry": "^4.2.0",
"terminal-link": "^2.1.1",
"undici": "3.3.6"
"undici": "^4.0.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why but pnpm also keeps the version 3.x.x which causes build of cli to fail if I remove _http_common from esbuild.external.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also experiencing errors when _http_common is removed from Webpack's externals

@millsp
Copy link
Member

millsp commented Aug 7, 2021

We need to investigate whether undici@4 will make bundling harder for our users (since it ships with a lhttp binary. Thoughts @michalkvasnicak?

@hugbubby
Copy link

https://media.giphy.com/media/GrUhLU9q3nyRG/source.gif
^ live broadcast of me waiting for this patch since April

@millsp
Copy link
Member

millsp commented Aug 20, 2021

Closing this in favor of #8842. Your contribution was included there. Thanks @michalkvasnicak!

@millsp millsp closed this Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/tech A technical change. team/client Issue for team Client. topic: undici
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prisma Client (Binary): upgrade to undici@4
9 participants