Skip to content

Fix JavaScript build artifacts - #170

Merged
timkpaine merged 1 commit into
mainfrom
agent/fix-js-build-artifacts
Aug 16, 2026
Merged

Fix JavaScript build artifacts#170
timkpaine merged 1 commit into
mainfrom
agent/fix-js-build-artifacts

Conversation

@timkpaine

Copy link
Copy Markdown
Member

Corrects JavaScript artifact generation in the JS, Rust/JS/WASM, and C++/JS/WASM templates.

  • Runs TypeScript declaration emission after bundling and aligns rootDir so the exported dist/esm/index.d.ts is actually generated and packed.
  • Clears stale distribution and Python-extension assets before rebuilding, while preserving freshly generated WASM dist/pkg during esbuild passes.
  • Fixes ESM filtering so ESM-only output is not copied into Python extension assets.
  • Awaits all cpy operations and the top-level build promise so copy failures and completion are deterministic.

Verified in freshly generated projects for all three variants. Plain JS passed full build, pack, stale-sentinel, and Oxlint/Oxfmt checks. Rust/JS/WASM passed a full native Cargo + wasm-bindgen build and pack check. C++/JS/WASM passed cleanup, esbuild, TypeScript, pack, and lint checks with a generated-module fixture because Emscripten is not installed locally.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@timkpaine
timkpaine marked this pull request as ready for review August 16, 2026 19:05
@timkpaine
timkpaine merged commit 6de693b into main Aug 16, 2026
18 checks passed
@timkpaine
timkpaine deleted the agent/fix-js-build-artifacts branch August 16, 2026 19:06
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