From 1f7378ca49c381f06e266be3ae9e6b464a455850 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Thu, 21 Dec 2023 16:45:32 -0300 Subject: [PATCH] import from core.ts instead of pure.ts whenever possible. --- filter.ts | 2 +- nip10.ts | 2 +- nip42.ts | 2 +- pool.ts | 2 +- references.ts | 2 +- tsconfig.json | 2 +- utils.test.ts | 2 +- utils.ts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/filter.ts b/filter.ts index 4cda3b6..0c7f2fa 100644 --- a/filter.ts +++ b/filter.ts @@ -1,4 +1,4 @@ -import { Event } from './pure.ts' +import { Event } from './core.ts' export type Filter = { ids?: string[] diff --git a/nip10.ts b/nip10.ts index d01c00a..4f0c1e8 100644 --- a/nip10.ts +++ b/nip10.ts @@ -1,4 +1,4 @@ -import type { Event } from './pure.ts' +import type { Event } from './core.ts' import type { EventPointer, ProfilePointer } from './nip19.ts' export type NIP10Result = { diff --git a/nip42.ts b/nip42.ts index f8fd1ec..88e4190 100644 --- a/nip42.ts +++ b/nip42.ts @@ -1,4 +1,4 @@ -import { EventTemplate } from './pure.ts' +import { EventTemplate } from './core.ts' import { ClientAuth } from './kinds.ts' /** diff --git a/pool.ts b/pool.ts index d64a1d3..1106e6b 100644 --- a/pool.ts +++ b/pool.ts @@ -1,7 +1,7 @@ import { Relay, SubscriptionParams, Subscription } from './relay.ts' import { normalizeURL } from './utils.ts' -import type { Event } from './pure.ts' +import type { Event } from './core.ts' import { type Filter } from './filter.ts' export type SubCloser = { close: () => void } diff --git a/references.ts b/references.ts index 9d62537..5c6acb9 100644 --- a/references.ts +++ b/references.ts @@ -1,6 +1,6 @@ import { decode, type AddressPointer, type ProfilePointer, type EventPointer } from './nip19.ts' -import type { Event } from './pure.ts' +import type { Event } from './core.ts' type Reference = { text: string diff --git a/tsconfig.json b/tsconfig.json index 7a4cc8b..4fe94cf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,10 +9,10 @@ "skipLibCheck": true, "esModuleInterop": true, "emitDeclarationOnly": true, + "allowImportingTsExtensions": true, "outDir": "lib/types", "resolveJsonModule": true, "rootDir": ".", - "allowImportingTsExtensions": true, "types": ["bun-types"] } } diff --git a/utils.test.ts b/utils.test.ts index 7f9cd25..ac39e9f 100644 --- a/utils.test.ts +++ b/utils.test.ts @@ -2,7 +2,7 @@ import { describe, test, expect } from 'bun:test' import { buildEvent } from './test-helpers.ts' import { Queue, insertEventIntoAscendingList, insertEventIntoDescendingList, binarySearch } from './utils.ts' -import type { Event } from './pure.ts' +import type { Event } from './core.ts' describe('inserting into a desc sorted list of events', () => { test('insert into an empty list', async () => { diff --git a/utils.ts b/utils.ts index b22134d..7f30dfa 100644 --- a/utils.ts +++ b/utils.ts @@ -1,4 +1,4 @@ -import type { Event } from './pure.ts' +import type { Event } from './core.ts' export const utf8Decoder = new TextDecoder('utf-8') export const utf8Encoder = new TextEncoder()