-
Notifications
You must be signed in to change notification settings - Fork 20
fix type export compatibility with node next projects #40
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
base: main
Are you sure you want to change the base?
fix type export compatibility with node next projects #40
Conversation
a4b3927
to
1d6dca5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Good work! I'll ship asap if CI is green
Can you fix CI? |
ok second iteration.. and ran more test locally with different setup. but then the actual code remains the same. some notes: ✅ types are happy import IOValkey from 'iovalkey'; ✅ types are happy import * as iovalkey from 'iovalkey';
const IOValkey = iovalkey.default; ✅ types are happy import { default as IOValkey } from 'iovalkey'; ✅ types are happy
N.B. without named export (using export default as Redis from redis.js..) => import crash => Same for all export named as, that's not compatible with es module. I don't think there's any breaking changes anymore |
68a07a4
to
66aed64
Compare
This comment was marked as resolved.
This comment was marked as resolved.
84e8d5a
to
9e7638d
Compare
Okay I figured I can run the checks in my fork, all green, had to sort some exports order before types exports in index.ts |
Thanks, no rush on my end 👌🏻 |
9e7638d
to
46b677c
Compare
btw I just saw that the readme has incorrect instruction, probably a search and replace for Redis
there's no named { Valkey } export, I can add that. (in addition to the Redis one to not break existing usage) and it's there #41 |
Signed-off-by: rawpixel-vincent <[email protected]>
Signed-off-by: rawpixel-vincent <[email protected]>
Signed-off-by: rawpixel-vincent <[email protected]>
46b677c
to
48de7da
Compare
fix #21
tests pass
it's probably a breaking changes for some projects.
in node 22 using modules
I have to use this to get the proper types:
haven't tested in commonjs node projects but noticed you support node 18.x so hopefully that still works