MCPcopy Create free account
hub / github.com/fontsource/fontsource / isValidBumpArg

Function isValidBumpArg

packages/publish/src/bump.ts:9–17  ·  view source on GitHub ↗
(bumpArg: string)

Source from the content-addressed store, hash-verified

7import { mergeFlags, writeUpdate } from './utils';
8
9export const isValidBumpArg = (bumpArg: string): boolean => {
10 const validBumpArgs = new Set(['patch', 'minor', 'major', 'from-package']);
11
12 // If it isn't a bumpArg in the set and isn't a semver version number
13 if (!validBumpArgs.has(bumpArg) && !semver.valid(bumpArg)) {
14 return false;
15 }
16 return true;
17};
18
19export const bumpValue = (
20 oldVersion: string,

Callers 2

bump.test.tsFile · 0.90
bumpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected