Skip to content

Revert "feat: migrate unbuild to tsdown" - #714

Merged
Brentlok merged 1 commit into
mainfrom
revert-712-feat/tsdown
Oct 5, 2026
Merged

Brentlok merged 1 commit into
mainfrom
revert-712-feat/tsdown

Conversation

@Brentlok

@Brentlok Brentlok commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Reverts #712 because tsdown is transforming all require() calls to import

Summary by CodeRabbit

  • Package Compatibility
    • Updated package entry points for CommonJS and ESM builds, including the Vite and Metro adapters.
    • Workspace guidance now specifies Node.js 22.13+ and TypeScript 6.
  • Documentation
    • Updated package and type-test guidance to reflect the current entry points and TypeScript setup.
  • Tests
    • Updated Vite resolver checks for the new module paths; removed some transformer and CommonJS type tests.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Review in Change Stack →

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
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a30af1a6-f918-4557-bc2c-1f12c9da45fc
📥 Commits

Reviewing files that changed from the base of the PR and between 855173e and 641a439.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (14)
  • CONTEXT.md
  • package.json
  • packages/uniwind/build.config.ts
  • packages/uniwind/package.json
  • packages/uniwind/src/bundler/adapters/metro/patches.ts
  • packages/uniwind/src/bundler/adapters/metro/transformer.ts
  • packages/uniwind/src/bundler/adapters/vite/vite.ts
  • packages/uniwind/tests/native/bundler/transformer.test.ts
  • packages/uniwind/tests/type-test/commonjs.cts
  • packages/uniwind/tests/type-test/getCSSVariable.ts
  • packages/uniwind/tests/type-test/theme.ts
  • packages/uniwind/tests/type-test/tsconfig.json
  • packages/uniwind/tests/web/vite.test.ts
  • packages/uniwind/tsdown.config.ts
 ________________________________________________________________________
< I'm CodeRabbit. I review the code you never knew you needed reviewing. >
 ------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@Brentlok
Brentlok merged commit ae6c4c7 into main Oct 5, 2026
2 of 3 checks passed
@Brentlok
Brentlok deleted the revert-712-feat/tsdown branch October 5, 2026 09:03
@greptile-apps

greptile-apps Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[High risk] Reverts build toolchain from tsdown back to unbuild.

This PR should not merge until CommonJS users receive a declaration that matches their entry.

Fix All in Claude CodeFindings

  1. P1 CommonJS imports lose matching types ▶
  2. P2 Package exports go untested ▶

Summary

This PR reverses the package build move to tsdown, returning uniwind to unbuild and its separate CommonJS and ES module output folders.

  • Package exports and bundler paths now point to the restored output layout.
  • Build dependencies, TypeScript settings, and related tests and notes are adjusted to match.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  S[Source files] --> B[unbuild]
  B --> E[dist/module ESM]
  B --> C[dist/common CommonJS]
  E --> I[import entry and types]
  C --> R[default entry]
  I --> T[Type tests read declaration directly]
Loading

Reviews (1) · Last reviewed commit: "Revert "feat: migrate unbuild to tsdown ..."

"import": "./dist/index.d.mts",
"default": "./dist/index.d.cts"
},
"types": "./dist/module/index.d.ts",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 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.

Fix in Claude Code Fix in Codex

Comment on lines +6 to +8
"paths": {
"uniwind": ["../../dist/module/index.d.ts"]
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Package exports go untested

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!

Fix in Claude Code Fix in Codex

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