Skip to content

bump client versions and fix update-config-versions.js sorting#454

Merged
g-despot merged 1 commit into
mainfrom
bump-client-versions-and-fix-sorting
Jun 18, 2026
Merged

bump client versions and fix update-config-versions.js sorting#454
g-despot merged 1 commit into
mainfrom
bump-client-versions-and-fix-sorting

Conversation

@dudanogueira

Copy link
Copy Markdown
Contributor

What's being changed:

Bug: The version-fetching script (_build_scripts/update-config-versions.js) sorted release tags with JavaScript's default lexicographic .sort(), so v3.9.0 ranked above v3.13.1 ('9' > '1' character-wise). It picked the wrong "latest," which is why the TypeScript client-libraries page showed an outdated version. The automation was running fine — it was just choosing wrong.

Fix:

  • update-config-versions.js — replaced lexicographic sort with a numeric-aware comparison (localeCompare(..., { numeric: true })). Verified end-to-end: now resolves typescript-client → 3.13.1 (was 3.9.0).
  • versions-config.json — bumped the local-dev fallback versions to current latest: typescript 3.13.0→3.13.1, python 4.21.0→4.21.3, helm 17.8.0→17.8.1, cli 3.2.2→3.4.1, agents-python 1.5.0→1.6.0, agents-ts 1.4.1→1.5.0, csharp 1.0.0→1.1.1.

Tested: Ran the script live (exit 0, all clients resolved correctly).

Status: Both changes staged on branch bump-client-versions-and-fix-sorting, not committed.

Note: Affects all clients, not just TS — any client crossing into double-digit minor/patch would've hit the same bug.

Type of change:

  • Documentation content updates (non-breaking change to fix/update documentation )
  • Bug fix (non-breaking change to fixes an issue with the site)
  • Feature or enhancements (non-breaking change to add functionality)

How has this been tested?

Yes, locally and with claude ;)

  • Local build - the site works as expected when running yarn start

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Not ready to approve

The updated tag-stripping logic uses replace('v',''), which does not reliably remove only a leading v prefix and can corrupt non-standard tag names.

Pull request overview

Updates the docs site’s dynamic client-version configuration so automated builds select the true latest GitHub release versions (especially once minor/patch versions reach double digits), and refreshes the local fallback versions used for local builds.

Changes:

  • Fixes _build_scripts/update-config-versions.js to use numeric-aware sorting when selecting the highest release tag.
  • Bumps several fallback client/tool versions in versions-config.json (TypeScript, Python, Helm, CLI, Agents SDKs, C#).
File summaries
File Description
versions-config.json Updates local fallback version pins for multiple clients/tools.
_build_scripts/update-config-versions.js Adjusts release tag processing/sorting to avoid lexicographic “latest” selection errors.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

.replace('v', '') // remove the v from the name "v1.26.1" => "1.26.1"
.filter(item => !item.prerelease) // remove pre-release items
.filter(item => !item.draft) // remove draft releases
.map(item => item.tag_name.replace('v', '')) // strip the v: "v1.26.1" => "1.26.1"
Comment on lines +45 to +46
.sort((a, b) => // semver-aware sort – ascending
a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' }))
@g-despot g-despot merged commit 535eed5 into main Jun 18, 2026
14 checks passed
@g-despot g-despot deleted the bump-client-versions-and-fix-sorting branch June 18, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants