oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.17k stars 2.68k forks source link

Compatibility with busboys (11M download) #12074

Open coratgerl opened 2 months ago

coratgerl commented 2 months ago

What version of Bun is running?

1.1.16

What platform is your computer?

Darwin 23.5.0 x86_64 i386

What steps can reproduce the bug?

Busboys is used in the graphql-upload package and this function is called: https://github.com/mscdex/busboy/blob/6b3dcf69d38c1a8d53a0b3e4c88ba296f6c91525/lib/index.js#L5

With bun, the headers object is of type headers and not object, so headers['content-type'] returns undefined. headers.get('content-type') works.

It's blocking to be able to use graphql-upload (link to the call in graphql-upload lib :https://github.com/meabed/graphql-upload-ts/blob/9f02a4f1044dfae3dbc92771a6b586da1cbd609e/src/processRequest.ts#L52)

image

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

github-actions[bot] commented 4 days ago

Hello @coratgerl. Please provide a minimal reproduction using a GitHub repository, Replit, or CodeSandbox. Issues marked with needs repro will be closed if they have no activity within 3 days.