MCPcopy Index your code
hub / github.com/vercel/next-forge / compareVersions

Function compareVersions

scripts/update.ts:21–31  ·  view source on GitHub ↗
(a: string, b: string)

Source from the content-addressed store, hash-verified

19} from "./utils.js";
20
21const compareVersions = (a: string, b: string) => {
22 const [aMajor, aMinor, aPatch] = a.split(".").map(Number);
23 const [bMajor, bMinor, bPatch] = b.split(".").map(Number);
24 if (aMajor !== bMajor) {
25 return aMajor - bMajor;
26 }
27 if (aMinor !== bMinor) {
28 return aMinor - bMinor;
29 }
30 return aPatch - bPatch;
31};
32
33const createTemporaryDirectory = async (name: string) => {
34 const cwd = process.cwd();

Callers 1

updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected