Conversation
|
pkg.pr.new packages benchmark commit |
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 [0.78, 1.52, 3.19, 4.64, 5.97, 9.10, 18.70, 18.19]
line [0.73, 1.44, 3.17, 4.86, 5.54, 9.74, 18.43, 19.84]
line [0.75, 1.56, 3.26, 5.39, 5.45, 7.98, 19.13, 19.43]
---
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.22, 0.40, 0.54, 0.63, 0.87, 0.88, 1.08, 1.27]
line [0.23, 0.39, 0.50, 0.65, 0.91, 0.95, 1.08, 1.18]
line [0.22, 0.40, 0.57, 0.63, 0.90, 0.95, 1.12, 1.24]
---
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.94, 2.13, 4.15, 6.07, 10.18, 19.81, 41.66, 84.53]
line [0.77, 1.82, 3.14, 5.25, 8.98, 19.14, 43.06, 86.19]
line [0.73, 1.89, 3.42, 5.40, 9.13, 20.63, 42.20, 85.46]
|
Bundle size comparison (
|
| 🟢 Decreased | ➖ Unchanged | 🔴 Increased | ❔ Unknown |
|---|---|---|---|
| 0 | 325 | 0 | 0 |
No notable changes.
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.
There was a problem hiding this comment.
🟢 Approval recommended
The change is minimal, aligns Bun behavior with the intended option semantics, and includes targeted automated test coverage.
Pull request overview
This PR fixes the Bun integration of unplugin-typegpu so that its “early pruning” optimization is controlled by the earlyPruning option (matching the behavior of the shared unplugin factory), and adds a Bun-specific regression test to cover the option behavior.
Changes:
- Gate Bun’s early-pruning short-circuit behind
options.earlyPruning. - Add a Vitest suite verifying
earlyPruning: falseforces transformation, whiletrue/undefinedpreserves original code when the prune regex doesn’t match.
File summaries
| File | Description |
|---|---|
| packages/unplugin-typegpu/src/bun.ts | Makes Bun’s early-pruning return path conditional on options.earlyPruning. |
| packages/unplugin-typegpu/test/bun.test.ts | Adds regression coverage for earlyPruning behavior across undefined, true, and false. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — This run reviewed the full PR: a one-line change and its accompanying test.
- Bun plugin honors
earlyPruning(src/bun.ts:27) — the early-prune skip is now gated onoptions.earlyPruning, bringing the Bun plugin in line with the coreunpluginFactory, which already applies theearlyPruneRegexcode filter only whenearlyPruningis enabled. The Bun plugin is the single framework that reimplements pruning manually in itsonLoadhandler, so this closes a real behavioral gap: withearlyPruning: false, files withouttgpu/use gpumarkers were previously left untransformed. - New regression test (
test/bun.test.ts) —it.each([undefined, true, false])stubs theBunglobal, invokes the registeredonLoadhandler on a marker-freed.struct({...})snippet, and asserts unchanged output forundefined/truewhile requiring auto-named output (__TYPEGPU_AUTONAME__,"myStruct") forfalse. Verified locally that this test fails (1/3) with the fix reverted and passes (3/3) with it, so the coverage is genuine. Theundefinedcase also exercises thedefudefault (true) merge.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

No description provided.