MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / findClientPinMismatch

Function findClientPinMismatch

scripts/check-sdk-version-sync.mjs:192–204  ·  view source on GitHub ↗

* Compare the local typescript-client pin against the expected SDK version. * Returns a mismatch descriptor, or null when they agree.

(pinnedVersion, expectedVersion)

Source from the content-addressed store, hash-verified

190 * Returns a mismatch descriptor, or null when they agree.
191 */
192function findClientPinMismatch(pinnedVersion, expectedVersion) {
193 if (!pinnedVersion) {
194 return { package: CLIENT_PACKAGE_NAME, expected: expectedVersion, actual: null };
195 }
196 // A range would reintroduce the skew this check exists to catch.
197 if (!/^[0-9]/.test(pinnedVersion)) {
198 return { package: CLIENT_PACKAGE_NAME, expected: expectedVersion, actual: pinnedVersion };
199 }
200 if (versionsEqual(pinnedVersion, expectedVersion)) {
201 return null;
202 }
203 return { package: CLIENT_PACKAGE_NAME, expected: expectedVersion, actual: pinnedVersion };
204}
205
206/**
207 * Read the typescript-client pin from package.json.

Callers 2

mainFunction · 0.85

Calls 1

versionsEqualFunction · 0.85

Tested by

no test coverage detected