Skip to content

Commit e82ce3c

Browse files
committed
ci(ecosystem): fail loudly if vinext minimumReleaseAge patch misses
Guard the regex-replace so an upstream layout change that removes the `minimumReleaseAge:` line surfaces as an explicit error instead of silently no-opping (which would let the original `ERR_PNPM_NO_MATURE_MATCHING_VERSION` failure resurface in CI without an obvious cause).
1 parent 1f2e14e commit e82ce3c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

ecosystem-ci/patch-project.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ if (project === 'vinext') {
3636
// upgrade-deps PRs can install transitive deps that were just published.
3737
const workspacePath = join(repoRoot, 'pnpm-workspace.yaml');
3838
const workspace = await readFile(workspacePath, 'utf-8');
39-
await writeFile(
40-
workspacePath,
41-
workspace.replace(/^minimumReleaseAge:.*$/m, 'minimumReleaseAge: 0'),
42-
'utf-8',
43-
);
39+
const patched = workspace.replace(/^minimumReleaseAge:.*$/m, 'minimumReleaseAge: 0');
40+
if (patched === workspace) {
41+
throw new Error(`vinext patch: \`minimumReleaseAge:\` not found in ${workspacePath}`);
42+
}
43+
await writeFile(workspacePath, patched, 'utf-8');
4444
}
4545

4646
// Projects that already use vite-plus need VP_FORCE_MIGRATE=1 so

0 commit comments

Comments
 (0)