Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/domPublic

Commit49237f6

Browse files
committed
FixedWebAccessFS.remove not operating recursively
Fixed `WebAccessFS.mkdir` causing de-sync in the `Async()` cacheAdded sync after each access testThe minimum @zenfs/core version is now v2.3.11`WebAccess` is now tested in CI
1 parent8a3ed8b commit49237f6

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

‎.github/workflows/ci.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ jobs:
4242
-name:Unit tests (WebStorage)
4343
run:npx zenfs-test tests/setup-storage.ts -v
4444

45-
-name:Unit tests (WebAccess) - SKIPPED
46-
run:echo Skipped#npx zenfs-test tests/setup-access.ts
45+
-name:Unit tests (WebAccess)
46+
run:npx zenfs-test tests/setup-access.ts -v

‎package-lock.json‎

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"typescript-eslint":"^8.8.1"
6262
},
6363
"peerDependencies": {
64-
"@zenfs/core":"^2.1.0",
64+
"@zenfs/core":"^2.3.11",
6565
"kerium":"^1.3.4",
6666
"utilium":"^2.0.0"
6767
},

‎src/access.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export class WebAccessFS extends Async(IndexFS) {
144144

145145
protectedasyncremove(path:string):Promise<void>{
146146
consthandle=awaitthis.get('directory',dirname(path));
147+
for(constpofthis._handles.keys())if(dirname(p)==path)this._handles.delete(p);
147148
this._handles.delete(path);
148149
awaithandle.removeEntry(basename(path),{recursive:true}).catch(ex=>_throw(convertException(ex,path)));
149150
}
@@ -227,12 +228,10 @@ export class WebAccessFS extends Async(IndexFS) {
227228
returnthis.write(path,data,0);
228229
}
229230

230-
publicasyncmkdir(path:string,options:CreationOptions):Promise<InodeLike>{
231-
constinode=awaitsuper.mkdir(path,options);
231+
publicasync_mkdir(path:string):Promise<void>{
232232
consthandle=awaitthis.get('directory',dirname(path));
233233
constdir=awaithandle.getDirectoryHandle(basename(path),{create:true}).catch((ex:DOMException)=>_throw(convertException(ex,path)));
234234
if(!this.disableHandleCache)this._handles.set(path,dir);
235-
returninode;
236235
}
237236

238237
protectedasyncget<constTextendsFileSystemHandleKind|null>(kind:T=nullasT,path:string):Promise<HKindToType<T>>{

‎tests/setup-access.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
import{configureSingle}from'@zenfs/core';
1+
import{configureSingle,sync}from'@zenfs/core';
22
import{copyAsync,data}from'@zenfs/core/tests/setup.js';
3+
import{afterEach}from'node:test';
34
import{WebAccess}from'../src/access.js';
45
import{handle}from'./web-access.js';
56

67
awaitconfigureSingle({backend:WebAccess, handle});
78
awaitcopyAsync(data);
9+
10+
afterEach(sync);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp