-
-
Couldn't load subscription status.
- Fork 92
chore: replace unbuild with tsdown (#621) #622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Replaced the per-package unbuild setup with a single unified tsdown workspace setup.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe build process across the monorepo has been refactored to use Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant RootPkg as Root package.json
participant Tsdown as tsdown
participant Pkg as Package
Dev->>RootPkg: Run "pnpm run build"
RootPkg->>Tsdown: Run "tsdown" (via build:packages)
Tsdown->>Pkg: Process entries from tsdown.config.ts in each package
Tsdown-->>RootPkg: Build output generated
RootPkg->>Pkg: Run recursive build (pnpm run -r build)
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (24)
💤 Files with no reviewable changes (23)
🚧 Files skipped from review as they are similar to previous changes (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
tsdown.config.ts (1)
3-8: Consider excluding test and demo files.
To avoid generating outputs for non-production sources, you might add anexcludesection, for example:exclude: ['**/*.test.ts', '**/__tests__/**', 'packages/**/demo/**'],packages/client/tsdown.config.ts (1)
4-4: Consider deeper glob for adapters.If adapter modules may be nested beyond one level, change
'./src/adapters/*/index.ts'to'./src/adapters/**/index.ts'to include all subdirectories.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (30)
package.json(2 hunks)packages/arktype/package.json(0 hunks)packages/client/package.json(0 hunks)packages/client/tsdown.config.ts(1 hunks)packages/contract/package.json(0 hunks)packages/hey-api/package.json(0 hunks)packages/nest/package.json(0 hunks)packages/openapi-client/package.json(0 hunks)packages/openapi/package.json(0 hunks)packages/react-query/package.json(0 hunks)packages/react/package.json(0 hunks)packages/react/tsdown.config.ts(1 hunks)packages/server/package.json(0 hunks)packages/server/tsdown.config.ts(1 hunks)packages/shared/package.json(0 hunks)packages/solid-query/package.json(0 hunks)packages/standard-server-aws-lambda/package.json(0 hunks)packages/standard-server-fetch/package.json(0 hunks)packages/standard-server-node/package.json(0 hunks)packages/standard-server-peer/package.json(0 hunks)packages/standard-server/package.json(0 hunks)packages/standard-server/tsdown.config.ts(1 hunks)packages/svelte-query/package.json(0 hunks)packages/tanstack-query/package.json(0 hunks)packages/valibot/package.json(0 hunks)packages/vue-colada/package.json(0 hunks)packages/vue-query/package.json(0 hunks)packages/zod/package.json(0 hunks)packages/zod/tsdown.config.ts(1 hunks)tsdown.config.ts(1 hunks)
💤 Files with no reviewable changes (23)
- packages/server/package.json
- packages/hey-api/package.json
- packages/zod/package.json
- packages/openapi/package.json
- packages/standard-server-node/package.json
- packages/react-query/package.json
- packages/solid-query/package.json
- packages/vue-colada/package.json
- packages/contract/package.json
- packages/standard-server-aws-lambda/package.json
- packages/arktype/package.json
- packages/client/package.json
- packages/valibot/package.json
- packages/react/package.json
- packages/standard-server-fetch/package.json
- packages/nest/package.json
- packages/openapi-client/package.json
- packages/shared/package.json
- packages/standard-server-peer/package.json
- packages/standard-server/package.json
- packages/tanstack-query/package.json
- packages/vue-query/package.json
- packages/svelte-query/package.json
🔇 Additional comments (14)
tsdown.config.ts (1)
1-2: Import statement is correct.
ThedefineConfigimport fromtsdownmatches the expected API for the new unified build setup.packages/react/tsdown.config.ts (2)
1-5: Ensure entry points align withpackage.jsonexports.
Verify that both./src/index.tsand./src/hooks/index.tscorrespond to paths declared underexportsinpackages/react/package.json.
1-5: Package-level config is correctly minimal.
This file cleanly defines only the entry points and relies on the root config for shared settings (dts,fixedExtension).packages/zod/tsdown.config.ts (2)
1-5: Verify entries againstpackage.json.
Make sure./src/index.tsand./src/zod4/index.tsare declared in the package’sexportsfield to avoid missing or extra outputs.
1-5: Config correctly delegates to root settings.
Entry points are concise and will inherit globaldtsandfixedExtensionfrom the root config.packages/standard-server/tsdown.config.ts (2)
1-5: Confirm public interface coverage.
Ensure both./src/index.tsand./src/batch/index.tsare intended as public entry points and match your package’s exports.
1-5: Minimal and clear package config.
This setup cleanly scopes the build to the main and batch modules, relying on root defaults for other options.packages/server/tsdown.config.ts (2)
1-5: Validate adapter glob pattern.
The pattern./src/adapters/*/index.tsonly matches one level deep. If you ever nest adapters further, consider./src/adapters/**/index.ts.
1-5: Entries correctly define package surface.
The combination of main, plugins, and adapters entry points fully captures the server package’s public API.packages/client/tsdown.config.ts (2)
1-2: Validate import and module resolution.Importing
defineConfigfrom'tsdown'is correct. Ensure the version indevDependenciesmatches this import and that your tooling is configured to load.tsconfig files.
3-5: Approve tsdown configuration entries.The specified entry points (
index.ts,plugins/index.ts, andadapters/*/index.ts) align with the client package’s public API. This matches the patterns used in other packages.package.json (3)
9-9: Confirm consolidated build invocation.The
"build"script now runsbuild:packagesbefore the recursive build. Verify that building package artifacts withtsdowncompletes successfully before downstream builds.
10-10: Invoke tsdown in build:packages script.Replacing the old per-package build with the single
tsdowninvocation centralizes the process. Confirm the CLI is available in CI and local environments.
47-47: Declare tsdown and remove unbuild.Adding
[email protected]is required. Ensure anyunbuildentries and related scripts/configs have been removed to avoid legacy tool conflicts.
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
More templates
@orpc/arktype
@orpc/client
@orpc/contract
@orpc/hey-api
@orpc/nest
@orpc/openapi
@orpc/openapi-client
@orpc/react
@orpc/react-query
@orpc/server
@orpc/shared
@orpc/solid-query
@orpc/standard-server
@orpc/standard-server-aws-lambda
@orpc/standard-server-fetch
@orpc/standard-server-node
@orpc/standard-server-peer
@orpc/svelte-query
@orpc/tanstack-query
@orpc/valibot
@orpc/vue-colada
@orpc/vue-query
@orpc/zod
commit: |
|
I will wait until tsdown workspace feature is stable. Some unbuild features really helpful, but tsdown does support yet.
|
Replaced the per-package unbuild setup with a single unified tsdown workspace setup. This also fixes the self-importing issue i mentioned in #621.
Summary by CodeRabbit