Conversation
🦋 Changeset detectedLatest commit: c209bb1 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughA release preparation update that migrates the build tooling from tsup to tsdown, adds four changeset entries documenting different release aspects, bumps the package version to 0.4.0-next.3, updates TypeScript to version 6.0.2, adjusts package export paths to use .mjs and .d.mts extensions, and updates the CHANGELOG with new unreleased version entries. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
9709ba1 to
efd938e
Compare
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
package.json (1)
13-20: Consider adding CJS type declaration path for dual-package consumers.The
mainfield points to./dist/index.cjsbut the top-leveltypesfield only references.d.mts. Since tsdown is configured to generate both.d.mts(ESM) and.d.cts(CJS) declaration files, using conditional types in exports would ensure older tooling and explicitrequire()consumers correctly resolve the appropriate type definitions.Consider restructuring exports to use conditional types:
💡 Suggested enhancement
"exports": { ".": { - "types": "./dist/index.d.mts", "require": "./dist/index.cjs", - "import": "./dist/index.mjs" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` around lines 13 - 20, The package currently exposes "main": "./dist/index.cjs" and a top-level "types": "./dist/index.d.mts" but lacks conditional type paths for CJS consumers; update package.json exports/types so require() consumers get the CJS declaration and ESM importers get the MTS declaration: keep "main" and "module" as-is, change the top-level "types" to point to the CJS declaration (e.g., "./dist/index.d.cts") and add a conditional "types" mapping inside "exports" for "." with "require": "./dist/index.d.cts" and "import": "./dist/index.d.mts" (matching the existing "require"/"import" JS entries) so tooling and require() consumers resolve proper .d.cts vs .d.mts files.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@package.json`:
- Around line 13-20: The package currently exposes "main": "./dist/index.cjs"
and a top-level "types": "./dist/index.d.mts" but lacks conditional type paths
for CJS consumers; update package.json exports/types so require() consumers get
the CJS declaration and ESM importers get the MTS declaration: keep "main" and
"module" as-is, change the top-level "types" to point to the CJS declaration
(e.g., "./dist/index.d.cts") and add a conditional "types" mapping inside
"exports" for "." with "require": "./dist/index.d.cts" and "import":
"./dist/index.d.mts" (matching the existing "require"/"import" JS entries) so
tooling and require() consumers resolve proper .d.cts vs .d.mts files.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 961eec20-671b-492c-88f5-c389fb5663f2
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (8)
.changeset/brave-yaks-argue.md.changeset/cozy-swans-add.md.changeset/pre.json.changeset/ready-hoops-ring.md.changeset/real-turtles-attack.mdCHANGELOG.mdpackage.jsontsdown.config.ts



Typescript + tsdown migration
Requirements
Summary by CodeRabbit
New Features
Updates
Chores