Conversation
WalkthroughThis change migrates the build tooling for all relevant packages from Changes
Sequence Diagram(s)sequenceDiagram
participant Package as Package (e.g., core, vue, react)
participant Config as @prosekit/config-tsdown
participant Tsdown as tsdown
Package->>Config: import config()
Package->>Tsdown: defineConfig(config())
Tsdown-->>Package: uses merged config for build
sequenceDiagram
participant Developer
participant Turbo
participant Package
Developer->>Turbo: Run build
Turbo->>Package: Run "build:tsdown" script
Package->>Tsdown: Execute build with tsdown.config.ts
Tsdown-->>Package: Build outputs
Possibly related PRs
Poem
✨ Finishing Touches
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:
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 (
|
@prosekit/basic
@prosekit/core
@prosekit/extensions
@prosekit/lit
@prosekit/pm
prosekit
@prosekit/preact
@prosekit/react
@prosekit/solid
@prosekit/svelte
@prosekit/vue
@prosekit/web
commit: |
size-limit report 📦
|
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
packages/config-tsdown/package.json (1)
11-11: Consider removing empty scripts block
An empty"scripts": {}entry can be omitted to reduce noise or populated with tasks (e.g.,build,test).packages/config-tsdown/src/index.ts (2)
23-33: Fix typo in comment.There's a spelling error in the comment.
// Bundling CSS files to remove the `@import` statements. This increases the - // compability of the output. + // compatibility of the output. noExternal: [/\.css$/i],
35-40: Consider adding JSDoc documentation.The exported function and helper function would benefit from JSDoc comments explaining their purpose, parameters, and return value.
+/** + * Creates a tsdown configuration by reading the nearest package.json file + * and merging default options with any provided input options. + * @param input Optional user-provided configuration options + * @returns Complete tsdown configuration options + */ export function config(input?: Options): Options { // ... existing implementation } +/** + * Performs a deep merge of two Options objects + * @param a Base options object + * @param b Optional options object to merge with base + * @returns Deep merged options object + */ function deepMergeOptions(a: Options, b?: Options): Options { return merge({}, a, b) }
📜 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 (43)
.changeset/config.json(1 hunks).gitignore(0 hunks).prettierignore(0 hunks)packages/basic/package.json(1 hunks)packages/basic/tsdown.config.ts(1 hunks)packages/basic/tsup.config.ts(0 hunks)packages/config-tsdown/package.json(1 hunks)packages/config-tsdown/src/index.ts(1 hunks)packages/config-tsup/src/config-tsup-types.d.ts(0 hunks)packages/config-tsup/src/config-tsup.js(0 hunks)packages/core/package.json(2 hunks)packages/core/tsdown.config.ts(1 hunks)packages/core/tsup.config.ts(0 hunks)packages/extensions/package.json(2 hunks)packages/extensions/tsdown.config.ts(1 hunks)packages/extensions/tsup.config.ts(0 hunks)packages/lit/package.json(1 hunks)packages/lit/tsdown.config.ts(1 hunks)packages/lit/tsup.config.ts(0 hunks)packages/pm/package.json(2 hunks)packages/pm/tsdown.config.ts(1 hunks)packages/pm/tsup.config.ts(0 hunks)packages/preact/package.json(2 hunks)packages/preact/tsdown.config.ts(1 hunks)packages/preact/tsup.config.ts(0 hunks)packages/prosekit/package.json(3 hunks)packages/prosekit/tsdown.config.ts(1 hunks)packages/prosekit/tsup.config.ts(0 hunks)packages/react/package.json(2 hunks)packages/react/tsdown.config.ts(1 hunks)packages/react/tsup.config.ts(0 hunks)packages/solid/package.json(2 hunks)packages/solid/tsdown.config.ts(1 hunks)packages/solid/tsup.config.ts(0 hunks)packages/svelte/package.json(0 hunks)packages/vue/package.json(2 hunks)packages/vue/tsdown.config.ts(1 hunks)packages/vue/tsup.config.ts(0 hunks)packages/web/package.json(2 hunks)packages/web/tsdown.config.ts(1 hunks)packages/web/tsup.config.ts(0 hunks)tsconfig.json(1 hunks)turbo.json(1 hunks)
💤 Files with no reviewable changes (16)
- .prettierignore
- .gitignore
- packages/config-tsup/src/config-tsup-types.d.ts
- packages/web/tsup.config.ts
- packages/pm/tsup.config.ts
- packages/solid/tsup.config.ts
- packages/preact/tsup.config.ts
- packages/vue/tsup.config.ts
- packages/basic/tsup.config.ts
- packages/lit/tsup.config.ts
- packages/svelte/package.json
- packages/react/tsup.config.ts
- packages/prosekit/tsup.config.ts
- packages/extensions/tsup.config.ts
- packages/core/tsup.config.ts
- packages/config-tsup/src/config-tsup.js
🔇 Additional comments (44)
.changeset/config.json (1)
11-11: Approve: Ignore@prosekit/devin changesets
Adding the dev package to the ignore list prevents unnecessary version bumps for internal tooling, aligning with the tsdown migration.tsconfig.json (1)
17-17: Update TSConfig reference path
The project reference has been correctly updated to point topackages/config-tsdown/tsconfig.json, aligning with the migration from the oldconfig-tsupconfiguration.turbo.json (2)
6-6: Replace rootbuilddependency withbuild:tsdown
The rootbuildtask now depends onbuild:tsdown, ensuring that the newtsdownbuild runs instead of the oldtsuptask.
14-18: Addbuild:tsdowntask
Introduces thebuild:tsdowntask with proper dependencies (^buildandbuild:tsc) and outputs, mirroring the structure of the previoustsupsetup.packages/react/package.json (2)
42-42: Switch React build script totsdown
Renames thebuild:tsupscript tobuild:tsdownand invokes thetsdownCLI accordingly.
65-65: Update React devDependencies for tsdown
Replaces@prosekit/config-tsupandtsupwith@prosekit/config-tsdownandtsdown, ensuring the correct build tool and shared configuration are installed.Also applies to: 71-71
packages/vue/package.json (2)
42-42: Switch Vue build script totsdown
Updates the build command fromtsuptotsdown, consistent with the migration across packages.
60-60: Update Vue devDependencies for tsdown
Adds@prosekit/config-tsdownandtsdowntodevDependencies, replacing the previousconfig-tsupandtsupentries.Also applies to: 64-64
packages/preact/package.json (2)
42-42: Switch Preact build script totsdown
The build script is updated to usetsdowninstead oftsup, aligning with the monorepo-wide migration.
59-59: Update Preact devDependencies for tsdown
Dev dependencies now reference@prosekit/config-tsdownandtsdown, replacing the legacyconfig-tsupandtsup.Also applies to: 62-62
packages/pm/package.json (2)
44-44: Ensure CI and build pipelines are updated to use"build:tsdown".
The new"build:tsdown": "tsdown"script replaces the previoustsupinvocation—verify that any CI workflows,turbo.jsontasks, and developer documentation have been updated accordingly to avoid broken builds.
57-60: Switch devDependencies fromtsuptotsdown.
Adding@prosekit/config-tsdownandtsdown@^0.8.1aligns this package with the new shared config—ensure the versions are consistent across all packages.packages/basic/tsdown.config.ts (1)
1-4: Correctly wrap@prosekit/config-tsdownindefineConfig.
This boilerplate standalone file imports the centralized config and exports it fortsdown—the implementation is concise and valid.packages/extensions/package.json (2)
77-77: Update the build script totsdown.
You’ve added"build:tsdown": "tsdown"—please confirm that the obsoletebuild:tsupentry is removed from the root-level CI, other packages, and the monorepo task orchestrator (turbo.json).
113-114: Migrate devDependencies totsdown.
Switching from@prosekit/config-tsup/tsupto@prosekit/config-tsdown/tsdownis correct. Ensure thetsdownversion aligns with other packages to maintain consistency.Also applies to: 120-120
packages/core/tsdown.config.ts (1)
1-4: Implement centraltsdownconfig wrapper.
The new config file correctly imports and delegates to the shared@prosekit/config-tsdownpackage—this follows the established pattern.packages/prosekit/tsdown.config.ts (1)
1-4: Standardizetsdownconfiguration for the root package.
This simple wrapper correctly applies the centralized configuration; no changes needed.packages/lit/tsdown.config.ts (1)
1-4: Approve: Proper tsdown configuration wrapperThe new
tsdown.config.tscorrectly imports the shared configuration and wraps it withdefineConfig. This aligns with the migration pattern across other packages.packages/solid/package.json (2)
40-43: Verify build script updateThe new
build:tsdownscript replacesbuild:tsup. Ensure that CI workflows, documentation, and any project scripts referencingbuild:tsuphave been updated to prevent stale or broken commands.
59-63: Approve: Updated devDependencies for tsdown migrationIntroducing
@prosekit/config-tsdownandtsdownhere correctly mirrors the migration in other packages. Versioning is consistent across the monorepo.packages/core/package.json (2)
34-37: Verify build script updateThe
build:tsdownscript has been added. Please confirm that any remaining references tobuild:tsupin CI configs or documentation are removed or updated accordingly.
48-53: Approve: DevDependencies aligned with tsdownSwitching to
@prosekit/config-tsdownandtsdownmatches the established pattern. Versions are in sync with other packages.packages/web/package.json (2)
40-43: Verify build script referencesWith the addition of
build:tsdown, ensure all CI pipelines and docs no longer referencebuild:tsupto avoid inconsistencies.
60-64: Approve: Updated devDependencies for tsdownAdding
@prosekit/config-tsdownandtsdownhere correctly supports the migration and maintains version consistency.packages/pm/tsdown.config.ts (1)
1-4: Approve: Standardized tsdown configurationThis file applies the shared
tsdownconfiguration usingdefineConfigand matches the approach taken in other packages.packages/solid/tsdown.config.ts (1)
1-4: Appropriate migration totsdown.
The new tsdown.config.ts correctly imports the shared configuration from@prosekit/config-tsdownand wraps it withdefineConfigfromtsdown. This aligns perfectly with the repository-wide shift fromtsuptotsdown.packages/preact/tsdown.config.ts (1)
1-4: Consistent wrapper setup.
This file mirrors the other packages’ tsdown.config.ts structure, delegating to the centralized@prosekit/config-tsdown. No issues detected.packages/web/tsdown.config.ts (1)
1-4: Standardized tsdown configuration.
The wrapper correctly applies the shared config viadefineConfig(config()). It’s consistent with the rest of the monorepo’s migration.packages/vue/tsdown.config.ts (1)
1-4: Correctly applied shared config.
The new tsdown.config.ts delegates to@prosekit/config-tsdownas expected. Everything looks in order.packages/lit/package.json (2)
41-43: Update CI and tooling references.
You’ve switched the build script frombuild:tsuptobuild:tsdown. Please verify that all CI workflows (e.g., GitHub Actions, Turbo tasks) and any local tooling or pre-commit hooks referencingbuild:tsupare updated accordingly to prevent broken pipelines.
48-50: Verify pinned versions of new dependencies.
Confirm that@prosekit/config-tsdown(workspace:*) andtsdown@^0.8.1are the intended, stable releases without known vulnerabilities.packages/react/tsdown.config.ts (2)
1-2: Use standardized config import pattern
Imports from@prosekit/config-tsdownandtsdownalign with other packages' new setup.
4-4: Export default configuration wrapper
defineConfig(config())correctly applies the centralizedtsdownconfig.packages/basic/package.json (2)
36-38: Verify presence of tsdown configuration file
The build script has been updated to usetsdown. Ensure that a correspondingtsdown.config.tsexists in this package (e.g.,packages/basic/tsdown.config.ts) so the build command will succeed.
45-49: DevDependencies updated for tsdown usage
Switched from@prosekit/config-tsup/tsupto@prosekit/config-tsdown/tsdownas expected.packages/extensions/tsdown.config.ts (2)
1-2: Import base config and defineConfig
The imports correctly pull in the base config anddefineConfigfunction fortsdown.
4-9: Override entry for chunked build
Providing a customentryto retain predictable filenames is necessary; the inline comment clarifies intent.packages/config-tsdown/package.json (3)
2-2: Rename package identifier
The package name correctly reflects the newconfig-tsdownpurpose.
8-10: Simplify exports to source entrypoint
Exporting./src/index.tsas the package entry aligns with ESM best practices.
16-16: Add tsdown to devDependencies
Includingtsdownhere ensures internal config builds function properly.packages/prosekit/package.json (2)
148-151: Update build script to tsdown
The script updates to"build:tsdown"are correct. Ensure atsdown.config.tsfile exists underpackages/prosekitto supply configuration.
210-224: Swap tsup for tsdown in devDependencies
The transition from@prosekit/config-tsup/tsupto@prosekit/config-tsdown/tsdownis consistent with the monorepo migration.packages/config-tsdown/src/index.ts (2)
1-4: Proper import selections for package configuration.The imports are appropriate for the configuration functionality - using lodash-es for deep merging, read-package-up for finding package.json, and properly importing types from tsdown.
5-21: Good error handling for package.json loading.The function properly handles error cases with clear error messages when package.json can't be found or when the required entry field is missing.
Summary by CodeRabbit