ci(release): fix branch-diff Infinity crash on scientific notation SHAs#9101
Conversation
Abbreviated SHAs from `branch-diff --format=sha` that match JavaScript's float syntax (e.g. `980e663509` = 980 × 10^663509) get coerced to `Infinity` by minimist, causing `git merge-base v5.x Infinity` to fail. Fix by expanding `upperBoundSha` to its full 40-char form via `git rev-parse` before passing it as a positional argument to branch-diff. A full SHA almost certainly contains a hex letter (a-f) past position 10, breaking minimist's float-detection regex. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Overall package sizeSelf size: 6.37 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.2.0 | 104.26 kB | 843.44 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
|
BenchmarksBenchmark execution time: 2026-06-26 21:08:16 Comparing candidate commit 12aef3c in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2256 metrics, 30 unstable metrics.
|
…As (#9101) Co-authored-by: Claude Sonnet 4.6 <[email protected]>
…As (#9101) Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Summary
branch-diff --format=shareturns abbreviated SHAs (e.g.980e663509) that can match JavaScript's scientific notation float syntaxbranch-diffusesminimistto parse CLI args, which auto-coerces such positional arguments to numbers —980e663509becomesInfinitygit merge-base v5.x Infinityto fail with exit code 128upperBoundShato its full 40-char SHA viagit rev-parsebefore passing it as a positional argument back tobranch-diff; a full SHA almost always contains a hex letter (a-f) past position 10, breaking minimist's float regexTriggered by the release proposal CI run: https://github.com/DataDog/dd-trace-js/actions/runs/28264161038/job/83746751389
Test plan
🤖 Generated with Claude Code