Skip to content

Commit f173b91

Browse files
committed
chore(workflow): minor upgrade-deps simplifications
- Drop the redundant `[ -s ]` check in `ensure_trailing_newline`. If the file is empty, `tail -c1` returns nothing and `[ -n "" ]` is already false, so the size check adds nothing. - Trim the upgrade-deps regex-table comment to the only WHY worth preserving (oxlint's trailing `\n` disambiguates from oxlint-tsgolint). The callback-signature explanation just narrated the code and added noise. - Add `timeout-minutes: 180` to the `Check upgrade dependencies` step as a belt-and-suspenders guard. With `--max-turns 200` and the no-polling rule now in place, normal runs finish well under this cap; a runaway will be killed by Actions instead of consuming the full 6-hour job budget.
1 parent f8045cf commit f173b91

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/scripts/upgrade-deps.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ async function updatePnpmWorkspace(versions) {
8484
const filePath = path.join(ROOT, 'pnpm-workspace.yaml');
8585
let content = fs.readFileSync(filePath, 'utf8');
8686

87-
// Each pattern has exactly one capture group (the current version) so the replace
88-
// callback signature is `(match, captured, offset, string)` — no positional ambiguity.
89-
// oxlint's trailing \n disambiguates from oxlint-tsgolint.
87+
// oxlint's trailing \n in the pattern disambiguates from oxlint-tsgolint.
9088
const entries = [
9189
{
9290
name: 'vitest',

.github/workflows/upgrade-deps.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464

6565
- name: Check upgrade dependencies
6666
id: check-upgrade-dependencies
67+
timeout-minutes: 180
6768
uses: anthropics/claude-code-action@c3d45e8e941e1b2ad7b278c57482d9c5bf1f35b3 # Claude Code to 2.1.112
6869
env:
6970
RELEASE_BUILD: 'true'
@@ -229,7 +230,7 @@ jobs:
229230
# so guarantee a trailing newline regardless of what the generator wrote.
230231
ensure_trailing_newline() {
231232
local f="$1"
232-
if [ -s "$f" ] && [ -n "$(tail -c1 "$f")" ]; then
233+
if [ -n "$(tail -c1 "$f")" ]; then
233234
printf '\n' >> "$f"
234235
fi
235236
}

0 commit comments

Comments
 (0)