Skip to content

Commit 4ec3eab

Browse files
committed
refactor: Replace Bun file operations with fs/promises methods
1 parent 2711cf5 commit 4ec3eab

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/lib/token-storage.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import fs from "node:fs/promises"
2+
13
import { PATHS } from "./paths"
24

35
export async function saveGithubToken(token: string) {
4-
await Bun.write(PATHS.GITHUB_TOKEN_PATH, token)
6+
await fs.writeFile(PATHS.GITHUB_TOKEN_PATH, token)
57
}
68

79
export async function getGithubToken(): Promise<string> {
8-
return Bun.file(PATHS.GITHUB_TOKEN_PATH).text()
10+
return fs.readFile(PATHS.GITHUB_TOKEN_PATH, "utf-8")
911
}

0 commit comments

Comments
 (0)