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

Function getCommitBump

scripts/generate-semantic-changeset.mjs:80–89  ·  view source on GitHub ↗
(commit)

Source from the content-addressed store, hash-verified

78}
79
80function getCommitBump(commit) {
81 const headerMatch = commit.subject.match(/^([a-z]+)(\([^)]*\))?(!)?:\s+/i)
82 const type = headerMatch?.[1]?.toLowerCase()
83 const breaking = Boolean(headerMatch?.[3]) || /BREAKING CHANGE:/i.test(commit.body)
84
85 if (breaking) return 'major'
86 if (type === 'feat') return 'minor'
87 if (type && PATCH_TYPES.has(type)) return 'patch'
88 return null
89}
90
91function mergeBump(current, incoming) {
92 const rank = { patch: 1, minor: 2, major: 3 }

Callers 1

mainFunction · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected