uql-orm 0.100.0 → 0.100.1

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.
@@ -3,7 +3,8 @@ import { UqlUsageError } from '../util/uqlError.js';
3
3
  /**
4
4
  * The project's own `tsx/esm/api` where Node must load a TypeScript config: Node's type stripping runs
5
5
  * no decorators, and Bun and Deno transform them natively. uql bundles no transpiler, so the project's
6
- * loader reads the project's `tsconfig.json`.
6
+ * loader reads the project's `tsconfig.json`. Registered for the process, never imported through: an
7
+ * import of its own would load the config's `uql-orm` apart from the CLI's, whose objects the other misreads.
7
8
  */
8
9
  export declare function tsxApiFor(path: string, versions: {
9
10
  bun?: string;
@@ -6,7 +6,8 @@ import { UqlUsageError } from '../util/uqlError.js';
6
6
  /**
7
7
  * The project's own `tsx/esm/api` where Node must load a TypeScript config: Node's type stripping runs
8
8
  * no decorators, and Bun and Deno transform them natively. uql bundles no transpiler, so the project's
9
- * loader reads the project's `tsconfig.json`.
9
+ * loader reads the project's `tsconfig.json`. Registered for the process, never imported through: an
10
+ * import of its own would load the config's `uql-orm` apart from the CLI's, whose objects the other misreads.
10
11
  */
11
12
  export function tsxApiFor(path, versions) {
12
13
  if (!/\.[mc]?ts$/.test(path) || versions.bun || versions.deno) {
@@ -23,7 +24,10 @@ async function importConfig(path) {
23
24
  const url = pathToFileURL(path).href;
24
25
  const tsxApi = tsxApiFor(path, process.versions);
25
26
  const loading = tsxApi
26
- ? import(pathToFileURL(tsxApi).href).then((api) => api.tsImport(url, import.meta.url))
27
+ ? import(pathToFileURL(tsxApi).href).then((api) => {
28
+ api.register();
29
+ return import(url);
30
+ })
27
31
  : import(url);
28
32
  const mod = await loading.catch((cause) => {
29
33
  throw importFailure(path, cause, process.versions, tsxApi);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "homepage": "https://uql-orm.dev",
4
4
  "description": "JSON-native TypeScript ORM for Bun, Browsers, Edge, Deno, Node, Workers. Supports PostgreSQL, PGlite, MySQL, MariaDB, SQLite, CockroachDB, SQL Server, Turso, Neon, Cloudflare D1 and MongoDB. Queries are plain JSON, typed to the leaf.",
5
5
  "license": "MIT",
6
- "version": "0.100.0",
6
+ "version": "0.100.1",
7
7
  "type": "module",
8
8
  "engines": {
9
9
  "node": ">=24"