feat(types)!: remove deprecated JsonValue and JsonObject aliases - #6
Merged
Merged
Conversation
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.
Removes the two
@deprecatedtype aliases that 0.3.1 pre-announced for removal in the next minor.What was removed
Both lived in
src/types.tsand reached the public entrypoint throughexport type * from "./types"insrc/index.ts:JsonValue—string | 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()'sdata,workflows.startExecution()'scontext) take arbitrary JSON straight from the generated schema.Pre-announcement
The 0.3.1 CHANGELOG shipped this under
### Deprecated: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.1→0.4.0.Version bump
Two notes for the reviewer, both deviations worth a conscious call:
.changeset/, no@changesets/cli). It publishes from.github/workflows/release.ymlon av*tag push, gated on the tag matching bothpackage.jsonversion andSDK_VERSIONinsrc/client.ts. So the minor bump is recorded the repo's own way:package.json+SDK_VERSION+ a CHANGELOG0.4.0section. Merging does not publish — publishing still needs a deliberatev0.4.0tag push.b7c6e06set the precedent that version bumps land in a separatechore(release):commit. I folded the bump in here somainnever sits in a state where the CHANGELOG announces 0.4.0 whilepackage.jsonsays 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:
pnpm format:checkpnpm lintpnpm check-typespnpm testpnpm test:contractpnpm buildRemoval verified in the published artifact:
grep -c "JsonValue\|JsonObject" dist/index.d.tsreturns0.