Skip to content

Commit

Permalink
style: 💄 run Prettier with updated deps
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Apr 27, 2024
1 parent 2351ff2 commit 456e004
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 8 deletions.
5 changes: 4 additions & 1 deletion src/crud-to-cas/CrudCas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ export interface CrudCasOptions {
const hashEqual = (h1: string, h2: string) => h1 === h2;

export class CrudCas extends CrudCasBase<string> {
constructor(protected readonly crud: CrudApi, protected readonly options: CrudCasOptions) {
constructor(
protected readonly crud: CrudApi,
protected readonly options: CrudCasOptions,
) {
super(crud, options.hash, hashToLocation, hashEqual);
}
}
5 changes: 4 additions & 1 deletion src/fsa-to-node/FsaNodeDirent.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import type { IDirent, TDataOut } from '../node/types/misc';

export class FsaNodeDirent implements IDirent {
public constructor(public readonly name: TDataOut, protected readonly kind: 'file' | 'directory') {}
public constructor(
public readonly name: TDataOut,
protected readonly kind: 'file' | 'directory',
) {}

public isDirectory(): boolean {
return this.kind === 'directory';
Expand Down
6 changes: 5 additions & 1 deletion src/fsa-to-node/FsaNodeStats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ export class FsaNodeStats<T = misc.TStatNumber> implements misc.IStats<T> {
public readonly mode: T;
public readonly nlink: T;

public constructor(isBigInt: boolean, size: T, protected readonly kind: 'file' | 'directory') {
public constructor(
isBigInt: boolean,
size: T,
protected readonly kind: 'file' | 'directory',
) {
const dummy = (isBigInt ? timex : time) as any as T;
this.uid = dummy;
this.gid = dummy;
Expand Down
6 changes: 5 additions & 1 deletion src/node-to-fsa/NodeFileSystemDirectoryHandle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ export class NodeFileSystemDirectoryHandle extends NodeFileSystemHandle implemen
/** Directory path with trailing slash. */
public readonly __path: string;

public constructor(protected readonly fs: NodeFsaFs, path: string, ctx: Partial<NodeFsaContext> = {}) {
public constructor(
protected readonly fs: NodeFsaFs,
path: string,
ctx: Partial<NodeFsaContext> = {},
) {
super('directory', basename(path, ctx.separator || '/'));
this.ctx = createCtx(ctx);
this.__path = path[path.length - 1] === this.ctx.separator ? path : path + this.ctx.separator;
Expand Down
6 changes: 5 additions & 1 deletion src/node-to-fsa/NodeFileSystemFileHandle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import type { IFileSystemFileHandle, IFileSystemSyncAccessHandle } from '../fsa/
export class NodeFileSystemFileHandle extends NodeFileSystemHandle implements IFileSystemFileHandle {
protected readonly ctx: NodeFsaContext;

constructor(protected readonly fs: NodeFsaFs, public readonly __path: string, ctx: Partial<NodeFsaContext> = {}) {
constructor(
protected readonly fs: NodeFsaFs,
public readonly __path: string,
ctx: Partial<NodeFsaContext> = {},
) {
ctx = createCtx(ctx);
super('file', basename(__path, ctx.separator!));
this.ctx = ctx as NodeFsaContext;
Expand Down
5 changes: 4 additions & 1 deletion src/node-to-fsa/NodeFileSystemHandle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import type { IFileSystemHandle, FileSystemHandlePermissionDescriptor } from '..
* @see [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle)
*/
export abstract class NodeFileSystemHandle implements IFileSystemHandle {
constructor(public readonly kind: 'file' | 'directory', public readonly name: string) {}
constructor(
public readonly kind: 'file' | 'directory',
public readonly name: string,
) {}

/**
* Compares two handles to see if the associated entries (either a file or directory) match.
Expand Down
6 changes: 5 additions & 1 deletion src/node-to-fsa/NodeFileSystemWritableFileStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ interface SwapFile {
export class NodeFileSystemWritableFileStream extends WritableStream implements IFileSystemWritableFileStream {
protected readonly swap: SwapFile;

constructor(protected readonly fs: NodeFsaFs, protected readonly path: string, keepExistingData: boolean) {
constructor(
protected readonly fs: NodeFsaFs,
protected readonly path: string,
keepExistingData: boolean,
) {
const swap: SwapFile = { handle: undefined, path: '', offset: 0 };
super({
async start() {
Expand Down
5 changes: 4 additions & 1 deletion src/node-to-fsa/NodePermissionStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
* @see [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PermissionStatus)
*/
export class NodePermissionStatus {
constructor(public readonly name: string, public readonly state: 'granted' | 'denied' | 'prompt') {}
constructor(
public readonly name: string,
public readonly state: 'granted' | 'denied' | 'prompt',
) {}
}

0 comments on commit 456e004

Please sign in to comment.