@evolu/common 8.0.0-next.4 → 8.0.0-next.5

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/src/Error.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * @module
5
5
  */
6
6
 
7
- import type { Typed } from "./Type.js";
7
+ import { type InferType, typed, Unknown } from "./Type.js";
8
8
 
9
9
  /**
10
10
  * A wrapper for unknown errors caught at runtime.
@@ -18,9 +18,10 @@ import type { Typed } from "./Type.js";
18
18
  *
19
19
  * Use {@link createUnknownError} to create instances.
20
20
  */
21
- export interface UnknownError extends Typed<"UnknownError"> {
22
- readonly error: unknown;
23
- }
21
+ export const UnknownError = /*#__PURE__*/ typed("UnknownError", {
22
+ error: Unknown,
23
+ });
24
+ export interface UnknownError extends InferType<typeof UnknownError> {}
24
25
 
25
26
  /**
26
27
  * Creates an {@link UnknownError} from an unknown error.
package/src/Sqlite.ts CHANGED
@@ -325,10 +325,11 @@ export const testSetupSqlite = async (
325
325
  const sqlite = disposer.use(
326
326
  await run.orThrow(createSqlite(testName, { mode: "memory" })),
327
327
  );
328
+ const runWithSqlite = disposer.use(run.create({ ...run.deps, sqlite }));
328
329
  const disposables = disposer.move();
329
330
 
330
331
  return {
331
- run: run.addDeps({ sqlite }),
332
+ run: runWithSqlite,
332
333
  sqlite,
333
334
  [Symbol.asyncDispose]: () => disposables.disposeAsync(),
334
335
  };