From e9baee950f283a0a26fd60c46b43799aabce3a17 Mon Sep 17 00:00:00 2001 From: James Prevett Date: Sun, 1 Dec 2024 21:52:25 -0600 Subject: [PATCH] Fixed location of `patch-package` script Renamed `node:fs` namespace import in streams.ts --- package.json | 2 +- src/emulation/streams.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 3de5b29a..2c54a340 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "build:docs": "typedoc", "dev": "npm run build -- --watch", "prepublishOnly": "npm run build", - "postinstall": "patch-package" + "install": "patch-package" }, "lint-staged": { "*": [ diff --git a/src/emulation/streams.ts b/src/emulation/streams.ts index 0edd9750..fefc52ab 100644 --- a/src/emulation/streams.ts +++ b/src/emulation/streams.ts @@ -1,9 +1,9 @@ -import type * as Node from 'node:fs'; +import type * as fs from 'node:fs'; import { Readable, Writable } from 'readable-stream'; import type { Callback } from '../utils.js'; import { ErrnoError, Errno } from '../error.js'; -export class ReadStream extends Readable implements Node.ReadStream { +export class ReadStream extends Readable implements fs.ReadStream { close(callback: Callback<[void], null> = () => null): void { try { super.destroy(); @@ -22,7 +22,7 @@ export class ReadStream extends Readable implements Node.ReadStream { declare pending: boolean; } -export class WriteStream extends Writable implements Node.WriteStream { +export class WriteStream extends Writable implements fs.WriteStream { close(callback: Callback<[void], null> = () => null): void { try { super.destroy();