Skip to content

A TypeScript runtime, written to the contract - #4

Merged
JoshuaWink merged 2 commits into
betafrom
typescript-runtime
Oct 10, 2026
Merged

JoshuaWink merged 2 commits into
betafrom
typescript-runtime

Conversation

@JoshuaWink

Copy link
Copy Markdown
Member

What is added

  • packages/codeupipe-ts: the eight primitives in TypeScript, with no dependencies.
  • The conformance target typescript:run. The same 27 cases and the same judge as the Python targets.
  • A pricing example with one class in each file, and a CI job.
  • A bundle test: the example gives the same result plain, minified, and minified with class names kept. A minifier changes labels unless the build keeps class names.

Design

  • One run, which returns a Promise. A step can be sync or async.
  • The names are the names of the contract in camelCase. Absent is null.
  • A function is refused as a step, because each JavaScript function has a call method.
  • Each run writes to its own State.

Also changed

conformance/run.py: a target that is named and cannot run is now a failure.

This pull request is part of a stack. Merge the stack in order, with a merge commit: step-labels, typescript-runtime, typescript-lint, typescript-compile, python-compile-rename, version-2-beta. Each one shows only its own change.

🤖 Generated with Claude Code

JoshuaWink and others added 2 commits October 10, 2026 09:04
packages/codeupipe-ts has the eight primitives in TypeScript, with no
dependencies. The 27 conformance cases judge it as the target
typescript:run, with the same judge as the Python targets.

- One run, which returns a Promise. A step can be sync or async.
- Names are the names of the contract in camelCase. Absent is null.
- A step is reported by its label, the name of its class. A function is
  refused as a step, because every JavaScript function has a call method.
- Each run writes to its own State.
- No export command and no linter in this package.

conformance/run.py runs the TypeScript target when the machine has Node
22.18 or later, which runs the .ts runner as it is. A target that is
named and cannot run is now a failure. CI has a job for the package:
type check, tests, build, example and conformance.

The contract has a "Runtimes" section with the differences between the
two runtimes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A test makes a browser bundle of the example with esbuild and runs it:
plain, minified, and minified with class names kept. The result is the
same in all three. The labels change only in the minified bundle that
does not keep names, as the README says.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JoshuaWink
JoshuaWink changed the base branch from step-labels to beta October 10, 2026 21:19
@JoshuaWink
JoshuaWink merged commit ed606f0 into beta Oct 10, 2026
9 of 10 checks passed
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