Repository navigation
Revert "feat: migrate unbuild to tsdown" - #714
Conversation
This reverts commit 26af57d.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (14)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| "import": "./dist/index.d.mts", | ||
| "default": "./dist/index.d.cts" | ||
| }, | ||
| "types": "./dist/module/index.d.ts", |
There was a problem hiding this comment.
CommonJS imports lose matching types
A CommonJS app using TypeScript's NodeNext mode now gets dist/module/index.d.ts for uniwind, while its runtime entry is dist/common/index.js. The package marks the declaration as ESM, so TypeScript rejects the CommonJS import. The previous exports supplied a separate .d.cts declaration. Keep a declaration that matches the CommonJS entry.
| "paths": { | ||
| "uniwind": ["../../dist/module/index.d.ts"] | ||
| } |
There was a problem hiding this comment.
The type test now points uniwind straight at dist/module/index.d.ts and no longer includes the CommonJS test. It cannot catch a broken package export or CommonJS declaration, though this PR changes those paths. Restore tests that resolve the published exports in both module formats.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Reverts #712 because tsdown is transforming all
require()calls toimportSummary by CodeRabbit