fix: add fs/promises compat for node 12

This commit is contained in:
Amin Yahyaabadi 2024-01-22 01:51:46 -08:00
parent 649bb63b16
commit 8b2ab43823
No known key found for this signature in database
GPG Key ID: F52AF77F636088F0
8 changed files with 82 additions and 52 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -182,7 +182,8 @@
"alias": {
"electron": false,
"patha": "patha/dist/index.node.mjs",
"admina": "admina/dist/index.mjs"
"admina": "admina/dist/index.mjs",
"fs/promises": "./src/utils/compat/fs/promises.ts"
},
"pnpm": {
"overrides": {

View File

@ -0,0 +1,29 @@
import { promises } from "fs"
export default promises
export const {
access,
appendFile,
chmod,
chown,
copyFile,
lchmod,
lchown,
link,
lstat,
mkdir,
mkdtemp,
open,
readdir,
readFile,
readlink,
realpath,
rename,
rmdir,
stat,
symlink,
truncate,
unlink,
utimes,
writeFile,
} = promises