Repository navigation
build(types): add index.d.v5.ts snapshot and v5-release swap script - #8333
Merged
Merged
Conversation
Master's `index.d.ts` is the v6 type surface from this PR forward; the new `index.d.v5.ts` is a frozen byte-copy of the current (v5) surface that the v5 release line publishes via `scripts/release/swap-v5-types.js`. The swap runs from `scripts/release/proposal.js` only when `releaseLine === '5'` and lands as a separate commit so the version-bump commit stays single-purpose. Public TypeScript declarations now go in both files unless the API is v6-only -- captured in AGENTS.md alongside the existing version-check guidance.
Contributor
Overall package sizeSelf size: 5.78 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: d4af9f5 | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-05-07 21:10:09 Comparing candidate commit d4af9f5 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 1755 metrics, 89 unstable metrics. |
uurien
reviewed
May 7, 2026
BridgeAR
commented
May 7, 2026
BridgeAR
commented
May 7, 2026
BridgeAR
commented
May 7, 2026
The swap should affect the published v5 tarball and nothing else: not the git history of v5.x, not the proposal PR, not master CI. Wiring it through scripts/release/proposal.js made it a committed change on the proposal branch, which would conflict on the next cherry-pick. prepack runs the swap at npm pack / npm publish time only, on a working tree that gets discarded after publish. The standalone test and its dedicated CI workflow are gone -- the only observable contract is "did npm publish ship the v5 typings", which the published tarball already verifies.
dd-octo-sts Bot
pushed a commit
that referenced
this pull request
May 8, 2026
…8333) * build(types): add index.d.v5.ts snapshot and v5-release swap script Master's `index.d.ts` is the v6 type surface from this PR forward; the new `index.d.v5.ts` is a frozen byte-copy of the current (v5) surface that the v5 release line publishes via `scripts/release/swap-v5-types.js`. The swap runs from `scripts/release/proposal.js` only when `releaseLine === '5'` and lands as a separate commit so the version-bump commit stays single-purpose. Public TypeScript declarations now go in both files unless the API is v6-only -- captured in AGENTS.md alongside the existing version-check guidance. * build(types): move v5 swap to prepack and drop test/workflow scaffolding The swap should affect the published v5 tarball and nothing else: not the git history of v5.x, not the proposal PR, not master CI. Wiring it through scripts/release/proposal.js made it a committed change on the proposal branch, which would conflict on the next cherry-pick. prepack runs the swap at npm pack / npm publish time only, on a working tree that gets discarded after publish. The standalone test and its dedicated CI workflow are gone -- the only observable contract is "did npm publish ship the v5 typings", which the published tarball already verifies.
Merged
BridgeAR
added a commit
that referenced
this pull request
May 8, 2026
…8333) * build(types): add index.d.v5.ts snapshot and v5-release swap script Master's `index.d.ts` is the v6 type surface from this PR forward; the new `index.d.v5.ts` is a frozen byte-copy of the current (v5) surface that the v5 release line publishes via `scripts/release/swap-v5-types.js`. The swap runs from `scripts/release/proposal.js` only when `releaseLine === '5'` and lands as a separate commit so the version-bump commit stays single-purpose. Public TypeScript declarations now go in both files unless the API is v6-only -- captured in AGENTS.md alongside the existing version-check guidance. * build(types): move v5 swap to prepack and drop test/workflow scaffolding The swap should affect the published v5 tarball and nothing else: not the git history of v5.x, not the proposal PR, not master CI. Wiring it through scripts/release/proposal.js made it a committed change on the proposal branch, which would conflict on the next cherry-pick. prepack runs the swap at npm pack / npm publish time only, on a working tree that gets discarded after publish. The standalone test and its dedicated CI workflow are gone -- the only observable contract is "did npm publish ship the v5 typings", which the published tarball already verifies.
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.
Summary
index.d.tsremovals are breaking changes for v5 users; this PR sets up theinfrastructure that lets master evolve the v6 type surface freely while the
v5 release line keeps publishing the v5 surface unchanged.
The v5 typings live in a frozen
index.d.v5.ts(byte-copy of the currentindex.d.ts).scripts/release/swap-v5-types.jscopies it overindex.d.ts,and
scripts/release/proposal.jsinvokes the swap as a dedicated commit onlywhen
releaseLine === '5'so the version-bump commit stays single-purpose.Why
Lands first so the v6 type-cleanup PRs (#8319 #8320 #8321 #8322 #8323) and
the next batch can drop deprecated declarations from
index.d.tswithoutbreaking v5 type consumers. After this PR is cherry-picked to
v5.x, thenext v5 patch release picks up the swap automatically.
Drift policy
AGENTS.mdnow records the dual-file rule: new public TypeScriptdeclarations go in both
index.d.tsandindex.d.v5.tsunless the API isv6-only.
Test plan
npm run test:scriptsexercisesswap-v5-types.js(idempotency,byte-equality, missing-source error) via Node's built-in test runner.
.github/workflows/scripts-tests.ymlruns that script on anyscripts/**change.