Skip to content

Build the Open source list from what the bundle includes - #795

Merged
nulltask merged 3 commits into
develfrom
fix/open-source-acknowledgements
Oct 26, 2026
Merged

nulltask merged 3 commits into
develfrom
fix/open-source-acknowledgements

Conversation

@nulltask

Copy link
Copy Markdown
Owner

The Help's Open source list walked dependencies from app-play and player-browser. It had gaps both ways:

  • Missing: everything the workspace packages bring in (lit-html, lit-element, @lit/reactive-element via player-ui; fengari-web via skin-beatoraja; alien-signals) and the stylesheet's frameworks (tailwindcss, basecoat-css).
  • No license text: @ffmpeg/core (GPL-2.0-or-later, served as ffmpeg-core.wasm), @ffmpeg/ffmpeg, @ffmpeg/util, @pixi/colord, signalsmith-stretch and tweakpane publish no LICENSE file to npm.
  • Extra: type-only packages (@types/*, @webgpu/types, @ffmpeg/types) and packages tree-shaken away (@xmldom/xmldom, gifuct-js, js-binary-schema-parser).

Change

  • scripts/acknowledgements.ts: at generateBundle, the list is the npm packages of every module a chunk rendered (renderedLength > 0), worker builds included (worker.plugins), plus packages on the page that are not modules: tailwindcss, basecoat-css (CSS @import) and @ffmpeg/core (served files). It is written as acknowledgements.json; virtual:acknowledgements now exports a loader, and the Help fetches the list when the tab opens instead of carrying it in the main bundle.
  • licenses/: upstream license texts for the packages that ship none, with a README (EN + JA). @ffmpeg/core's notes that FFmpeg is built with --enable-gpl and its libraries, and points to the corresponding source (ffmpeg.wasm v0.12.10, FFmpeg).
  • The dev server has no bundle, so it walks the runtime dependencies through the workspace packages, skipping type-only ones. It is close, not exact (it cannot see tree-shaking).

Result

A production build lists 21 packages, all with license text. Against the package paths in the build's source maps: nothing bundled is missing, and the only entries not in a source map are the three added on purpose (@ffmpeg/core, basecoat-css, tailwindcss).

Testing

  • Unit: scripts/acknowledgements.test.ts (package of a module, rendered-only counting, override file names, type-only detection, ordering, text clamping, reading a package with its own LICENSE or a stand-in).
  • Built with source maps and compared as above; the dev server's list and the Help tab checked in the browser.
  • pnpm run check (0 errors), app-play unit tests (737) pass.

This touches the Open source intro and help-modal.ts, as does #794; whichever lands second resolves the overlap.

🤖 Generated with Claude Code

The list walked dependencies from two package.json files: it skipped what the workspace packages bring in (Lit, fengari, alien-signals) and the stylesheet's frameworks, and listed type-only and tree-shaken packages. It is now built from the modules each chunk renders, worker builds included, plus the CSS frameworks and the served ffmpeg core, and written as acknowledgements.json, which the Help loads when the Open source tab opens.

Packages that publish no LICENSE file take their upstream text from licenses/; @ffmpeg/core's also says where its GPL source is.
# Conflicts:
#	packages/app-play/src/dom-template.ts
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Exports Benchmark

🟢 2 improvements, no regression · 15 within noise · 850 compared

2fe0747a → b2dd67ba · 3 runs base / 3 runs head · a regression or improvement is a change past ±8% whose runs do not overlap · times are per call (median)

Improvements (2)

API Base Head Change Run spread (base / head)
player-browser.buildAudioBus 2.92 µs 1.81 µs 38.0% faster ±13.8% / ±15.4%
player-browser.createDecideScene 260 µs 237 µs 8.7% faster ±3.5% / ±2.1%
Within noise (15): past the threshold, but the runs overlap
API Base Head Change Run spread (base / head)
player-engine.course.normalizeCourseTrophies 35.6 ns 29.4 ns 17.5% faster ±18.0% / ±22.0%
chart-model.createBeatResolver 11.1 ns 13.4 ns 20.8% slower ±14.0% / ±12.4%
skin-beatoraja.scene.beatorajaKeysongOp 11.6 ns 14.1 ns 20.8% slower ±5.4% / ±15.7%
player-browser.setMasterVolume 409 µs 493 µs 20.5% slower ±8.1% / ±19.4%
player-terminal.beginWin32InputModeOptIn 27.5 ns 24.0 ns 12.8% faster ±31.1% / ±34.7%
player-browser.releaseBeatorajaSceneKitAssets 110 ns 128 ns 16.9% slower ±4.7% / ±8.5%
player-ui.defineBeMusicElements 538 ns 615 ns 14.2% slower ±5.0% / ±6.9%
player-terminal.beginStatefulKeyboardProtocolOptIn 38.6 ns 43.7 ns 13.3% slower ±26.0% / ±36.6%
player-engine.course.resolveNonstopTempo 1.18 µs 1.07 µs 10.0% faster ±9.5% / ±10.9%
player-browser.loadBeatorajaTexturesFromBundle 304 ns 338 ns 11.2% slower ±8.4% / ±12.1%
player-browser.createResultScene 58.7 µs 53.5 µs 8.8% faster ±8.5% / ±13.2%
skin-beatoraja.normalizeBeatorajaFonts 29.6 ns 27.0 ns 8.7% faster ±8.0% / ±14.4%

…and 3 more.

I/O-bound, not judged (19)

These cases touch the filesystem, so their time follows the OS cache and the disk more than the code.

API Base Head Change Run spread (base / head)
chart-audio-renderer.renderChartFile 5.87 ms 6.12 ms 4.2% slower ±1.5% / ±3.9%
chart-audio-renderer.renderJSON 3.90 ms 3.86 ms 0.9% faster ±2.3% / ±0.7%
chart-audio-renderer.renderSingleSample 4.97 µs 5.12 µs 3.0% slower ±0.7% / ±1.7%
chart-audio-renderer.writeAudioFile 195 µs 220 µs 12.5% slower ±25.1% / ±27.5%
chart-editor.exportChart 188 µs 198 µs 5.5% slower ±7.6% / ±5.8%
chart-editor.importChart 136 µs 132 µs 3.5% faster ±11.0% / ±1.4%
chart-editor.loadJSONFile 139 µs 139 µs 0.2% faster ±1.0% / ±0.9%
chart-editor.saveJSONFile 226 µs 202 µs 10.9% faster ±16.6% / ±17.8%
chart-parser.parseChartFile 124 µs 116 µs 6.6% faster ±4.2% / ±8.8%
player-browser.readFilesIntoBytesMap 4.54 µs 4.50 µs 0.9% faster ±1.8% / ±3.0%
player-terminal.createBgaANSIRenderer 2.57 µs 2.60 µs 1.2% slower ±4.3% / ±11.9%
player-terminal.loadStageFileANSIImage 101 ns 100 ns 1.1% faster ±2.1% / ±0.2%
player-terminal.loadStageFileANSILines 170 ns 157 ns 7.7% faster ±2.9% / ±1.8%
player-terminal.loadTerminalANSIImage 1.02 ms 1.04 ms 1.9% slower ±2.2% / ±1.9%
shared-utils.createFileLogger 191 µs 191 µs ±0.0% ±3.2% / ±2.2%
shared-utils.readFilesIntoEntryMap 2.27 µs 1.98 µs 12.8% faster ±0.5% / ±1.9%
shared-utils.resolveFirstExistingPath 86.7 µs 87.6 µs 1.0% slower ±1.8% / ±2.2%
shared-utils.workerize.workerize 10.5 ms 10.3 ms 1.9% faster ±1.7% / ±2.2%
skin-beatoraja.readFilesIntoBytesMap 19.4 µs 19.7 µs 1.3% slower ±2.4% / ±1.8%
Excluded: too fast to time (68)

A timed sample lasted 1 µs or less on at least one side (usually a base commit from before calls were batched), so its time is timer noise and no change is shown.

API Base Head
chart-model.createMeasureBoundariesBeats 72.0 ns 76.0 ns
chart-model.parseBmsARGB 264 ns 264 ns
chart-model.resolveChartMainBPM 101 ns 101 ns
chart-source.parseBmsonSubartist 59.4 ns 61.0 ns
player-browser.applyBeatorajaStretchRect 27.6 ns 27.3 ns
player-browser.checkBrowserCompat 156 ns 156 ns
player-browser.CourseMaker 85.7 ns 104 ns
player-browser.destinationToSpriteProps 85.6 ns 85.6 ns
player-browser.GameplayRecorder 73.6 ns 76.8 ns
player-browser.resolveCourseEntry 70.0 ns 69.8 ns
player-browser.SceneController 248 ns 252 ns
player-browser.setBrowserWorkerCount 38.5 ns 38.0 ns

…and 56 more.

Run details
Measure Value
Median change (all compared cases) +0.11%
Mean change +0.29%
Overall verdict (median vs. threshold) unchanged
Compared / within noise / I/O-bound / unchanged 850 / 15 / 19 / 814
Benchmarked / skipped (head) 918 / 35
Time / warmup per case 50 ms / 25 ms
Node / platform v26.12.1 / linux

@nulltask
nulltask merged commit 1d4167b into devel Oct 26, 2026
9 checks passed
@nulltask
nulltask deleted the fix/open-source-acknowledgements branch October 27, 2026 09:29
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