Skip to content

Update tsdown config for treaty types#77

Merged
RawToast merged 4 commits into
masterfrom
fix-treaty-types
Apr 13, 2026
Merged

Update tsdown config for treaty types#77
RawToast merged 4 commits into
masterfrom
fix-treaty-types

Conversation

@RawToast

@RawToast RawToast commented Apr 13, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • Bumped package version to 0.3.0-beta.2.
    • Improved TypeScript type distribution and conditional exports for better ESM/CommonJS compatibility.
    • Extended the build to produce and publish additional type artifacts so types are resolved correctly for both import and require consumers.
    • Cleaned up local TypeScript configuration for example builds.

@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 468f3d78-e76b-4edc-8dd6-12f715dd3c35

📥 Commits

Reviewing files that changed from the base of the PR and between 4bc1ada and bf01344.

📒 Files selected for processing (2)
  • packages/examples/tsconfig.json
  • packages/zenko/package.json
💤 Files with no reviewable changes (1)
  • packages/examples/tsconfig.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/zenko/package.json

📝 Walkthrough

Walkthrough

Migrated package type declarations to separate ESM/CJS outputs, added a new tsdown build entry for src/types.ts, and removed the outDir compiler option from the examples TypeScript config. The package version was bumped.

Changes

Cohort / File(s) Summary
Examples TS Config
packages/examples/tsconfig.json
Removed compilerOptions.outDir entry ("./dist").
Package Manifest
packages/zenko/package.json
Bumped version 0.3.0-beta.10.3.0-beta.2; changed top-level types to ./dist/index.d.mts; updated exports subpath types entries to conditional { import: "*.d.mts", require: "*.d.cts" }; added dist/**/*.d.mts to files.
Build Config
packages/zenko/tsdown.config.ts
Added new tsdown entry types: "src/types.ts" to the entry map so src/types.ts is included in the build outputs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐇 I hopped through types and split their tunes,
ESM and CJS now hum in two rooms.
A new entry sprouted, configs trimmed a bit,
Version bumped, I danced—then took a carrot hit. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title mentions 'treaty types' but the changeset also significantly updates package.json exports and tsconfig.json settings beyond just treaty-related configuration. Clarify whether the title should focus on the primary change (package version bump and type declarations) or adjust to reflect the broader scope of TypeScript configuration updates across multiple files.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-treaty-types

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Apr 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.20%. Comparing base (29e2b8f) to head (bf01344).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #77   +/-   ##
=======================================
  Coverage   96.20%   96.20%           
=======================================
  Files          19       19           
  Lines        2765     2765           
=======================================
  Hits         2660     2660           
  Misses        105      105           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/zenko/package.json (1)

32-33: Optional cleanup: remove legacy .d.ts publish glob if no longer emitted.

If the package has fully migrated to .d.mts/.d.cts, keeping dist/**/*.d.ts can be dropped to reduce ambiguity.

Proposed cleanup
   "files": [
     "LICENSE",
     "README.md",
     "dist/**/*.cjs",
     "dist/**/*.d.cts",
     "dist/**/*.d.mts",
-    "dist/**/*.d.ts",
     "dist/**/*.mjs"
   ],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/zenko/package.json` around lines 32 - 33, The publish file-glob
"dist/**/*.d.ts" is legacy if the package now emits only ".d.mts"/".d.cts";
remove the "dist/**/*.d.ts" entry from package.json (the pattern alongside
"dist/**/*.d.mts") to avoid publishing obsolete type artifacts and
ambiguity—ensure the remaining globs ("dist/**/*.d.mts" and any ".d.cts"
patterns) cover all emitted declaration files before committing the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/zenko/package.json`:
- Around line 32-33: The publish file-glob "dist/**/*.d.ts" is legacy if the
package now emits only ".d.mts"/".d.cts"; remove the "dist/**/*.d.ts" entry from
package.json (the pattern alongside "dist/**/*.d.mts") to avoid publishing
obsolete type artifacts and ambiguity—ensure the remaining globs
("dist/**/*.d.mts" and any ".d.cts" patterns) cover all emitted declaration
files before committing the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f6f91961-299c-43f6-a998-4fbaabf57a64

📥 Commits

Reviewing files that changed from the base of the PR and between 29e2b8f and 4bc1ada.

📒 Files selected for processing (3)
  • packages/examples/tsconfig.json
  • packages/zenko/package.json
  • packages/zenko/tsdown.config.ts
💤 Files with no reviewable changes (1)
  • packages/examples/tsconfig.json

@RawToast RawToast merged commit aba335f into master Apr 13, 2026
6 checks passed
@RawToast RawToast deleted the fix-treaty-types branch April 13, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant