Skip to content

Commit

Permalink
Changed WebAccessFS constructor
Browse files Browse the repository at this point in the history
Updated core version to be ^ not ~
  • Loading branch information
james-pre committed May 17, 2024
1 parent 5418953 commit 39e11fd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"typescript": "5.2.2"
},
"peerDependencies": {
"@zenfs/core": "~0.11.1"
"@zenfs/core": "^0.11.1"
}
}
7 changes: 3 additions & 4 deletions src/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ export class WebAccessFS extends Async(FileSystem) {
/**
* @hidden
*/
_sync: FileSystem;
_sync: FileSystem = InMemory.create({ name: 'accessfs-cache' });

public constructor({ handle }: WebAccessOptions) {
public constructor(handle: FileSystemDirectoryHandle) {
super();
this._handles.set('/', handle);
this._sync = InMemory.create({ name: 'accessfs-cache' });
}

public metadata(): FileSystemMetadata {
Expand Down Expand Up @@ -226,6 +225,6 @@ export const WebAccess = {
},

create(options: WebAccessOptions) {
return new WebAccessFS(options);
return new WebAccessFS(options.handle);
},
} as const satisfies Backend<WebAccessFS, WebAccessOptions>;

0 comments on commit 39e11fd

Please sign in to comment.