Skip to content

Commit

Permalink
Merge branch 'release/v0.19.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
holtwick committed Apr 6, 2024
2 parents 81fce01 + 02a9f96 commit 97026e5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zeed",
"type": "module",
"version": "0.19.4",
"version": "0.19.5",
"description": "🌱 Simple foundation library",
"author": {
"name": "Dirk Holtwick",
Expand Down Expand Up @@ -65,12 +65,12 @@
"watch": "nr build -- --watch src"
},
"devDependencies": {
"@antfu/eslint-config": "^2.12.1",
"@antfu/eslint-config": "^2.12.2",
"@antfu/ni": "^0.21.12",
"@types/node": "^20.12.4",
"@types/node": "^20.12.5",
"@vitest/coverage-v8": "^1.4.0",
"esbuild": "^0.20.2",
"eslint": "^8.57.0",
"eslint": "^9.0.0",
"tsup": "^8.0.2",
"typedoc": "^0.25.12",
"typescript": "^5.4.4",
Expand Down
1 change: 0 additions & 1 deletion src/common/log/log-config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { isNumber, isString } from '../data/is'
import { getGlobalLogger } from './log'
import type { LogLevelAliasType, LoggerInterface } from './log-base'

/**
Expand Down
2 changes: 1 addition & 1 deletion src/common/log/log-memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function LoggerMemoryHandler(
return
if (!matchesNamespace(msg.name))
return

msg.timestamp ??= getTimestamp()

const m = objectPlain(msg, { maxDepth, errorTrace })
Expand Down
15 changes: 6 additions & 9 deletions src/common/msg/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import { useDispose } from '../dispose-defer'
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 */
export interface ChannelMessageEvent {
data: any
export interface ChannelMessageEvent<T = any> {
data: T
origin?: string
lastEventId?: string
}
Expand All @@ -17,16 +14,16 @@ export interface ChannelMessageEvent {
* http://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel
* https://deno.com/deploy/docs/runtime-broadcast-channel
*/
export abstract class Channel extends Emitter<{
message: (event: ChannelMessageEvent) => void
messageerror: (event: ChannelMessageEvent) => void // optional
export abstract class Channel<T = any> extends Emitter<{
message: (event: ChannelMessageEvent<T>) => void
messageerror: (event: ChannelMessageEvent<T>) => void // optional
connect: () => void // optional
disconnect: () => void // optional
close: () => void
}> {
id: string = uuid()
abstract isConnected?: boolean
abstract postMessage(data: any): void
abstract postMessage(data: T): void

dispose = useDispose()

Expand Down

0 comments on commit 97026e5

Please sign in to comment.