-
Notifications
You must be signed in to change notification settings - Fork 37
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
fix: fix missing ESM type definition file #67
Conversation
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.
Ah, thanks @mizdra!
Published in |
@JoshuaKGoldberg Thanks for the quick response! However, it seems that dedent.d.mts is not included in the published package. Did you forget to |
Ah, no, it's missing in |
Oh, I forgot to include it in |
Funny how the little old things like that get in the way, right after figuring out the new ESM exports... Fixed in |
Has 1.5.1 already been released? It seems not to have arrived at npmjs.com yet. https://www.npmjs.com/package/dedent ![]() |
Hmm, try again? Might be a caching thing: https://www.npmjs.com/package/dedent/v/1.5.1 (the publish took suspiciously long on my end...) |
Successfully installed. I have confirmed that the problem with the type definition file has also been resolved. Thank you! |
Background
The dedent package exports only CJS type definition files (
./dist/index.d.ts
). Therefore, if users try to import dedent as an ESM,tsc
will not find the type definition file.How to reproduction:
src/index.ts
:This problem can also be detected by publint.
Solution
To solve this problem, I added the ESM type definition file (
./dist/dedent.d.mts
).I have also confirmed that this patch allows
tsc
to pass.