Skip to content

Playground e2e harness + SCALE codec additions#238

Merged
pgherveou merged 6 commits into
mainfrom
slim/js-playground-extract
Jun 26, 2026
Merged

Playground e2e harness + SCALE codec additions#238
pgherveou merged 6 commits into
mainfrom
slim/js-playground-extract

Conversation

@pgherveou

@pgherveou pgherveou commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Extracts the playground and @parity/truapi client changes from the Rust-core
port PR (#104)

Migrate the JS package tests from the bespoke Bun runner to Vitest, matching
the product-sdk testing style: colocated src/**/*.test.ts files, describe/it
blocks, and expect() assertions.

- Add vitest devDep + vitest.config.ts; test script runs `vitest run`.
- Move the five test/*.test.mjs suites next to the code they cover and rewrite
  them with describe/it + expect. The wire-table loop becomes an it.each over
  every generated frame id.
- The explorer registry test imports the source module so it runs without a
  prior build.
- Exclude src/**/*.test.ts from the build tsconfig so tests never land in dist.
- Scope a Prettier override (4-space, 100 width) to the test files.
- Drop the unused setup-bun step from the ts-client CI job and refresh the docs
  and ts-client-checks skill.
Use Bun's built-in test runner: the repo already depends on bun, so this
drops the Vitest devDependency (and its config) while keeping the same
product-sdk-style describe/it/expect tests.

- Imports come from "bun:test"; add @types/bun for editor support.
- test script runs `bun test` (auto-discovers src/**/*.test.ts, no config).
- Restore the setup-bun step on the ts-client CI job.
- Refresh docs and the ts-client-checks skill.
Switch the in-iframe client to the host-transferred MessagePort handshake
(truapi-ready / truapi-init) used by the WASM host runtime, and extend the
SCALE primitives (Struct, _void, str, hex helpers) consumed by the generated
codecs. Pulls @noble/hashes in as a hex-codec dependency.
@socket-security

socket-security Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​parity/​truapi@​0.3.100000
Addednpm/​@​noble/​hashes@​2.2.010010010084100

View full report

Base automatically changed from js-vitest-testing-style to main June 26, 2026 09:52
@pgherveou pgherveou requested a review from a team June 26, 2026 09:52
The truapi-ready/truapi-init handshake pairs with the WASM host's
createIframeHost (#104). Keep sandbox.ts at base so merging to main does not
break the deployed playground against the current host.
@pgherveou pgherveou changed the title Playground e2e harness + iframe MessagePort client handshake Playground e2e harness + SCALE codec additions Jun 26, 2026
pgherveou and others added 2 commits June 26, 2026 12:12
Replace the hand-rolled byte concatenation with the concatBytes helper now
that @noble/hashes is a dependency.
@pgherveou pgherveou enabled auto-merge June 26, 2026 10:18
@pgherveou pgherveou disabled auto-merge June 26, 2026 10:20
@pgherveou pgherveou enabled auto-merge June 26, 2026 10:24
@pgherveou pgherveou added this pull request to the merge queue Jun 26, 2026
Merged via the queue into main with commit b787ba7 Jun 26, 2026
13 checks passed
@pgherveou pgherveou deleted the slim/js-playground-extract branch June 26, 2026 10:48
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.

3 participants