@fedify/sqlite 1.10.0 → 2.0.0-dev.100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright 2024–2025 Hong Minhee
3
+ Copyright 2024–2026 Hong Minhee
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
package/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/sqlite",
3
- "version": "1.10.0",
3
+ "version": "2.0.0-dev.100+a9d733cc",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./src/mod.ts",
@@ -0,0 +1,2 @@
1
+ import { DatabaseSync } from "node:sqlite";
2
+ export { DatabaseSync };
package/dist/kv.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { PlatformDatabase } from "#sqlite";
1
+ import { DatabaseSync } from "./dist/sqlite.node.cjs";
2
2
  import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions } from "@fedify/fedify";
3
3
 
4
4
  //#region src/kv.d.ts
@@ -37,14 +37,14 @@ interface SqliteKvStoreOptions {
37
37
  */
38
38
  declare class SqliteKvStore implements KvStore {
39
39
  #private;
40
- readonly db: PlatformDatabase;
40
+ readonly db: DatabaseSync;
41
41
  readonly options: SqliteKvStoreOptions;
42
42
  /**
43
43
  * Creates a new SQLite key–value store.
44
44
  * @param db The SQLite database to use. Supports `node:sqlite` and `bun:sqlite`.
45
45
  * @param options The options for the key–value store.
46
46
  */
47
- constructor(db: PlatformDatabase, options?: SqliteKvStoreOptions);
47
+ constructor(db: DatabaseSync, options?: SqliteKvStoreOptions);
48
48
  /**
49
49
  * {@inheritDoc KvStore.get}
50
50
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/sqlite",
3
- "version": "1.10.0",
3
+ "version": "2.0.0-dev.100+a9d733cc",
4
4
  "description": "SQLite drivers for Fedify",
5
5
  "keywords": [
6
6
  "fedify",
@@ -58,16 +58,16 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@js-temporal/polyfill": "^0.5.1",
61
- "@logtape/logtape": "^1.2.2",
61
+ "@logtape/logtape": "^1.3.5",
62
62
  "es-toolkit": "^1.31.0"
63
63
  },
64
64
  "peerDependencies": {
65
- "@fedify/fedify": "^1.10.0"
65
+ "@fedify/fedify": "^2.0.0-dev.100+a9d733cc"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@std/async": "npm:@jsr/std__async@^1.0.13",
69
69
  "tsdown": "^0.12.9",
70
- "typescript": "^5.9.2"
70
+ "typescript": "^5.9.3"
71
71
  },
72
72
  "scripts": {
73
73
  "build": "tsdown",
package/src/kv.test.ts CHANGED
@@ -320,7 +320,7 @@ test("SqliteKvStore.list()", async () => {
320
320
  await store.set(["other", "x"], "value-x");
321
321
 
322
322
  const entries: { key: readonly string[]; value: unknown }[] = [];
323
- for await (const entry of store.list!(["prefix"])) {
323
+ for await (const entry of store.list(["prefix"])) {
324
324
  entries.push({ key: entry.key, value: entry.value });
325
325
  }
326
326
 
@@ -355,7 +355,7 @@ test("SqliteKvStore.list() - excludes expired", async () => {
355
355
  await store.set(["list-test", "valid"], "valid-value");
356
356
 
357
357
  const entries: { key: readonly string[]; value: unknown }[] = [];
358
- for await (const entry of store.list!(["list-test"])) {
358
+ for await (const entry of store.list(["list-test"])) {
359
359
  entries.push({ key: entry.key, value: entry.value });
360
360
  }
361
361
 
@@ -374,7 +374,7 @@ test("SqliteKvStore.list() - single element key", async () => {
374
374
  await store.set(["b"], "value-b");
375
375
 
376
376
  const entries: { key: readonly string[]; value: unknown }[] = [];
377
- for await (const entry of store.list!(["a"])) {
377
+ for await (const entry of store.list(["a"])) {
378
378
  entries.push({ key: entry.key, value: entry.value });
379
379
  }
380
380
 
@@ -393,7 +393,7 @@ test("SqliteKvStore.list() - empty prefix", async () => {
393
393
  await store.set(["d", "e", "f"], "value-def");
394
394
 
395
395
  const entries: { key: readonly string[]; value: unknown }[] = [];
396
- for await (const entry of store.list!()) {
396
+ for await (const entry of store.list()) {
397
397
  entries.push({ key: entry.key, value: entry.value });
398
398
  }
399
399