Repository navigation
fix(npm): normalize JSDoc comments at the package boundary - #107
Merged
byteland-app merged 4 commits intoNov 26, 2026
Conversation
- Explain drain completion and mono downmix directly in src/wasm.rs - State that defaultConfig throws a JavaScript Error on failure - Convert Rustdoc # Errors lines to JSDoc @throws tags in pkg/ - Translate Rust paths, None values and ..= ranges for TypeScript - Check normalized JSDoc comments in scripts/verify-pack.mjs
Contributor
|
Review: High-value JSDoc normalization that fixes raw rustdoc leakage in IDEs and downstream Twoslash docs. Please make two small adjustments:
|
- Update drainMono docs for mono peak measurements after downmix - Translate gain_db and ceiling_db in scripts/normalize-jsdoc.mjs - Export normalizeJsDoc in scripts/normalize-jsdoc.mjs - Check JSDoc comments for both archives in scripts/verify-pack.mjs - Allow 13 or more @throws tags in scripts/verify-pack.mjs
- Map the f32 intra-doc links in scripts/normalize-jsdoc.mjs - Convert backticked and named ..= ranges in scripts/normalize-jsdoc.mjs - Check @throws tags on each fallible signature in verify-pack.mjs - Check normalizeJsDoc idempotence with the esnext.disposable header - Move the JSDoc checks after verifyPackedArchive in verify-pack.mjs
Contributor
Author
|
Addressed both adjustments in
|
Contributor
|
Round 2 review: Approved — relaxed throwsCount check and esnext.disposable idempotency look great. Please rebase onto updated main after #105, #123, and #135:
|
Contributor
Author
|
Addressed both items on updated
|
byteland-app
deleted the
stitch/transform-package-jsdoc-comments-jm0-a8ce0928-7302-4de8-a8e8-890d10e61d1b
branch
November 26, 2026 03:20
This was referenced Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request normalizes JSDoc comments in the generated WebAssembly package (
pkg/tunelet.d.tsandpkg/tunelet.js) while keeping native Rust documentation and crate lints unchanged.begin_drainanddrain_monoinsrc/wasm.rsto state drain completion and mono downmix rules directly without self-references (with mono peak feedback and telemetry measured after the downmix), and state thatdefaultConfigthrows a JavaScriptErroron failure.node scripts/postbuild-wasm.mjs && node scripts/normalize-jsdoc.mjsinnpm run build:wasm(and export idempotentnormalizeJsDocwith line-ending and/// <reference lib="esnext.disposable" />preservation so both post-build scripts commute cleanly) to convert# Errorsheadings into@throwsJSDoc tags and translate Rust intra-doc links (including allControlActivitylinks from#135andf32Processorlinks for#117),::symbol paths,Noneoptional absence descriptions,Default/u8/Self::validateremarks, snake_case field names (max_frequency_hz,min_frequency_hz,stereo_output,retune_ms,attack_ms,gain_db,ceiling_db), and backticked or unbackticked..=inclusive ranges (including spaced fractional bounds and0..=maxBlockFramesfor#84/#117) into idiomatic TypeScript documentation.scripts/verify-pack.mjsacross both thetuneletand@bytelandtechnology/tuneletarchives (alongside HTTP Wasm loader checks from#105and strict TypeScript consumer profiles from#123) to check all packed JSDoc blocks indist/andpkg/for clean TypeScript documentation,throwsCount >= 14plus signature-based@throwschecks on each core fallible entry point (includingcontrolActivity), normalizedControlActivityinterface and field JSDoc,normalizeJsDocidempotence andesnext.disposableheader preservation, and completelatencyFrames,beginDrain, anddrainMonodescriptions.Accessibility and Documentation Verification
cargo fmt --check,cargo clippy --locked --lib -- -D warnings,cargo build --locked --release,RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps, andcargo package --lockedpass with zero warnings.RUSTDOCFLAGS="-D warnings" npm run check:wasmandnpm run verify:packpass across both unscoped and scoped0.3.4archives with zero warnings..twoslash-popup-docshover popups) and the TypeScript API reference view confirm one page<h1>, zero popup<h1>elements (WCAG 2.2 SC 1.3.1, SC 2.4.6), zero plain<p>Errors</p>labels, and zero leaked::,..=, orNonetokens.Automated PR initiated by user @byteland-app via Stitch Loop.