chore: upgrade bun from 1.3.5 -> 1.3.6, also update types/bun from 1.3.4 -> 1.3.6 and fix type errs (#8499)

Co-authored-by: Github Action <action@github.com>
This commit is contained in:
Aiden Cline
2026-01-14 09:53:12 -08:00
committed by GitHub
parent 1f86aa8bb9
commit 50dfa9caf3
7 changed files with 63 additions and 14 deletions

View File

@@ -1,8 +1,18 @@
import { realpathSync } from "fs"
import { exists } from "fs/promises"
import { dirname, join, relative } from "path"
export namespace Filesystem {
export const exists = (p: string) =>
Bun.file(p)
.stat()
.then(() => true)
.catch(() => false)
export const isDir = (p: string) =>
Bun.file(p)
.stat()
.then((s) => s.isDirectory())
.catch(() => false)
/**
* On Windows, normalize a path to its canonical casing using the filesystem.
* This is needed because Windows paths are case-insensitive but LSP servers
@@ -31,7 +41,7 @@ export namespace Filesystem {
const result = []
while (true) {
const search = join(current, target)
if (await exists(search).catch(() => false)) result.push(search)
if (await exists(search)) result.push(search)
if (stop === current) break
const parent = dirname(current)
if (parent === current) break
@@ -46,7 +56,7 @@ export namespace Filesystem {
while (true) {
for (const target of targets) {
const search = join(current, target)
if (await exists(search).catch(() => false)) yield search
if (await exists(search)) yield search
}
if (stop === current) break
const parent = dirname(current)