MCPcopy Create free account
hub / github.com/TanStack/cli / isVersionRangeOutdated

Function isVersionRangeOutdated

scripts/check-outdated-packages.js:104–117  ·  view source on GitHub ↗

* Check if a version range satisfies the latest version

(versionRange, latestVersion)

Source from the content-addressed store, hash-verified

102 * Check if a version range satisfies the latest version
103 */
104function isVersionRangeOutdated(versionRange, latestVersion) {
105 try {
106 // Clean the version range (remove any npm-specific prefixes)
107 const cleanRange = versionRange.replace(/^npm:/, '').split('@').pop()
108
109 // Check if the range satisfies the latest version
110 return !semver.satisfies(latestVersion, cleanRange)
111 } catch (error) {
112 console.warn(
113 `${colors.yellow}Warning: Could not parse version range "${versionRange}": ${error.message}${colors.reset}`,
114 )
115 return false
116 }
117}
118
119/**
120 * Update package.json file with new versions

Callers 1

checkPackageJsonFunction · 0.85

Calls 2

warnMethod · 0.80
replaceMethod · 0.65

Tested by

no test coverage detected