feat: add prepare()/execute() as canonical names, deprecate precompile()/run() - #45
Merged
Conversation
…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.
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.
What
Adds
sandbox.prepare()andprefix.execute()as the canonical names, keepingsandbox.precompile()andprefix.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-isolatespackages, where the equivalent verbs are being unified (hydrate→prepare,executeretained).Changes
types.ts):Sandbox.prepareandPrefix.executeadded as first-class members;precompile/runnow carry@deprecatedJSDoc pointing at the new names.index.ts):SandboxImpl.prepareholds the implementation andprecompiledelegates to it;PrefixImpl.executedelegates torun. No behavioral divergence — one code path each.prepare()/execute(), with a note that the old names are deprecated aliases.prepare()→execute()works and that the deprecatedrun()still works on a prefix produced byprepare().Validation
pnpm typecheckpnpm test:run— 466 passed, 1 skipped (7 files)pnpm buildRelease
Minor bump for
@iso4/sandbox(changeset included).