Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions scripts/manual-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
* In that case, the consumed entries are cleared from pre.json so
* `changeset version` re-processes them and bumps to the next beta.
*/
function applyPendingChangesets(dryRun: boolean, stable: boolean): boolean {

Check warning on line 151 in scripts/manual-release.ts

View workflow job for this annotation

GitHub Actions / verify

High CRAP score (moderate)

Function 'applyPendingChangesets' has a CRAP score of 30.0 (threshold: 30.0). • Severity: moderate • Cyclomatic: 5 • Cognitive: 4 • CRAP: 30.0 (threshold: 30.0) • Lines: 56 CRAP combines complexity with coverage: high CRAP means changes here carry high risk. Consider adding tests, simplifying the function, or both.
const result = collectChangesetValidation()

if (result.files.length === 0) {
Expand All @@ -158,7 +158,7 @@

if (result.invalidEntries.length > 0) {
fail(
`Only patch changesets are allowed for this phase. Found non-patch entries:\n${result.invalidEntries.join('\n')}`,
`Only patch and minor changesets are allowed for this phase. Found disallowed entries:\n${result.invalidEntries.join('\n')}`,
)
}

Expand Down Expand Up @@ -249,7 +249,7 @@
writeFileSync(preFile, `${JSON.stringify(preState, null, 2)}\n`)
}

function collectChangesetValidation(): ChangesetValidationResult {

Check warning on line 252 in scripts/manual-release.ts

View workflow job for this annotation

GitHub Actions / verify

High CRAP score (moderate)

Function 'collectChangesetValidation' has a CRAP score of 42.0 (threshold: 30.0). • Severity: moderate • Cyclomatic: 6 • Cognitive: 11 • CRAP: 42.0 (threshold: 30.0) • Lines: 33 CRAP combines complexity with coverage: high CRAP means changes here carry high risk. Consider adding tests, simplifying the function, or both.
const files = readdirSync(resolve('.changeset'))
.filter((name) => name.endsWith('.md') && name !== 'README.md')
.map((name) => resolve('.changeset', name))
Expand All @@ -271,7 +271,8 @@
continue
}

if (entry.bumpType !== 'patch') {
// Beta phase: allow feature minors alongside patches; still refuse majors.
if (entry.bumpType === 'major') {
invalidEntries.push(
`${file}: ${entry.packageName} -> ${entry.bumpType}`,
)
Expand Down
Loading