Skip to content

chore: use tsdown to bundle packages#980

Merged
ocavue merged 24 commits intomasterfrom
ocavue/tsdown2
Apr 19, 2025
Merged

chore: use tsdown to bundle packages#980
ocavue merged 24 commits intomasterfrom
ocavue/tsdown2

Conversation

@ocavue
Copy link
Copy Markdown
Collaborator

@ocavue ocavue commented Apr 18, 2025

Summary by CodeRabbit

  • Chores
    • Replaced the build tool "tsup" with "tsdown" across all packages, updating scripts, dependencies, and configuration files.
    • Removed legacy configuration and dependency files related to "tsup".
    • Updated project and build system configuration files to reflect the new build process.
    • Adjusted ignore files to align with the updated build tooling.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 18, 2025

Walkthrough

This change migrates the build tooling for all relevant packages from tsup to tsdown. It removes all tsup configuration files and dependencies, replacing them with their tsdown equivalents. Centralized configuration is now provided by a new @prosekit/config-tsdown package, which replaces @prosekit/config-tsup. All affected package scripts, devDependencies, and config files are updated accordingly. Additionally, the .gitignore, .prettierignore, and various project-level config files are adjusted to reflect the new tooling and remove references to tsup. The .changeset/config.json is also updated to ignore the @prosekit/dev package.

Changes

Files/Paths Change Summary
.gitignore, .prettierignore Removed .tsup and related patterns from ignore lists.
.changeset/config.json Added @prosekit/dev to ignored packages.
tsconfig.json, turbo.json Updated references and task names from tsup to tsdown.
packages/*/package.json Switched build scripts and devDependencies from tsup/@prosekit/config-tsup to tsdown/@prosekit/config-tsdown.
packages/*/tsdown.config.ts Added new tsdown config files importing from @prosekit/config-tsdown.
packages/*/tsup.config.ts Deleted all tsup config files.
packages/config-tsdown/package.json Renamed from @prosekit/config-tsup, updated exports, dependencies, and added empty scripts.
packages/config-tsdown/src/index.ts New: Exports a config function for tsdown configuration, merging defaults with user options.
packages/config-tsup/src/config-tsup.js, .../config-tsup-types.d.ts Deleted: Removed old centralized tsup config and type re-exports.
packages/extensions/tsdown.config.ts New: Customizes entry point for chunk naming in tsdown build.
packages/svelte/package.json Removed unused @prosekit/config-tsup devDependency.

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
Loading
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
Loading

Possibly related PRs

  • prosekit/prosekit#983: Refactors the logic generating the changeset ignore list, which also involves .changeset/config.json.
  • prosekit/prosekit#984: Removes @prosekit/dev from the ignore list in .changeset/config.json—directly related to the ignore configuration.
  • prosekit/prosekit#981: Centralizes tsup config, similar in scope but for the previous build tool, involving the same config files and packages.

Poem

A hop and a skip, we’ve changed the tool,
From tsup to tsdown, now isn’t that cool?
Configs are lighter, the scripts are all new,
The garden of builds now sparkles with dew.
With bundles so tidy, and chores all redone,
This rabbit declares: migration’s fun! 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 18, 2025

Open in StackBlitz

@prosekit/basic

npm i https://pkg.pr.new/prosekit/prosekit/@prosekit/basic@980

@prosekit/core

npm i https://pkg.pr.new/prosekit/prosekit/@prosekit/core@980

@prosekit/extensions

npm i https://pkg.pr.new/prosekit/prosekit/@prosekit/extensions@980

@prosekit/lit

npm i https://pkg.pr.new/prosekit/prosekit/@prosekit/lit@980

@prosekit/pm

npm i https://pkg.pr.new/prosekit/prosekit/@prosekit/pm@980

prosekit

npm i https://pkg.pr.new/prosekit/prosekit@980

@prosekit/preact

npm i https://pkg.pr.new/prosekit/prosekit/@prosekit/preact@980

@prosekit/react

npm i https://pkg.pr.new/prosekit/prosekit/@prosekit/react@980

@prosekit/solid

npm i https://pkg.pr.new/prosekit/prosekit/@prosekit/solid@980

@prosekit/svelte

npm i https://pkg.pr.new/prosekit/prosekit/@prosekit/svelte@980

@prosekit/vue

npm i https://pkg.pr.new/prosekit/prosekit/@prosekit/vue@980

@prosekit/web

npm i https://pkg.pr.new/prosekit/prosekit/@prosekit/web@980

commit: 0358c4e

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 18, 2025

size-limit report 📦

Path Size
prosekit/basic 65.88 KB (0%)
prosekit/basic/style.css -15 B (-101.48% 🔽)
prosekit/basic/typography.css 606 B (-9.01% 🔽)
prosekit/core 62.2 KB (0%)
prosekit/core/test 51.06 KB (0%)
prosekit/extensions 13 B (0%)
prosekit/extensions/autocomplete 28.98 KB (0%)
prosekit/extensions/blockquote 21.41 KB (0%)
prosekit/extensions/bold 21.63 KB (0%)
prosekit/extensions/code 21.55 KB (0%)
prosekit/extensions/code-block 1.05 MB (0%)
prosekit/extensions/commit 31.56 KB (0%)
prosekit/extensions/commit/style.css -15 B (-125% 🔽)
prosekit/extensions/doc 10.5 KB (0%)
prosekit/extensions/drop-cursor 14.73 KB (0%)
prosekit/extensions/enter-rule 15.12 KB (0%)
prosekit/extensions/file 14.42 KB (0%)
prosekit/extensions/gap-cursor 30.1 KB (0%)
prosekit/extensions/gap-cursor/style.css -15 B (-110.07% 🔽)
prosekit/extensions/heading 21.72 KB (0%)
prosekit/extensions/horizontal-rule 15.71 KB (0%)
prosekit/extensions/image 14.98 KB (0%)
prosekit/extensions/input-rule 15.08 KB (0%)
prosekit/extensions/italic 21.58 KB (0%)
prosekit/extensions/link 25.7 KB (0%)
prosekit/extensions/list 40.9 KB (0%)
prosekit/extensions/list/style.css -15 B (-103.34% 🔽)
prosekit/extensions/loro 19.27 KB (0%)
prosekit/extensions/loro/style.css 181 B (0%)
prosekit/extensions/mark-rule 14.43 KB (0%)
prosekit/extensions/mention 14.93 KB (0%)
prosekit/extensions/mod-click-prevention 13.84 KB (0%)
prosekit/extensions/paragraph 20.22 KB (0%)
prosekit/extensions/placeholder 32.97 KB (0%)
prosekit/extensions/placeholder/style.css -15 B (-124.6% 🔽)
prosekit/extensions/readonly 13.76 KB (0%)
prosekit/extensions/search 30.42 KB (0%)
prosekit/extensions/search/style.css 117 B (0%)
prosekit/extensions/strike 21.61 KB (0%)
prosekit/extensions/table 44.97 KB (0%)
prosekit/extensions/table/style.css -15 B (-106.23% 🔽)
prosekit/extensions/text 10.5 KB (0%)
prosekit/extensions/text-align 20.24 KB (0%)
prosekit/extensions/underline 20.6 KB (0%)
prosekit/extensions/virtual-selection 28.52 KB (0%)
prosekit/extensions/virtual-selection/style.css -15 B (-123.44% 🔽)
prosekit/extensions/yjs 19.49 KB (0%)
prosekit/extensions/yjs/style.css 192 B (0%)
prosekit/lit 13 B (0%)
prosekit/lit/autocomplete 46.76 KB (0%)
prosekit/lit/block-handle 26.58 KB (0%)
prosekit/lit/inline-popover 30.03 KB (0%)
prosekit/lit/popover 14.04 KB (0%)
prosekit/lit/resizable 4.03 KB (0%)
prosekit/lit/table-handle 34.78 KB (0%)
prosekit/lit/tooltip 11.41 KB (0%)
prosekit/pm 13 B (0%)
prosekit/pm/commands 15.84 KB (0%)
prosekit/pm/history 13.55 KB (0%)
prosekit/pm/inputrules 11.8 KB (0%)
prosekit/pm/keymap 11.72 KB (0%)
prosekit/pm/model 12.71 KB (0%)
prosekit/pm/state 16.8 KB (0%)
prosekit/pm/transform 14.62 KB (0%)
prosekit/pm/view 39.91 KB (0%)
prosekit/pm/view/style/prosemirror.css -15 B (-105.8% 🔽)
prosekit/preact 19.56 KB (0%)
prosekit/preact/autocomplete 47.45 KB (0%)
prosekit/preact/block-handle 27.22 KB (0%)
prosekit/preact/inline-popover 30.54 KB (0%)
prosekit/preact/popover 14.64 KB (0%)
prosekit/preact/resizable 4.65 KB (0%)
prosekit/preact/table-handle 35.44 KB (0%)
prosekit/preact/tooltip 12.01 KB (0%)
prosekit/react 36.46 KB (0%)
prosekit/react/autocomplete 47.43 KB (0%)
prosekit/react/block-handle 27.17 KB (0%)
prosekit/react/inline-popover 30.5 KB (0%)
prosekit/react/popover 14.61 KB (0%)
prosekit/react/resizable 4.6 KB (0%)
prosekit/react/table-handle 35.44 KB (0%)
prosekit/react/tooltip 11.96 KB (0%)
prosekit/solid 39.69 KB (0%)
prosekit/solid/autocomplete 47.36 KB (0%)
prosekit/solid/block-handle 27.11 KB (0%)
prosekit/solid/inline-popover 30.45 KB (0%)
prosekit/solid/popover 14.58 KB (0%)
prosekit/solid/resizable 4.55 KB (0%)
prosekit/solid/table-handle 35.34 KB (0%)
prosekit/solid/tooltip 11.92 KB (0%)
prosekit/vue 36.61 KB (0%)
prosekit/vue/autocomplete 47.23 KB (0%)
prosekit/vue/block-handle 27.04 KB (0%)
prosekit/vue/inline-popover 30.47 KB (0%)
prosekit/vue/popover 14.48 KB (0%)
prosekit/vue/resizable 4.47 KB (0%)
prosekit/vue/table-handle 35.28 KB (0%)
prosekit/vue/tooltip 11.83 KB (0%)
prosekit/web 13 B (0%)
prosekit/web/autocomplete 46.74 KB (0%)
prosekit/web/block-handle 26.59 KB (0%)
prosekit/web/inline-popover 30.04 KB (0%)
prosekit/web/popover 14.06 KB (0%)
prosekit/web/resizable 4.07 KB (0%)
prosekit/web/table-handle 34.81 KB (0%)
prosekit/web/tooltip 11.39 KB (0%)

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 18, 2025

⚠️ No Changeset found

Latest commit: 0358c4e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown

@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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between a2bb784 and 0358c4e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is 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/dev in 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 to packages/config-tsdown/tsconfig.json, aligning with the migration from the old config-tsup configuration.

turbo.json (2)

6-6: Replace root build dependency with build:tsdown
The root build task now depends on build:tsdown, ensuring that the new tsdown build runs instead of the old tsup task.


14-18: Add build:tsdown task
Introduces the build:tsdown task with proper dependencies (^build and build:tsc) and outputs, mirroring the structure of the previous tsup setup.

packages/react/package.json (2)

42-42: Switch React build script to tsdown
Renames the build:tsup script to build:tsdown and invokes the tsdown CLI accordingly.


65-65: Update React devDependencies for tsdown
Replaces @prosekit/config-tsup and tsup with @prosekit/config-tsdown and tsdown, 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 to tsdown
Updates the build command from tsup to tsdown, consistent with the migration across packages.


60-60: Update Vue devDependencies for tsdown
Adds @prosekit/config-tsdown and tsdown to devDependencies, replacing the previous config-tsup and tsup entries.

Also applies to: 64-64

packages/preact/package.json (2)

42-42: Switch Preact build script to tsdown
The build script is updated to use tsdown instead of tsup, aligning with the monorepo-wide migration.


59-59: Update Preact devDependencies for tsdown
Dev dependencies now reference @prosekit/config-tsdown and tsdown, replacing the legacy config-tsup and tsup.

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 previous tsup invocation—verify that any CI workflows, turbo.json tasks, and developer documentation have been updated accordingly to avoid broken builds.


57-60: Switch devDependencies from tsup to tsdown.
Adding @prosekit/config-tsdown and tsdown@^0.8.1 aligns 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-tsdown in defineConfig.
This boilerplate standalone file imports the centralized config and exports it for tsdown—the implementation is concise and valid.

packages/extensions/package.json (2)

77-77: Update the build script to tsdown.
You’ve added "build:tsdown": "tsdown"—please confirm that the obsolete build:tsup entry is removed from the root-level CI, other packages, and the monorepo task orchestrator (turbo.json).


113-114: Migrate devDependencies to tsdown.
Switching from @prosekit/config-tsup/tsup to @prosekit/config-tsdown/tsdown is correct. Ensure the tsdown version aligns with other packages to maintain consistency.

Also applies to: 120-120

packages/core/tsdown.config.ts (1)

1-4: Implement central tsdown config wrapper.
The new config file correctly imports and delegates to the shared @prosekit/config-tsdown package—this follows the established pattern.

packages/prosekit/tsdown.config.ts (1)

1-4: Standardize tsdown configuration 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 wrapper

The new tsdown.config.ts correctly imports the shared configuration and wraps it with defineConfig. This aligns with the migration pattern across other packages.

packages/solid/package.json (2)

40-43: Verify build script update

The new build:tsdown script replaces build:tsup. Ensure that CI workflows, documentation, and any project scripts referencing build:tsup have been updated to prevent stale or broken commands.


59-63: Approve: Updated devDependencies for tsdown migration

Introducing @prosekit/config-tsdown and tsdown here correctly mirrors the migration in other packages. Versioning is consistent across the monorepo.

packages/core/package.json (2)

34-37: Verify build script update

The build:tsdown script has been added. Please confirm that any remaining references to build:tsup in CI configs or documentation are removed or updated accordingly.


48-53: Approve: DevDependencies aligned with tsdown

Switching to @prosekit/config-tsdown and tsdown matches the established pattern. Versions are in sync with other packages.

packages/web/package.json (2)

40-43: Verify build script references

With the addition of build:tsdown, ensure all CI pipelines and docs no longer reference build:tsup to avoid inconsistencies.


60-64: Approve: Updated devDependencies for tsdown

Adding @prosekit/config-tsdown and tsdown here correctly supports the migration and maintains version consistency.

packages/pm/tsdown.config.ts (1)

1-4: Approve: Standardized tsdown configuration

This file applies the shared tsdown configuration using defineConfig and matches the approach taken in other packages.

packages/solid/tsdown.config.ts (1)

1-4: Appropriate migration to tsdown.
The new tsdown.config.ts correctly imports the shared configuration from @prosekit/config-tsdown and wraps it with defineConfig from tsdown. This aligns perfectly with the repository-wide shift from tsup to tsdown.

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 via defineConfig(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-tsdown as expected. Everything looks in order.

packages/lit/package.json (2)

41-43: Update CI and tooling references.
You’ve switched the build script from build:tsup to build:tsdown. Please verify that all CI workflows (e.g., GitHub Actions, Turbo tasks) and any local tooling or pre-commit hooks referencing build:tsup are updated accordingly to prevent broken pipelines.


48-50: Verify pinned versions of new dependencies.
Confirm that @prosekit/config-tsdown (workspace:*) and tsdown@^0.8.1 are the intended, stable releases without known vulnerabilities.

packages/react/tsdown.config.ts (2)

1-2: Use standardized config import pattern
Imports from @prosekit/config-tsdown and tsdown align with other packages' new setup.


4-4: Export default configuration wrapper
defineConfig(config()) correctly applies the centralized tsdown config.

packages/basic/package.json (2)

36-38: Verify presence of tsdown configuration file
The build script has been updated to use tsdown. Ensure that a corresponding tsdown.config.ts exists 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/tsup to @prosekit/config-tsdown/tsdown as expected.

packages/extensions/tsdown.config.ts (2)

1-2: Import base config and defineConfig
The imports correctly pull in the base config and defineConfig function for tsdown.


4-9: Override entry for chunked build
Providing a custom entry to 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 new config-tsdown purpose.


8-10: Simplify exports to source entrypoint
Exporting ./src/index.ts as the package entry aligns with ESM best practices.


16-16: Add tsdown to devDependencies
Including tsdown here 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 a tsdown.config.ts file exists under packages/prosekit to supply configuration.


210-224: Swap tsup for tsdown in devDependencies
The transition from @prosekit/config-tsup/tsup to @prosekit/config-tsdown/tsdown is 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.

@ocavue ocavue merged commit 8332bf6 into master Apr 19, 2025
15 checks passed
@ocavue ocavue deleted the ocavue/tsdown2 branch April 19, 2025 07:20
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