Skip to content

Conversation

@kazupon
Copy link
Member

@kazupon kazupon commented Nov 14, 2025

Description

Linked Issues

Additional context

Summary by CodeRabbit

  • Build System Updates

    • Switched packages to a new TypeScript build pipeline and made ES module the primary distribution format; type declaration format updated.
    • Added package validation tooling.
  • Documentation

    • Minor wording and typo fixes across READMEs and docs.
  • Tests

    • Small fixes to test descriptions and type-level test data.
  • Chores

    • Updated workspace tooling and gitignore entries.

@coderabbitai
Copy link

coderabbitai bot commented Nov 14, 2025

Warning

Rate limit exceeded

@kazupon has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 39 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 72e5b5f and 7b3fbcd.

📒 Files selected for processing (9)
  • .gitignore (1 hunks)
  • packages/h3/docs/functions/getHeaderLanguage.md (1 hunks)
  • packages/h3/package.json (2 hunks)
  • packages/hono/README.md (2 hunks)
  • packages/hono/docs/functions/getHeaderLanguage.md (1 hunks)
  • packages/hono/package.json (2 hunks)
  • packages/hono/playground/typesafe-schema/index.ts (1 hunks)
  • packages/hono/src/index.test-d.ts (1 hunks)
  • packages/hono/src/index.test.ts (1 hunks)

Walkthrough

Migrate h3 and hono from Unbuild to Tsdown: remove Unbuild build configs, add Tsdown configs, change package exports to ESM (.mjs/.mts), update build scripts and workspace catalog, plus minor docs/test/text fixes and a .gitignore entry.

Changes

Cohort / File(s) Summary
Build config removals
packages/h3/build.config.ts, packages/hono/build.config.ts
Deleted Unbuild build configuration files that exported defineBuildConfig objects (declaration, rollup.emitCJS, entries, externals).
Tsdown config additions
packages/h3/tsdown.config.ts, packages/hono/tsdown.config.ts
Added Tsdown configs (default export via defineConfig) with entry ./src/index.ts, outDir: 'dist', clean: true, publint: true.
Package manifest updates
packages/h3/package.json, packages/hono/package.json
Switched main from dist/index.cjsdist/index.mjs, updated exports types to .d.mts, removed exports["."].require, added typesVersions, replaced build script unbuildtsdown, added devDeps tsdown and publint, removed unbuild devDep and prepack script.
Workspace catalog update
pnpm-workspace.yaml
Removed unbuild from catalog entries; added tsdown and publint.
Docs, tests, and misc edits
packages/h3/docs/functions/getHeaderLanguage.md, packages/hono/docs/functions/getHeaderLanguage.md, packages/hono/README.md, packages/hono/playground/typesafe-schema/index.ts, packages/hono/src/index.test-d.ts, packages/hono/src/index.test.ts, .gitignore
Typo and grammar fixes in docs and comments, small type literal fix in a type test ('workd''worked'), test description spelling fix, and added .todo.md to .gitignore.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Developer
  participant CLI as package.json (scripts)
  participant Tsdown as Tsdown
  participant FS as File System

  Dev->>CLI: run `pnpm build` (now uses tsdown)
  CLI->>Tsdown: invoke tsdown with config (tsdown.config.ts)
  Tsdown->>FS: read `./src/index.ts` and other entries
  Tsdown->>FS: emit ESM bundles (`dist/index.mjs`) and types (`dist/*.d.mts`)
  Tsdown-->>CLI: exit (success / publint warnings)
  CLI-->>Dev: build result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Areas to focus:
    • Verify tsdown.config settings produce identical public artifacts (module format, type file names/locations).
    • Confirm package exports and typesVersions paths are correct for consumer resolution.
    • Check CI/build scripts and publishing pipeline for any assumptions about CJS artifacts removed.
    • Inspect the type test change (index.test-d.ts) for intended semantics.

Poem

🐇 Hop, hop, the toolchain's new—tsdown hums,

Unbuild sleeps while ESM drums.
Types take flight in .mts so bright,
Docs cleaned, tests fixed — a tidy sight.
Our rabbit hops onward, build done right. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'breaking: drop cjs' clearly and concisely summarizes the main change: removing CommonJS support in favor of ESM-only distribution, which is reflected across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 14, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@intlify/h3@13
npm i https://pkg.pr.new/@intlify/hono@13

commit: 7b3fbcd

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
packages/h3/tsdown.config.ts (1)

1-12: Configuration is identical to hono package.

This configuration duplicates packages/hono/tsdown.config.ts. See the review comment on that file for a suggestion to extract shared configuration.

🧹 Nitpick comments (1)
packages/hono/tsdown.config.ts (1)

1-12: Consider extracting shared tsdown configuration to reduce duplication.

The configuration is identical to packages/h3/tsdown.config.ts. Consider creating a shared base configuration file (e.g., tsdown.base.config.ts at the workspace root) that both packages can extend.

Example shared configuration:

// tsdown.base.config.ts (at workspace root)
import type { UserConfig } from 'tsdown'

export const baseConfig: UserConfig = {
  entry: ['./src/index.ts'],
  outDir: 'dist',
  clean: true,
  publint: true
}

Then in each package:

 import { defineConfig } from 'tsdown'
-
-import type { UserConfig } from 'tsdown'
-
-const config: UserConfig = defineConfig({
-  entry: ['./src/index.ts'],
-  outDir: 'dist',
-  clean: true,
-  publint: true
-})
+import { baseConfig } from '../../tsdown.base.config'

-export default config
+export default defineConfig(baseConfig)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5c8edb2 and 72e5b5f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • packages/h3/build.config.ts (0 hunks)
  • packages/h3/package.json (2 hunks)
  • packages/h3/tsdown.config.ts (1 hunks)
  • packages/hono/build.config.ts (0 hunks)
  • packages/hono/package.json (2 hunks)
  • packages/hono/tsdown.config.ts (1 hunks)
  • pnpm-workspace.yaml (1 hunks)
💤 Files with no reviewable changes (2)
  • packages/h3/build.config.ts
  • packages/hono/build.config.ts
🔇 Additional comments (7)
packages/h3/package.json (3)

52-59: LGTM: typesVersions configuration is appropriate.

The typesVersions field correctly provides TypeScript with fallback paths for type resolution. The wildcard mapping to dist/* and root files is a standard pattern for ESM packages.


61-61: LGTM: Build script updated to use tsdown.

The build script change from unbuild to tsdown is consistent with the migration and the new tsdown.config.ts configuration file.


74-76: LGTM: devDependencies updated for new build tooling.

The addition of publint and tsdown as devDependencies is appropriate for the migration. Using catalog versions ensures consistency across the workspace.

packages/hono/package.json (3)

51-58: LGTM: typesVersions configuration is appropriate.

The typesVersions field correctly provides TypeScript with fallback paths for type resolution. The wildcard mapping is consistent with the h3 package and follows standard ESM package patterns.


60-60: LGTM: Build script updated to use tsdown.

The build script change from unbuild to tsdown is consistent with the migration and the new tsdown.config.ts configuration file.


73-74: LGTM: devDependencies updated for new build tooling.

The addition of publint and tsdown as devDependencies is appropriate for the migration. Using catalog versions ensures consistency across the workspace.

pnpm-workspace.yaml (1)

9-10: No action required—versions are valid and current.

The specified versions are confirmed as the latest available in the npm registry with no known security vulnerabilities:

  • tsdown@0.16.4 is the current latest version
  • publint@0.3.15 is the current latest version

Both caret constraints (^) appropriately allow compatible upgrades per semver.

@kazupon kazupon merged commit e63bc39 into main Nov 14, 2025
9 checks passed
This was referenced Nov 15, 2025
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.

2 participants