Skip to content

SMOODEV-tsdown: migrate logger from tsup to tsdown#159

Merged
brentrager merged 1 commit into
mainfrom
smoodev-tsdown-migration
May 18, 2026
Merged

SMOODEV-tsdown: migrate logger from tsup to tsdown#159
brentrager merged 1 commit into
mainfrom
smoodev-tsdown-migration

Conversation

@brentrager
Copy link
Copy Markdown
Contributor

Summary

Drop-in build tooling migration: `tsup` → `tsdown` (oxc-based, faster, actively maintained).

  • `tsup.config.ts` → `tsdown.config.ts` (defineConfig import swap)
  • Browser build's `esbuild-plugin-alias` shim — which replaces `rotating-file-stream` with a no-op stub — moves to `@rollup/plugin-alias` (rolldown-compatible); `noExternal` becomes `deps.alwaysBundle`
  • `src/decycle.cjs` (side-effect CJS that patches global JSON) is marked `external` so rolldown leaves it alone — it's copied to `dist/` as-is post-build, same as before
  • `fixedExtension` set explicitly on the browser config so its output matches the core build's extension scheme
  • `package.json`: `tsup` → `tsdown` devDep, `esbuild-plugin-alias` swapped for `@rollup/plugin-alias`, `unrun` added; `bin.smooai-log-viewer` updated from `.js` to `.cjs`
  • Output extensions shift from `.js`/`.mjs`/`.d.ts` to `.cjs`/`.mjs`/`.d.cts`/`.d.mts` (tsdown defaults). The `exports` map is updated; subpath imports continue to resolve transparently.

Test plan

  • `pnpm install` clean
  • `pnpm exec tsdown` clean (core + browser + CLI)
  • `pnpm exec tsc --noEmit --skipLibCheck` passes
  • vitest TS tests pass (55 tests)
  • CI green

🤖 Generated with Claude Code

Drop-in build tooling swap — tsdown is the oxc-based replacement for tsup,
faster + actively maintained. The browser build's esbuild-plugin-alias
shim (which substitutes rotating-file-stream with a no-op stub) is
replaced with @rollup/plugin-alias (rolldown-compatible).
src/decycle.cjs — a side-effect CJS file that patches global JSON — is
marked external so rolldown leaves it alone. tsdown emits
.cjs/.mjs/.d.cts/.d.mts (vs tsup's .js/.mjs/.d.ts); the exports map and
the CLI bin path (smooai-log-viewer) are updated to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@brentrager brentrager merged commit 627bda0 into main May 18, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 18, 2026

🦋 Changeset detected

Latest commit: d5ec943

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smooai/logger Patch

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

@brentrager brentrager deleted the smoodev-tsdown-migration branch May 18, 2026 19:41
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