-
Notifications
You must be signed in to change notification settings - Fork 26
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
Import in the middle breaks drizzle-orm
exports
#141
Comments
This is not a duplicate of #139 because my current PR doesn't fix this. |
Oh wow, so this issue is caused by the fact that we are finding a duplicate export named A simpler reproduction: export const val = 1;
export * from './a.mjs';
export * from './a.mjs';
export * from './b.mjs'; When run in Node, We are not currently checking if duplicate named exports are from the same source file. |
Is this planned on getting fixed? Currently right now I'm importing the CJS build of drizzle-orm instead of the ESM version to avoid this issue. |
You are welcome to submit a PR with a fix. |
Expected Behavior
Using
import-in-the-middle
works with imports fromdrizzle-orm
as with other NPM packagesActual Behavior
Registering the
import-in-the-middle
hook causes certain top-level exports from thedrizzle-orm
package to be missing.This was originally reported as a bug in our Sentry JS SDK repo and I tracked it down to registering the IITM hook as the only thing needed to reproduce the error.
Steps to Reproduce the Problem
I created a minimal reproduction example in this repo: https://github.com/Lms24/iitm-bug-drizzle-or
npm install
node index.js
:drizzle-orm
console lognode --import instrument.mjs index.js
drizzle-orm
console log (=> 27 exports missing)drizzle.or()
)Specifications
[email protected]
The text was updated successfully, but these errors were encountered: