auth0 / node-auth0

Node.js client library for the Auth0 platform.
MIT License
637 stars 308 forks source link

Fix issue with TS rewriting fetch dynamic imports #878

Closed adamjmcgrath closed 1 year ago

adamjmcgrath commented 1 year ago

Changes

https://github.com/auth0/node-auth0/releases/tag/v4.0.0-beta.4 broke the CJS version of the Beta because TypeScript was rewriting the node-fetch@3 dynamic imports. (see https://github.com/microsoft/TypeScript/issues/43329)

The suggestion to use moduleResolution: node16 works (have npm packd and tested native esm and cjs) - I've diffed the build and the only differences are the removal of transpiled imports.

Will add some automated tests to make sure we don't break the exports again... 🤦