MCPcopy Index your code
hub / github.com/remix-run/react-router / getNextVersion

Function getNextVersion

scripts/changes/changes.ts:22–36  ·  view source on GitHub ↗

* Calculates the next version based on current version, bump type, and changes config.

(currentVersion: string, bumpType: BumpType)

Source from the content-addressed store, hash-verified

20 * Calculates the next version based on current version, bump type, and changes config.
21 */
22function getNextVersion(currentVersion: string, bumpType: BumpType): string {
23 if (bumpType === "unstable") {
24 throw new Error(
25 "`unstable` bump type should be normalized to a semver bump before calling `getNextVersion`",
26 );
27 }
28 // Normal stable release
29 let nextVersion = semver.inc(currentVersion, bumpType as semver.ReleaseType);
30 if (nextVersion == null) {
31 throw new Error(
32 `Invalid version increment: ${currentVersion} + ${bumpType}`,
33 );
34 }
35 return nextVersion;
36}
37
38interface ChangeFile {
39 file: string;

Callers 1

parseAllChangeFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…