fix: add missing .d.cts files while building plugin-kit#445
Conversation
|
Hi @liangmiQwQ!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
This comment was marked as resolved.
This comment was marked as resolved.
|
I cannot reproduce this problem as |
I want to point out the file we need is the rewrite/packages/core/package.json Line 20 in 70b6997
Update: EasyCLA was solved. |
171efba to
749d75f
Compare
There was a problem hiding this comment.
Actually, it’s a bit difficult to pinpoint the root cause here, since your reproduction link is about the rolldown integration.
Could you please share a failing minimal reproduction link without the rolldown integration?
Also, updating the PR template to use our bug template would be helpful here, so others can more easily recognize the real problem.
Umm... this might be a little bit hard to describe or be shown in a reproduction repo, I think I need to re-explain the question.
And for the current So, for packages who depend on and bundle
I've talked with rolldown team, they thought it is expected and it's an ESLint's side building config issue. It makes sense, because the Hope it's helpful, thanks. |
|
Thank you for the explanation. |
|
Thank You! |
|
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
|
Hello @lumirlumir, sorry for pinging, but it seems we need to make it active! |
|
Apologies for the delay. I've been a bit busy lately, and I'll make sure to review this change by tomorrow. Thanks in advance for your patience! |
|
Never mind! However, I'm not sure whether the CI falling is related to my changes in 501d4ad. |
lumirlumir
left a comment
There was a problem hiding this comment.
LGTM, thanks for the time you spent waiting.
I like this change, and I’m leaving some notes here for future reference.
After looking into this a bit more, I don’t think the missing dist/cjs/types.d.cts is a problem for standard TypeScript type resolution by itself. dist/cjs/types.cts is not exposed as a public API entry point and is only referenced from index.d.cts, which TypeScript can resolve correctly.
So I understand this change mainly as a packaging compatibility improvement for downstream declaration-bundling tools, such as rolldown/rolldown-plugin-dts, which may not re-emit declarations for files inside node_modules. Shipping the CJS declaration graph in a complete .d.cts form makes the package more robust for those integrations and will not affect ordinary users.
I think that was a temporary issue from a downstream dependency and was fixed in a separate PR, so no worries at all! |
Prerequisites checklist
AI acknowledgment
What is the purpose of this pull request?
Please read sxzz/rolldown-plugin-dts#1230. ESLint should emit .d.ts for commonjs for downstream's build.
What changes did you make? (Give an overview)
Copied
corepackage's bundling logicRelated Issues
sxzz/rolldown-plugin-dts#1230