@prisma/orm-mongo 8.0.0-rc.11-dev.10 → 8.0.0-rc.11-dev.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-mongo",
3
- "version": "8.0.0-rc.11-dev.10",
3
+ "version": "8.0.0-rc.11-dev.12",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -10,16 +10,16 @@
10
10
  "skills"
11
11
  ],
12
12
  "dependencies": {
13
- "@prisma/orm-family-mongo": "8.0.0-rc.11-dev.10",
14
- "@prisma/orm-framework": "8.0.0-rc.11-dev.10",
15
- "@prisma/orm-target-mongo": "8.0.0-rc.11-dev.10",
16
- "@prisma/orm-toolchain": "8.0.0-rc.11-dev.10",
13
+ "@prisma/orm-family-mongo": "8.0.0-rc.11-dev.12",
14
+ "@prisma/orm-framework": "8.0.0-rc.11-dev.12",
15
+ "@prisma/orm-target-mongo": "8.0.0-rc.11-dev.12",
16
+ "@prisma/orm-toolchain": "8.0.0-rc.11-dev.12",
17
17
  "pathe": "^2.0.3"
18
18
  },
19
19
  "devDependencies": {
20
- "@internal/mongo": "8.0.0-rc.11-dev.10",
21
- "@repo/tsconfig": "8.0.0-rc.11-dev.10",
22
- "@repo/tsdown": "8.0.0-rc.11-dev.10",
20
+ "@internal/mongo": "8.0.0-rc.11-dev.12",
21
+ "@repo/tsconfig": "8.0.0-rc.11-dev.12",
22
+ "@repo/tsdown": "8.0.0-rc.11-dev.12",
23
23
  "tsdown": "0.22.14",
24
24
  "typescript": "5.9.3"
25
25
  },
@@ -15,7 +15,7 @@ description: >-
15
15
  ORM 7 or earlier (schema.prisma + @prisma/client).
16
16
  metadata:
17
17
  library: '@prisma/orm-mongo'
18
- library_version: '8.0.0-rc.11-dev.10'
18
+ library_version: '8.0.0-rc.11-dev.12'
19
19
  version: '2026-09-12'
20
20
  ---
21
21
 
@@ -1,5 +1,28 @@
1
1
  ---
2
2
  from: 8.0.0-rc.11
3
3
  to: 8.0.0-rc.12
4
- changes: []
4
+ # contract.d.ts now orders every collection the way contract.json does; a re-emit reorders, nothing else.
5
+ changes:
6
+ - id: params-only-sql-facade-prepare
7
+ summary: Replace injected SQL-builder preparation callbacks with params-only callbacks and lexical facade SQL access.
5
8
  ---
9
+
10
+ ## `params-only-sql-facade-prepare`
11
+
12
+ Find calls to `prepare(declaration, callback)` on clients created by the Postgres or SQLite facade (`@prisma/orm-postgres/runtime`, `@prisma/orm-sqlite/runtime`, or their `@internal/postgres/runtime` and `@internal/sqlite/runtime` counterparts). Resolve the receiver and callback rather than rewriting every method named `prepare`: native SQLite `database.prepare(sql)` and SQL runtime's existing params-only preparation are different APIs and must remain unchanged.
13
+
14
+ Change callbacks from `(sql, params) => ...` to `(params) => ...`. Replace references bound to the removed `sql` callback argument with the same facade receiver's lexical `.sql` property. Preserve the params argument's name, declaration, SQL chain, row selection, filters and invocation target/options. For extracted callbacks, capture the same client in the enclosing scope; do not capture an invocation target or evaluate the callback twice. Update explicit callback type annotations to accept only the placeholder-params argument.
15
+
16
+ ```ts
17
+ // Before
18
+ const query = await db.prepare({ id: 'pg/int4@1' }, (sql, params) =>
19
+ sql.public.users.select('id').where((f, fns) => fns.eq(f.id, params.id)).build(),
20
+ );
21
+
22
+ // After
23
+ const query = await db.prepare({ id: 'pg/int4@1' }, (params) =>
24
+ db.sql.public.users.select('id').where((f, fns) => fns.eq(f.id, params.id)).build(),
25
+ );
26
+ ```
27
+
28
+ Apply the same translation to SQLite's flat SQL facade (`sql.users` becomes `db.sql.users`), retaining its existing codec ids. Keep `.query(target, params, options?)` and SQL statistics `.execute(target, params, options?)` calls unchanged. Do not rewrite historical release notes, applied upgrade recipes, generated contracts or tests as part of this source translation.
@@ -1,5 +1,56 @@
1
1
  ---
2
2
  from: 8.0.0-rc.11
3
3
  to: 8.0.0-rc.12
4
- changes: []
4
+ # contract.d.ts now orders every collection the way contract.json does; a re-emit reorders, nothing else.
5
+ changes:
6
+ - id: expression-codec-on-return-type
7
+ summary: Move custom expression wrapper codec metadata to returnType.codec and remove the separate ExpressionImpl codec argument.
8
+ - id: shared-preparable-envelope
9
+ summary: Type ORM preparation descriptions with the shared compositional Preparable protocol and pass their contained plan to SQL runtime.
10
+ - id: params-only-sql-facade-prepare
11
+ summary: Replace injected SQL-builder preparation callbacks with params-only callbacks and lexical facade SQL access.
12
+ - id: preserve-prepared-reference-nullability
13
+ summary: Preserve declaration nullability when constructing or cloning PreparedParamRef AST nodes.
14
+ - id: preserve-orm-pagination-expressions
15
+ summary: Preserve expression-valued limit and offset when consuming ORM CollectionState.
5
16
  ---
17
+
18
+ ## `expression-codec-on-return-type`
19
+
20
+ For custom SQL `Expression` wrappers, move an existing top-level `codec` reference into `returnType.codec`, preserving the complete reference including `typeParams`. Read metadata through `codecOf(expression)` or `expression.returnType.codec`, not `expression.codec`. Keep the existing `returnType.codecId` and nullability; wrappers without an explicit reference continue to use the declared codec id fallback. Do not remove or relocate unrelated codec fields on AST nodes, storage declarations, runtime bindings or scope descriptors.
21
+
22
+ For direct `ExpressionImpl` construction, change `new ExpressionImpl(ast, returnType, codec, projectionAst)` to `new ExpressionImpl(ast, { ...returnType, codec }, projectionAst)`. When the removed codec argument was `undefined`, keep `returnType` unchanged and move any fourth projection argument to the third position. Preserve projection-only lowering separately from predicate and ordering ASTs.
23
+
24
+ ## `shared-preparable-envelope`
25
+
26
+ Replace imports of SQL ORM client's `RowQuery` with `Preparable` from `@internal/sql-relational-core/plan`. Supply both type arguments as `Preparable<DbRow, Result>` and return `{ plan, consume }`, where `plan` is a `SqlQueryPlan<DbRow>` and `consume` returns the complete ORM result. Read AST, parameters and metadata through `description.plan`; pass `description.plan` rather than the description to SQL runtime preparation. Keep the consumer's mapping setup outside invocation-time code.
27
+
28
+ For integrations accepting both SQL and ORM callbacks, constrain the callback result with `Q extends SqlQueryPlan | Preparable<unknown, unknown>` and use SQL ORM client's `prepareQuery` and `PreparedFrom<Params, Q>`. Preserve the concrete `Q` so SQL row/statistics types and ORM all/first result types remain distinct. Do not add identity consumers to plain SQL plans.
29
+
30
+ ## `preserve-orm-pagination-expressions`
31
+
32
+ Update extension code that reads or mirrors ORM `CollectionState.limit` and `offset`: these fields now contain relational-core `LimitOffsetValue | undefined` (`number | AnyExpression | undefined`), not just numbers. Forward them unchanged to the existing `SelectAst.withLimit` and `withOffset` methods. If processing numeric literals separately, narrow with `typeof value === 'number'`; preserve expression nodes rather than coercing, serializing or boxing them as literal parameters. Test presence against `undefined`, not truthiness, so zero limits and offsets survive. Keep grouped post-aggregation paging's separate numeric state unchanged.
33
+
34
+ ## `preserve-prepared-reference-nullability`
35
+
36
+ Find code that constructs or clones `PreparedParamRef` from SQL relational-core's AST exports. When constructing a reference from a nullable declaration, pass its declared boolean nullability as the third argument to `PreparedParamRef.of(name, codec, nullable)` or `new PreparedParamRef(name, codec, nullable)`. When cloning an existing reference, preserve `ref.nullable`: `PreparedParamRef.of(ref.name, ref.codec, ref.nullable)`. Keep the name and complete codec reference unchanged, and keep constructing frozen class instances rather than spreading nodes into plain objects. Do not derive this flag from a column's nullability or an invocation's bound value.
37
+
38
+ ## `params-only-sql-facade-prepare`
39
+
40
+ Find calls to `prepare(declaration, callback)` on clients created by the Postgres or SQLite facade (`@prisma/orm-postgres/runtime`, `@prisma/orm-sqlite/runtime`, or their `@internal/postgres/runtime` and `@internal/sqlite/runtime` counterparts). Resolve the receiver and callback rather than rewriting every method named `prepare`: native SQLite `database.prepare(sql)` and SQL runtime's existing params-only preparation are different APIs and must remain unchanged.
41
+
42
+ Change callbacks from `(sql, params) => ...` to `(params) => ...`. Replace references bound to the removed `sql` callback argument with the same facade receiver's lexical `.sql` property. Preserve the params argument's name, declaration, SQL chain, row selection, filters and invocation target/options. For extracted callbacks, capture the same client in the enclosing scope; do not capture an invocation target or evaluate the callback twice. Update explicit callback type annotations to accept only the placeholder-params argument.
43
+
44
+ ```ts
45
+ // Before
46
+ const query = await db.prepare({ id: 'pg/int4@1' }, (sql, params) =>
47
+ sql.public.users.select('id').where((f, fns) => fns.eq(f.id, params.id)).build(),
48
+ );
49
+
50
+ // After
51
+ const query = await db.prepare({ id: 'pg/int4@1' }, (params) =>
52
+ db.sql.public.users.select('id').where((f, fns) => fns.eq(f.id, params.id)).build(),
53
+ );
54
+ ```
55
+
56
+ Apply the same translation to SQLite's flat SQL facade (`sql.users` becomes `db.sql.users`), retaining its existing codec ids. Keep `.query(target, params, options?)` and SQL statistics `.execute(target, params, options?)` calls unchanged. Do not rewrite historical release notes, applied upgrade recipes, generated contracts or tests as part of this source translation.