Skip to content

Commit 711cf8c

Browse files
committed
Update to core 2.1.0 + kerium
1 parent 1e40a75 commit 711cf8c

File tree

4 files changed

+51
-15
lines changed

4 files changed

+51
-15
lines changed

package-lock.json

+41-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
"typescript-eslint": "^8.8.1"
5959
},
6060
"peerDependencies": {
61-
"@zenfs/core": "^2.0.0",
62-
"utilium": "^1.9.0"
61+
"@zenfs/core": "^2.1.0",
62+
"kerium": "^1.3.4",
63+
"utilium": "^2.3.0"
6364
}
6465
}

src/backend.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import type { Backend, CreationOptions, InodeLike } from '@zenfs/core';
2-
import { Errno, ErrnoError, errorMessages, FileSystem, Inode, Sync } from '@zenfs/core';
2+
import { FileSystem, Inode, Sync } from '@zenfs/core';
33
import { basename, dirname } from '@zenfs/core/path.js';
44
import { S_IFDIR, S_IFREG } from '@zenfs/core/vfs/constants.js';
5+
import { Errno, Exception, strerror } from 'kerium';
56

67
/**
78
* @hidden
89
*/
9-
function convertError(e: unknown, path: string = ''): ErrnoError {
10+
function convertError(e: unknown, path: string = ''): Exception {
1011
const error = e as FS.ErrnoError & { node?: FS.FSNode };
1112
const errno = error.errno as Errno;
1213
let parent = error.node;
@@ -18,7 +19,7 @@ function convertError(e: unknown, path: string = ''): ErrnoError {
1819
}
1920
parent = parent.parent;
2021
}
21-
return new ErrnoError(errno, errorMessages[errno], paths.length > 0 ? '/' + paths.join('/') : path);
22+
return new Exception(errno, strerror(errno));
2223
}
2324

2425
/**

src/plugin.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import zfs, { Errno, type Stats } from '@zenfs/core';
1+
import type { Stats } from '@zenfs/core';
2+
import { fs as zfs } from '@zenfs/core';
23
import { parse as parseFlag } from '@zenfs/core/vfs/flags.js';
4+
import { Errno } from 'kerium';
35
import type { EmFS } from './emscripten.js';
46

57
interface Mount extends EmFS.Mount {

0 commit comments

Comments
 (0)