@junejs/juno 0.0.30-dev.0 → 0.0.30-dev.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.ts +14 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junejs/juno",
3
- "version": "0.0.30-dev.0",
3
+ "version": "0.0.30-dev.1",
4
4
  "description": "Juno — June's ergonomic data layer over the JuneDb contract. The default that ships with the agent-native magic (Tier 3).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -16,7 +16,7 @@
16
16
  "typecheck": "tsc --noEmit"
17
17
  },
18
18
  "dependencies": {
19
- "@junejs/core": ">=0.1.0-dev.0",
19
+ "@junejs/core": ">=0.1.0-dev.1",
20
20
  "@junejs/db": ">=0.0.33-dev.0"
21
21
  },
22
22
  "devDependencies": {
package/src/index.ts CHANGED
@@ -67,15 +67,20 @@ function isOperators(v: unknown): v is Operators {
67
67
  }
68
68
 
69
69
  export class Table<T extends Row = Row> {
70
- constructor(
71
- private readonly db: JuneDb,
72
- private readonly name: string,
73
- // Per-request ambient-loader registry, shared across the juno() handle's
74
- // .table() calls so concurrent findBy/all coalesce. Holds both point and list
75
- // loaders (keyed apart). Optional/defaulted so a standalone `new Table(db,
76
- // name)` still works (it just batches alone).
77
- private readonly loaders: Map<string, unknown> = new Map(),
78
- ) {}
70
+ // Explicit fields, not parameter properties — parameter properties aren't
71
+ // erasable, and June ships raw .ts that consumers type-strip (erasableSyntaxOnly).
72
+ private readonly db: JuneDb;
73
+ private readonly name: string;
74
+ // Per-request ambient-loader registry, shared across the juno() handle's
75
+ // .table() calls so concurrent findBy/all coalesce. Holds both point and list
76
+ // loaders (keyed apart). Optional/defaulted so a standalone `new Table(db,
77
+ // name)` still works (it just batches alone).
78
+ private readonly loaders: Map<string, unknown>;
79
+ constructor(db: JuneDb, name: string, loaders: Map<string, unknown> = new Map()) {
80
+ this.db = db;
81
+ this.name = name;
82
+ this.loaders = loaders;
83
+ }
79
84
 
80
85
  // The compiler for THIS table's db — picked from the handle's dialect tag (sqlite
81
86
  // by default). So `table()` emits the right SQL whether db is sqlite/D1, Postgres,