Skip to content

Commit

Permalink
Upgraded core to ^1.1.0 for path export
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Nov 3, 2024
1 parent 28afde7 commit 500491d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
28 changes: 19 additions & 9 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
"typescript-eslint": "^8.8.0"
},
"peerDependencies": {
"@zenfs/core": "^1.0.4"
"@zenfs/core": "^1.1.0"
},
"optionalDependencies": {
"dropbox": "^10.34.0",
"@aws-sdk/client-s3": "^3.679.0"
"@aws-sdk/client-s3": "^3.679.0",
"dropbox": "^10.34.0"
}
}
2 changes: 1 addition & 1 deletion src/dropbox.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Async, Errno, ErrnoError, FileSystem, PreloadFile, Stats, type Backend, type File } from '@zenfs/core';
import { S_IFDIR, S_IFLNK, S_IFREG } from '@zenfs/core/emulation/constants.js';
import { dirname } from '@zenfs/core/emulation/path.js';
import { dirname } from '@zenfs/core/path';
import { Buffer } from 'buffer';
import type * as DB from 'dropbox';

Expand Down
4 changes: 2 additions & 2 deletions src/s3.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { S3 } from '@aws-sdk/client-s3';
import { Async, type Backend, type File, FileSystem, InMemory, PreloadFile, Stats, type StatsLike, ErrnoError } from '@zenfs/core';
import { S_IFDIR, S_IFMT } from '@zenfs/core/emulation/constants.js';
import { join } from '@zenfs/core/emulation/path.js';
import { join } from '@zenfs/core/path';

export type Metadata = Partial<Record<keyof StatsLike, string>>;

Expand Down Expand Up @@ -135,7 +135,7 @@ export class S3FileSystem extends Async(FileSystem) {
}

public async rmdir(path: string): Promise<void> {
if (path === '/') {
if (path == '/') {
throw ErrnoError.With('EPERM', path, 'rmdir');
}
const contents = await this.readdir(path);
Expand Down

0 comments on commit 500491d

Please sign in to comment.