oak icon indicating copy to clipboard operation
oak copied to clipboard

Don't use the `undici` shim for Node

Open vixalien opened this issue 1 year ago • 2 comments

When compiling for Node.js, the package uses undici to shim for Request/Response, etc.. however, this causes issues in production, when using code that checks for response instanceof Response or similar.

Because the response got is not an actual Response, it causes issues. I think undici should be dropped since the fetch API is supported in Node.js 18+

vixalien avatar Oct 01 '24 23:10 vixalien

Since oak migrated to JSR, it no longer uses undici and we have stopped publishing the npm package.

You can use more recent versions of oak under Node.js via the package published on JSR like:

npx jsr add @oak/oak

kitsonk avatar Nov 23 '24 21:11 kitsonk

In that case adding a big red deprecation notice to the NPM page that explains the new supported JSR way of doing things would be great.

https://www.npmjs.com/package/@oakserver/oak

https://docs.npmjs.com/deprecating-and-undeprecating-packages-or-package-versions

dynst avatar Jul 24 '25 02:07 dynst