Skip to content
Closed
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
12 changes: 5 additions & 7 deletions scripts/repo/stage-publish-cli-exe.mts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
const parts = spec.split(',').map(part => part.trim())
const triplets: CliExeTriplet[] = []
for (let i = 0, { length } = parts; i < length; i += 1) {
const part = parts[i]!
const part = parts[i]
if (!isCliExeTriplet(part)) {
logger.error(
`Unknown triplet "${part}" — expected one of: ${CLI_EXE_TRIPLETS.join(', ')}, or all/buildable`,
Expand Down Expand Up @@ -190,9 +190,7 @@
} catch (e) {
// Non-zero exits reject; the error carries the exit code.
const errCode =
e && typeof e === 'object' && 'code' in e
? (e as { code: unknown }).code
: undefined
e && typeof e === 'object' && 'code' in e ? e.code : undefined
code = typeof errCode === 'number' ? errCode : 1
}
if (code !== 0) {
Expand Down Expand Up @@ -267,8 +265,8 @@

let ok = true
for (let i = 0, { length } = targets; i < length; i += 1) {
const target = targets[i]!
const target = targets[i]
ok = guardTarget(target, version) && ok

Check failure on line 269 in scripts/repo/stage-publish-cli-exe.mts

View workflow job for this annotation

GitHub Actions / 🔎 Check

Argument of type 'StageTarget | undefined' is not assignable to parameter of type 'StageTarget'.
}
if (!ok) {
process.exitCode = 1
Expand All @@ -282,16 +280,16 @@
`Plan (${dryRun ? 'dry-run' : 'PUBLISH'}, tag=${tag}, version=${version}):`,
)
for (let i = 0, { length } = targets; i < length; i += 1) {
const target = targets[i]!
const target = targets[i]
logger.log(` ${target.name}@${version} <- ${target.dir}`)

Check failure on line 284 in scripts/repo/stage-publish-cli-exe.mts

View workflow job for this annotation

GitHub Actions / 🔎 Check

'target' is possibly 'undefined'.

Check failure on line 284 in scripts/repo/stage-publish-cli-exe.mts

View workflow job for this annotation

GitHub Actions / 🔎 Check

'target' is possibly 'undefined'.
}
return
}

for (let i = 0, { length } = targets; i < length; i += 1) {
const target = targets[i]!
const target = targets[i]
// eslint-disable-next-line no-await-in-loop
const staged = await stageTarget(target, { dryRun, tag })

Check failure on line 292 in scripts/repo/stage-publish-cli-exe.mts

View workflow job for this annotation

GitHub Actions / 🔎 Check

Argument of type 'StageTarget | undefined' is not assignable to parameter of type 'StageTarget'.
if (!staged) {
process.exitCode = 1
return
Expand Down
Loading