refactor(scripts): use the canonical latestStableOrbTag in check-orb-stable-release-due - #8419
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…stable-release-due (JSONbored#8394)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8419 +/- ##
=======================================
Coverage 92.42% 92.42%
=======================================
Files 791 791
Lines 79265 79265
Branches 23948 23947 -1
=======================================
Hits 73258 73258
Misses 4868 4868
Partials 1139 1139
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-24 12:59:56 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
scripts/check-orb-stable-release-due.tshand-rolledlatestStableTagName/compareTagsDescto answer the same "find the latest stableorb-vtag" question thatscripts/orb-release-core.tsalready answers canonically — and the comment excusing the duplication was stale:check-orb-release-due.tsno longer has a locallatestStableTagName, it importslatestStableOrbTagfrom the core module.latestStableOrbTagfrom./orb-release-core.js(the same import the sibling script already uses) and call it exactly as the sibling does:latestStableOrbTag(tags)?.tag ?? null.compareTagsDeschad no other caller) and the inaccurate cross-reference comment.orb-release-core.ts,check-orb-release-due.ts, and this script's behaviour are untouched.This also removes a real latent divergence, not just duplication: the deleted local version filtered by regex and sorted with
String.localeCompare(..., { numeric: true }), whereaslatestStableOrbTagparses throughparseSemverand sorts withcompareSemveron the numeric tuple, filteringprerelease === null. The two agree on every tag currently in this repo, so this is a pure consolidation — but only the canonical one picks up future semver-handling changes.Closes #8394
Test plan
npm run typecheckclean (confirms the two deleted functions had no remaining references)test/unit/orb-release.test.tsgreen (40/40) — the suite coveringorb-release-core.ts'slatestStableOrbTag/compareSemver, i.e. the implementation this now routes throughnpx tsx scripts/check-orb-stable-release-due.ts --json): resolvesstableVersion: 3.3.0→nextVersion: 3.4.0, identical to the pre-change behaviourscripts/**is excluded from Codecov'scoverage.includepercodecov.yml, and this adds no logic — it deletes a duplicate and calls an already-tested helper