Skip to content

Commit

Permalink
fileserver: upgrade to @zenfs/core 1.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yoursunny committed Jan 7, 2025
1 parent 8728e23 commit a053240
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions integ/browser-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"devDependencies": {
"@nodelib/fs.walk": "^3.0.1",
"@types/webpack": "^5.28.5",
"@zenfs/core": "^1.6.16",
"@zenfs/dom": "^1.1.0",
"@zenfs/core": "^1.7.2",
"@zenfs/dom": "^1.1.3",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"html-webpack-plugin": "^5.6.3",
"puppeteer": "^23.11.1",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"test": "vitest",
"typedoc": "bash mk/typedoc.sh"
},
"packageManager": "pnpm@9.15.1+sha512.1acb565e6193efbebda772702950469150cf12bcc764262e7587e71d19dc98a423dff9536e57ea44c49bdf790ff694e83c27be5faa23d67e0c033b583be4bfcf",
"packageManager": "pnpm@9.15.3+sha512.1f79bc245a66eb0b07c5d4d83131240774642caaa86ef7d0434ab47c0d16f66b04e21e0c086eb61e62c77efc4d7f7ec071afad3796af64892fae66509173893a",
"devDependencies": {
"@types/node": "^22.10.2",
"@types/node": "^22.10.5",
"@types/wtfnode": "^0.7.3",
"@typescript/lib-dom": "npm:@types/web@0.0.188",
"@typescript/lib-dom": "npm:@types/web@0.0.189",
"@vitest/coverage-v8": "^2.1.8",
"@yoursunny/xo-config": "0.60.0",
"codedown": "^3.2.1",
Expand Down
4 changes: 2 additions & 2 deletions pkg/fileserver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"@ndn/segmented-object": "workspace:*",
"@ndn/tlv": "workspace:*",
"@ndn/util": "workspace:*",
"@zenfs/core": "^1.6.16",
"@zenfs/core": "^1.7.2",
"mnemonist": "^0.39.8",
"obliterator": "^2.0.4",
"obliterator": "^2.0.5",
"streaming-iterables": "^8.0.1",
"tslib": "^2.8.1"
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/fileserver/src/zenfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class NDNFileSystem extends Async(Readonly(FileSystem)) { // eslint-disab

public override async openFile(path: string, flag: string): Promise<File> {
if (isWriteable(flag)) {
throw new ErrnoError(Errno.EPERM, path);
throw new ErrnoError(Errno.EPERM, "filesystem is readonly", path);
}
const m = await this.getFileMetadata(path);
return new NDNFile(this, path, this.client, m);
Expand Down
10 changes: 5 additions & 5 deletions pkg/fileserver/tests/client.t.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ test.each(readFileIntoCases)("readFileInto [%d,%d)", async (...tc) => {
});

test("zenfs rejects", async () => {
expect(() => zenfs.statSync("/N/A")).toThrow(/ENOTSUP/);
expect(() => zenfs.readdirSync("/N/A")).toThrow(/ENOTSUP/);
await expect(zenfs.promises.open("/N/A/B.bin", "w")).rejects.toThrow(/EPERM/);
expect(() => zenfs.readFileSync("/N/A/B.bin")).toThrow(/ENOTSUP/);
expect(() => zenfs.openSync("/N/A/B.bin", "r")).toThrow(/ENOTSUP/);
expect(() => zenfs.statSync("/N/A")).toThrow(/async/);
expect(() => zenfs.readdirSync("/N/A")).toThrow(/async/);
await expect(zenfs.promises.open("/N/A/B.bin", "w")).rejects.toThrow(/readonly/);
expect(() => zenfs.readFileSync("/N/A/B.bin")).toThrow(/async/);
expect(() => zenfs.openSync("/N/A/B.bin", "r")).toThrow(/async/);
});

test("zenfs stat", async () => {
Expand Down
2 changes: 1 addition & 1 deletion pkg/ndncert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"b64-lite": "^1.4.0",
"imap-emails": "^1.0.4",
"nodemailer": "^6.9.16",
"p-timeout": "^6.1.3",
"p-timeout": "^6.1.4",
"tslib": "^2.8.1",
"type-fest": "^4.31.0",
"typescript-event-target": "^1.1.1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/nfdmgmt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@ndn/segmented-object": "workspace:*",
"@ndn/tlv": "workspace:*",
"@ndn/util": "workspace:*",
"obliterator": "^2.0.4",
"obliterator": "^2.0.5",
"tslib": "^2.8.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion pkg/psync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"applymixins": "^1.1.0",
"mnemonist": "^0.39.8",
"murmurhash3js-revisited": "^3.0.0",
"obliterator": "^2.0.4",
"obliterator": "^2.0.5",
"pako": "^2.1.0",
"tslib": "^2.8.1",
"typescript-event-target": "^1.1.1"
Expand Down
4 changes: 2 additions & 2 deletions pkg/segmented-object/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"@ndn/naming-convention2": "workspace:*",
"@ndn/packet": "workspace:*",
"@ndn/util": "workspace:*",
"@zenfs/core": "^1.6.16",
"@zenfs/core": "^1.7.2",
"it-keepalive": "^1.2.0",
"mnemonist": "^0.39.8",
"obliterator": "^2.0.4",
"obliterator": "^2.0.5",
"p-lazy": "^5.0.0",
"streaming-iterables": "^8.0.1",
"tslib": "^2.8.1",
Expand Down
2 changes: 1 addition & 1 deletion pkg/trust-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@ndn/packet": "workspace:*",
"@ndn/util": "workspace:*",
"mnemonist": "^0.39.8",
"obliterator": "^2.0.4",
"obliterator": "^2.0.5",
"tslib": "^2.8.1",
"type-fest": "^4.31.0"
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/ws-transport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
"@ndn/node-transport": "workspace:*"
},
"optionalDependencies": {
"bufferutil": "^4.0.8"
"bufferutil": "^4.0.9"
}
}

0 comments on commit a053240

Please sign in to comment.