diff --git a/package.json b/package.json index 99ba210f..a3d81645 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zeed", "type": "module", - "version": "0.15.2", + "version": "0.15.3", "description": "🌱 Simple foundation library", "author": { "name": "Dirk Holtwick", diff --git a/src/common/msg/channel.ts b/src/common/msg/channel.ts index 14528d94..7d9fbf2c 100644 --- a/src/common/msg/channel.ts +++ b/src/common/msg/channel.ts @@ -1,9 +1,10 @@ // (C)opyright 2021-07-15 Dirk Holtwick, holtwick.it. All rights reserved. -// import { Logger } from "../log" +import { useDisposeWithUtils } from '..' import { uuid } from '../uuid' import { Emitter } from './emitter' +// import { Logger } from "../log" // const log = Logger("zeed:channel") /** See http://developer.mozilla.org/en-US/docs/Web/API/MessageEvent */ @@ -29,10 +30,12 @@ export abstract class Channel extends Emitter<{ abstract isConnected?: boolean abstract postMessage(data: any): void - // /** @deprecated use .dispose() */ - // close() { - // void this.dispose() - // } + dispose = useDisposeWithUtils() + + /** @deprecated use .dispose() */ + close() { + void this.dispose() + } } /** Very basic channel demonstrating local communication */ diff --git a/src/node/files-async.ts b/src/node/files-async.ts index efbf302e..5bf00952 100644 --- a/src/node/files-async.ts +++ b/src/node/files-async.ts @@ -4,7 +4,7 @@ import process from 'node:process' import { isHiddenPath } from './fs' import { globToRegExp } from './glob' -async function getStatAsync(path: string): Promise { +export async function getStatAsync(path: string): Promise { try { return await stat(path) } diff --git a/src/node/files.ts b/src/node/files.ts index 40a635b2..22e5f4d3 100644 --- a/src/node/files.ts +++ b/src/node/files.ts @@ -4,7 +4,7 @@ import process from 'node:process' import { isHiddenPath } from './fs' import { globToRegExp } from './glob' -function getStat(path: string): any { +export function getStat(path: string): any { try { return statSync(path) }