knip: YOLO pass, all the unused exports enabled, YAGNI for the rest (#5313)

* knip: Enable unusedBinaries, add two exceptions

* knip: YOLO pass, all the unused exports enabled.
Paired with @christian-byrne to allow for some special cases to remain with custom knip ignore tags.

* knip: remove post-rebase
This commit is contained in:
Alexander Brown
2025-09-04 22:29:44 -07:00
committed by GitHub
parent 006e6bd57c
commit 3fbcf4aa7e
35 changed files with 22 additions and 883 deletions

View File

@@ -29,34 +29,6 @@ export function satisfiesVersion(version: string, range: string): boolean {
}
}
/**
* Compares two versions and returns the difference type
* @param version1 First version
* @param version2 Second version
* @returns Difference type or null if comparison fails
*/
export function getVersionDifference(
version1: string,
version2: string
): semver.ReleaseType | null {
try {
const clean1 = cleanVersion(version1)
const clean2 = cleanVersion(version2)
return semver.diff(clean1, clean2)
} catch {
return null
}
}
/**
* Checks if a version is valid according to semver
* @param version Version string to validate
* @returns true if version is valid
*/
export function isValidVersion(version: string): boolean {
return semver.valid(version) !== null
}
/**
* Checks version compatibility and returns conflict details.
* Supports all semver ranges including >=, <=, >, <, ~, ^ operators.