Skip to content

feat: add prepare()/execute() as canonical names, deprecate precompile()/run() - #45

Merged
schplitt merged 2 commits into
mainfrom
feat/prepare-execute-aliases
Jul 31, 2026
Merged

feat: add prepare()/execute() as canonical names, deprecate precompile()/run()#45
schplitt merged 2 commits into
mainfrom
feat/prepare-execute-aliases

Conversation

@schplitt

Copy link
Copy Markdown
Owner

What

Adds sandbox.prepare() and prefix.execute() as the canonical names, keeping sandbox.precompile() and prefix.run() as deprecated aliases (identical behavior, they delegate to the same implementation). Additive and non-breaking — existing code keeps working.

This unblocks vocabulary alignment in the downstream durable-workflows / durable-isolates packages, where the equivalent verbs are being unified (hydrateprepare, execute retained).

Changes

  • Type surface (types.ts): Sandbox.prepare and Prefix.execute added as first-class members; precompile/run now carry @deprecated JSDoc pointing at the new names.
  • Impl (index.ts): SandboxImpl.prepare holds the implementation and precompile delegates to it; PrefixImpl.execute delegates to run. No behavioral divergence — one code path each.
  • No wire/Rust change — pure client-surface addition.
  • README leads with prepare()/execute(), with a note that the old names are deprecated aliases.
  • Test: new e2e case asserts prepare()execute() works and that the deprecated run() still works on a prefix produced by prepare().

Validation

  • pnpm typecheck
  • pnpm test:run — 466 passed, 1 skipped (7 files)
  • pnpm build

Release

Minor bump for @iso4/sandbox (changeset included).

schplitt added 2 commits July 31, 2026 18:48
…e()/run()

`sandbox.prepare()` and `prefix.execute()` are now the canonical API; the
former `sandbox.precompile()` and `prefix.run()` remain as deprecated aliases
that delegate to the same implementation (identical behavior, no wire/Rust
change). Type surface gains `Sandbox.prepare` and `Prefix.execute`; the old
members carry @deprecated JSDoc. README leads with the new names; e2e test
covers prepare()->execute() plus the deprecated run() alias. Minor bump.
@schplitt
schplitt merged commit b51d9cd into main Jul 31, 2026
1 check passed
@schplitt
schplitt deleted the feat/prepare-execute-aliases branch July 31, 2026 16:52
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