chore(tui): upgrade opentui to 0.4.5 (#37522)

This commit is contained in:
Sebastian
2026-07-17 19:14:31 +02:00
committed by GitHub
parent 69a80663a2
commit 38989c57a0
4 changed files with 32 additions and 29 deletions
+9 -6
View File
@@ -160,18 +160,21 @@ async function fixKnownLockfileIssues() {
if (stale.length === 0) return []
if (stale.some((item) => !item.entry.startsWith("opentui-spinner/@opentui/"))) return []
const removed = txt
.split("\n")
.map((line) => line.match(/^ "(opentui-spinner\/@opentui\/[^\"]+)": /)?.[1])
const lines = txt.split("\n")
const spinnerEntry = /^ "(opentui-spinner\/@opentui\/[^"]+)": \[.*\],\r?$/
const removed = lines
.map((line) => line.match(spinnerEntry)?.[1])
.filter((item): item is string => item !== undefined)
if (removed.length === 0) return []
// Bun separates package records with a blank line, so remove each record's separator with it.
await Bun.write(
lockfile,
txt
.split("\n")
.filter((line) => !line.match(/^ "opentui-spinner\/@opentui\//))
lines
.filter(
(line, index) => !spinnerEntry.test(line) && !(line.trim() === "" && spinnerEntry.test(lines[index - 1] ?? "")),
)
.join("\n"),
)
return removed