Bump version, drop storage stuff

This commit is contained in:
Jon Staab
2025-09-30 15:05:44 -07:00
parent 79163310c3
commit a2d519766d
20 changed files with 31 additions and 454 deletions
+11 -5
View File
@@ -1,12 +1,18 @@
import {describe, it, vi, expect, beforeEach} from "vitest"
import {now, randomId} from "@welshman/lib"
import {now, choice, range} from "@welshman/lib"
import {getAddress, makeEvent, TrustedEvent, DELETE, MUTES} from "@welshman/util"
import {Repository} from "../src/repository"
const randomHex = () =>
Array.from(range(0, 64))
.map(() => choice(Array.from("0123456789abcdef")))
.join("")
const createEvent = (kind: number, extra = {}) => ({
...makeEvent(kind),
pubkey: randomId(),
id: randomId(),
pubkey: randomHex(),
id: randomHex(),
sig: "fake",
...extra,
})
@@ -55,7 +61,7 @@ describe("Repository", () => {
})
it("should handle replaceable events", () => {
const pubkey = randomId()
const pubkey = randomHex()
const event1 = createEvent(MUTES, {created_at: now() - 100, pubkey})
const event2 = createEvent(MUTES, {created_at: now(), pubkey})
@@ -177,7 +183,7 @@ describe("Repository", () => {
})
it("should query by tags", () => {
const pubkey = randomId()
const pubkey = randomHex()
const event = createEvent(1, {tags: [["p", pubkey]]})
repo.publish(event)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@welshman/relay",
"version": "0.4.7",
"version": "0.5.0",
"author": "hodlbod",
"license": "MIT",
"description": "An in-memory nostr relay implementation.",