Skip to content

refactor: extract shared ADO logging helper for latestVersions commands#27034

Draft
tylerbutler wants to merge 1 commit intomicrosoft:mainfrom
tylerbutler:refactor/extract-latestVersions-ado-helper
Draft

refactor: extract shared ADO logging helper for latestVersions commands#27034
tylerbutler wants to merge 1 commit intomicrosoft:mainfrom
tylerbutler:refactor/extract-latestVersions-ado-helper

Conversation

@tylerbutler
Copy link
Copy Markdown
Member

Summary

  • Extracts the duplicated ADO variable-setting and logging block from check:latestVersions and vnext:check:latestVersions into a shared logLatestVersionResult helper in src/library/latestVersions.ts
  • Both commands now call the helper instead of inlining the same ~30 lines of ##vso[task.setvariable ...] output logic
  • Adds unit tests for the new helper covering all three branches (latest, not latest, no matching major)
  • The deprecated check:latestVersions command remains deprecated and unchanged in behavior

Fixes #26560
Fixes #26943

Test plan

  • Unit tests for logLatestVersionResult added and passing (3 new tests)
  • Existing isLatestInMajor unit tests still pass (7 tests)
  • Integration tests for vnext:check:latestVersions still pass (3 tests)
  • Full test suite passes (488 passing)
  • Biome formatting check passes
  • TypeScript compilation succeeds with no new errors

🤖 Generated with [Nori](https://noriagentic.com)

Co-Authored-By: Nori <contact@tilework.tech>
@tylerbutler tylerbutler self-assigned this Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant