Skip to content

Always rebuild WASM before build and test#38

Open
pelle wants to merge 1 commit intomainfrom
feat/always-rebuild-wasm
Open

Always rebuild WASM before build and test#38
pelle wants to merge 1 commit intomainfrom
feat/always-rebuild-wasm

Conversation

@pelle
Copy link
Copy Markdown
Contributor

@pelle pelle commented Feb 23, 2026

Summary

  • Add build:wasm script that always rebuilds WASM via wasm-pack and copies output to tap-ts/wasm/
  • Add pretest hook so npm test always gets fresh WASM binaries
  • Chain build:wasm into npm run build so builds always use current Rust code
  • Simplify prepare-publish.sh to delegate WASM building to the new script

Fixes 27 test failures caused by stale WASM binaries after the Flattened JWS serialization change (a3d9306).

Test plan

  • npm run build rebuilds WASM and compiles TypeScript
  • npm test passes all 134 tests (pretest rebuilds WASM)
  • cargo fmt --all --check passes
  • RUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets --release passes
  • RUSTFLAGS="-D warnings" cargo test --workspace --all-targets --release passes

🤖 Generated with Claude Code

The tap-wasm/pkg/ directory is gitignored, so WASM binaries could become
stale after Rust changes (e.g., Flattened JWS serialization). This adds
a build:wasm script and pretest hook to ensure fresh WASM on every build
and test run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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