Skip to content

feat(types)!: remove deprecated JsonValue and JsonObject aliases - #6

Merged
BSalaeddin merged 1 commit into
mainfrom
chore/drop-deprecated-json-aliases
Aug 20, 2026
Merged

BSalaeddin merged 1 commit into
mainfrom
chore/drop-deprecated-json-aliases

Conversation

@BSalaeddin

Copy link
Copy Markdown
Contributor

Removes the two @deprecated type aliases that 0.3.1 pre-announced for removal in the next minor.

What was removed

Both lived in src/types.ts and reached the public entrypoint through export type * from "./types" in src/index.ts:

  • JsonValuestring | number | boolean | null | JsonValue[] | { [key: string]: JsonValue }
  • JsonObject{ [key: string]: JsonValue }

No internal usages needed migrating: they were already leaf types. They existed only as a workaround for generated types being stricter than the API, and that was fixed at the spec level in 0.3.1 — after which nothing in the package referenced them. The fields that used to need them (events.record()'s data, workflows.startExecution()'s context) take arbitrary JSON straight from the generated schema.

Pre-announcement

The 0.3.1 CHANGELOG shipped this under ### Deprecated:

JsonValue and JsonObject are no longer referenced anywhere in the package (the workaround they existed for is fixed at the spec level) and will be removed in the next minor.

The JSDoc on both aliases carried the same notice. Removing an exported type is breaking, which on 0.x means a minor — hence 0.3.10.4.0.

Version bump

Two notes for the reviewer, both deviations worth a conscious call:

  1. This repo does not use Changesets (no .changeset/, no @changesets/cli). It publishes from .github/workflows/release.yml on a v* tag push, gated on the tag matching both package.json version and SDK_VERSION in src/client.ts. So the minor bump is recorded the repo's own way: package.json + SDK_VERSION + a CHANGELOG 0.4.0 section. Merging does not publish — publishing still needs a deliberate v0.4.0 tag push.
  2. b7c6e06 set the precedent that version bumps land in a separate chore(release): commit. I folded the bump in here so main never sits in a state where the CHANGELOG announces 0.4.0 while package.json says 0.3.1. Happy to split it out if you'd rather keep the release commit distinct.

dist/ is rebuilt and committed, matching the convention that every functional commit here updates it.

Gate evidence

All run locally on this branch against the repo's own scripts:

Gate Command Result
Format pnpm format:check All matched files use Prettier code style
Lint pnpm lint No issues found
Typecheck pnpm check-types clean
Unit tests pnpm test 18 files, 140 passed
Contract tests pnpm test:contract 1 file, 9 passed
Build pnpm build ESM + CJS + DTS success

Removal verified in the published artifact: grep -c "JsonValue\|JsonObject" dist/index.d.ts returns 0.

@BSalaeddin
BSalaeddin merged commit 347cf5d into main Aug 20, 2026
1 check passed
@BSalaeddin
BSalaeddin deleted the chore/drop-deprecated-json-aliases branch August 20, 2026 15:09
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