fix type export compatibility with node next projects#40
fix type export compatibility with node next projects#40rawpixel-vincent wants to merge 5 commits into
Conversation
a4b3927 to
1d6dca5
Compare
mcollina
left a comment
There was a problem hiding this comment.
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 |
46b677c to
48de7da
Compare
Signed-off-by: rawpixel-vincent <vincent@rawpixel.com>
Signed-off-by: rawpixel-vincent <vincent@rawpixel.com>
Signed-off-by: rawpixel-vincent <vincent@rawpixel.com>
Signed-off-by: rawpixel-vincent <vincent@rawpixel.com>
48de7da to
0d42318
Compare
Signed-off-by: rawpixel-vincent <vincent@rawpixel.com>
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