This repository was archived by the owner on Nov 16, 2026. It is now read-only.
Repository navigation
fix(build): Keep bounded int64 integers as numbers - #123
Merged
Merged
Conversation
The spec now types the profiling flamegraph `fingerprint` query param as int64 with UInt32 bounds. Hey API turns bounded int64 fields into `BigInt(...)` calls in the Valibot and Zod schemas, which make-tree-shakeable rejects, and coerces them to bigint while the SDK types them as number. Drop int64 when both bounds are safe integers. Also let Hey API infer Zod 3 output from the peer range instead of pinning compatibilityVersion, which warned because it expects zod >=3.25. Co-Authored-By: BYK <[email protected]>
sentry-junior
Bot
requested review from
BYK,
MathurAditya724 and
betegon
as code owners
November 3, 2026 22:13
BYK
approved these changes
Nov 3, 2026
2 tasks done
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes the
Buildfailure onmain(df30eaf, 2cf7aec) and onrelease/0.445.0(run):Cause
df30eaf brought in the
fingerprintquery param on the profiling flamegraph endpoint. It is typedinteger/format: int64with bounds0..4294967295; a UInt32 needs int64 in OpenAPI. For a bounded int64 field, Hey API generatesv.minValue(BigInt(0))/z.coerce.bigint().gte(BigInt(0)), andmake-tree-shakeable.mjsfails closed on the top-levelBigInt(...)call. The types also disagree:types.gen.tsdeclaresfingerprint?: number, but both validators coerce tobigint.Fix
normalizeSpecnow removesformat: int64from integer schemas when bothminimumandmaximumare safe integers. Unbounded int64 fields and fields with larger bounds don't change. The field now generates asv.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(4294967295))/z.number().int().gte(0).lte(4294967295), which matches the TS type.Zod warning
Hey API takes the zod version from the minimum of the declared range. The
^3.24.0peer range wins over the devDependency, and an explicitcompatibilityVersionrequires>=3.25.0. This PR removes the explicitcompatibilityVersion: 3, so Hey API infers major 3 from the peer range. The generatedzod.gen.tsis byte-identical and still imports from'zod'. I left the peer range alone becausetest/package.test.tspins it as a consumer contract. Bumping it to^3.25.0is the alternative if we'd rather keep the explicit setting.Verification
Ran locally:
bun run build(no zod warning),bun run typecheck,bun run test:node,npm pack.bun test: everything passed exceptpacks isolated runtime entries…, which hit bun's 5s default timeout in my sandbox (about 5.1–5.7s). It passes with--timeout 30000and passed once at 4.66s, so I think the sandbox is just slow and this change isn't the cause.via @BYK.
--
View Session in Sentry