impr: Move sort package to tsdown - #2902
Conversation
|
pkg.pr.new packages benchmark commit |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Migrate
@typegpu/sortbuild tooling fromunbuildtotsdown— replacesbuild.config.tswith atsdown.config.tsstructured identically to the already-merged@typegpu/sdftsdown migration, and updatespackage.json(build script, devDependencies, publishConfig paths) andpnpm-lock.yaml.
I verified the migration end-to-end: pnpm --filter @typegpu/sort build succeeds and emits dist/index.js and dist/index.d.ts (plus unbundled submodules), which exactly matches the paths updated in publishConfig. The .mjs→.js switch and removal of the .cjs default export are consistent with tsdown's esm-only output and match @typegpu/sdf. No dangling unbuild references remain for this package.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Bundle size comparison (
|
| 🟢 Decreased | ➖ Unchanged | 🔴 Increased | ❔ Unknown |
|---|---|---|---|
| 0 | 325 | 0 | 0 |
import { ... } in PR vs import * as ... in PR (is the library tree-Shakeable?):
| Test | tsdown |
|---|---|
| tgpu_init.ts | 263.09 kB ( |
| tgpu_initFromDevice.ts | 262.55 kB ( |
| tgpu_resolve.ts | 161.75 kB ( |
| tgpu_resolveWithContext.ts | 161.68 kB ( |
| tgpu_bindGroupLayout.ts | 62.32 kB ( |
| tgpu_mutableAccessor.ts | 57.04 kB ( |
| tgpu_accessor.ts | 57.04 kB ( |
| tgpu_privateVar.ts | 55.73 kB ( |
| tgpu_workgroupVar.ts | 55.73 kB ( |
| tgpu_const.ts | 55.15 kB ( |
| tgpu_lazy.ts | 54.95 kB ( |
| tgpu_fragmentFn.ts | 39.68 kB ( |
| tgpu_fn.ts | 39.62 kB ( |
| tgpu_vertexFn.ts | 39.50 kB ( |
| tgpu_computeFn.ts | 39.20 kB ( |
| tgpu_vertexLayout.ts | 28.33 kB ( |
| tgpu_comptime.ts | 15.93 kB ( |
| tgpu_unroll.ts | 1.75 kB ( |
| tgpu_slot.ts | 1.70 kB ( |
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [1.10, 2.16, 4.64, 6.83, 7.89, 14.42, 24.91, 28.91]
line [0.97, 2.03, 4.26, 7.10, 8.47, 13.53, 26.24, 24.62]
line [1.03, 2.06, 4.93, 7.19, 8.03, 14.42, 24.84, 26.11]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.35, 0.57, 0.77, 0.87, 1.19, 1.34, 1.53, 1.71]
line [0.32, 0.53, 0.74, 0.86, 1.11, 1.13, 1.41, 1.52]
line [0.33, 0.56, 0.78, 0.89, 1.18, 1.21, 1.46, 1.60]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.93, 2.09, 3.87, 7.32, 13.06, 28.18, 59.76, 120.76]
line [0.85, 2.32, 3.77, 7.53, 13.50, 28.05, 58.23, 117.27]
line [0.90, 2.14, 3.57, 7.27, 13.17, 27.96, 58.66, 119.87]
|
3d2956d to
d7c54aa
Compare
There was a problem hiding this comment.
Pull request overview
This PR migrates the @typegpu/sort package build pipeline from unbuild to tsdown, aligning it with other packages in the monorepo that already use tsdown + unplugin-typegpu/rolldown.
Changes:
- Switch
packages/typegpu-sortbuild script fromunbuildtotsdownand add atsdown.config.ts. - Update
@typegpu/sortpublish outputs to ESM (dist/index.js) consistent with othertsdown-built packages. - Update the lockfile to reflect the new build dependency (
tsdown) and removeunbuild.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pnpm-lock.yaml | Adds tsdown (and removes unbuild) in the dependency graph; also records eslint@9.39.2 as deprecated. |
| packages/typegpu-sort/tsdown.config.ts | Introduces tsdown build configuration using unplugin-typegpu/rolldown. |
| packages/typegpu-sort/package.json | Switches build tooling to tsdown and updates published entrypoints to dist/index.js. |
| packages/typegpu-sort/build.config.ts | Removes the prior unbuild configuration. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| eslint@9.39.2: | ||
| resolution: {integrity: sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==} | ||
| engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} | ||
| deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. |
| { | ||
| "name": "@typegpu/sort", | ||
| "version": "0.11.0", | ||
| "private": true, |
There was a problem hiding this comment.
How far away are we from releasing this package? Will it be ready after this stack is merged?
d7c54aa to
95a5180
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Re-applied the
@typegpu/sortunbuild→tsdown migration — the new single commit95a5180creproduces the exact migration already reviewed and approved atd7c54aa5/3d2956d7: deletesbuild.config.ts, addstsdown.config.ts(byte-identical to the mergedtypegpu-sdfconfig), updatespackage.json(build script, devDeps, esm./dist/index.jspublish paths), and updatespnpm-lock.yaml.
I verified the incremental delta is effectively nil: tsdown.config.ts and package.json are byte-identical to the previously reviewed-and-approved state, and the PR-scope diff vs base is only this 4-file migration (commitCount 1). No new concerns relative to the prior ✅ No new issues found. review.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

No description provided.