@prisma/orm-mongo 8.0.0-rc.11-dev.16 → 8.0.0-rc.11-dev.18

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.16",
3
+ "version": "8.0.0-rc.11-dev.18",
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.16",
14
- "@prisma/orm-framework": "8.0.0-rc.11-dev.16",
15
- "@prisma/orm-target-mongo": "8.0.0-rc.11-dev.16",
16
- "@prisma/orm-toolchain": "8.0.0-rc.11-dev.16",
13
+ "@prisma/orm-family-mongo": "8.0.0-rc.11-dev.18",
14
+ "@prisma/orm-framework": "8.0.0-rc.11-dev.18",
15
+ "@prisma/orm-target-mongo": "8.0.0-rc.11-dev.18",
16
+ "@prisma/orm-toolchain": "8.0.0-rc.11-dev.18",
17
17
  "pathe": "^2.0.3"
18
18
  },
19
19
  "devDependencies": {
20
- "@internal/mongo": "8.0.0-rc.11-dev.16",
21
- "@repo/tsconfig": "8.0.0-rc.11-dev.16",
22
- "@repo/tsdown": "8.0.0-rc.11-dev.16",
20
+ "@internal/mongo": "8.0.0-rc.11-dev.18",
21
+ "@repo/tsconfig": "8.0.0-rc.11-dev.18",
22
+ "@repo/tsdown": "8.0.0-rc.11-dev.18",
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.16'
18
+ library_version: '8.0.0-rc.11-dev.18'
19
19
  version: '2026-09-12'
20
20
  ---
21
21
 
@@ -51,7 +51,7 @@ If the from-to delta spans more than one release (e.g. `0.6 → 0.8`), build the
51
51
  0.6 → 0.7 → 0.8
52
52
  ```
53
53
 
54
- The [`../upgrading/app/upgrades/`](../upgrading/app/upgrades/) directories name the steps — read the chain off the directory names rather than deriving it arithmetically. Each directory is `<from>-to-<to>`. A step is one minor while the version line is stable (`0.7-to-0.8`); on the v8 release-candidate line a step is one release candidate (`8.0.0-rc.1-to-8.0.0-rc.2`), because an RC may carry breaking changes and each one needs its own translation. Moving onto the RC line from the last stable minor is a single step of its own (`0.17-to-8.0.0-rc.1`).
54
+ The [`../upgrading/app/upgrades/`](../upgrading/app/upgrades/) directories name the steps — read the chain off the directory names rather than deriving it arithmetically. Each directory is `<from>-to-<to>`. A step normally spans one stable minor (`0.7-to-0.8`) or one release candidate (`8.0.0-rc.1-to-8.0.0-rc.2`). When intermediate versions were not published, a guide may span a larger hop; follow the available directory chain rather than inventing missing steps. Moving onto the RC line from the last stable minor is a single step of its own (`0.17-to-8.0.0-rc.1`).
55
55
 
56
56
  Apply each step in order, fully: bump, install, run instructions, validate, commit — before moving to the next. Halt the chain on the first failed step; do not skip ahead.
57
57
 
@@ -39,7 +39,7 @@ If the from-to delta spans more than one release (e.g. `0.6 → 0.8`), build the
39
39
  0.6 → 0.7 → 0.8
40
40
  ```
41
41
 
42
- The [`../upgrading/extension/upgrades/`](../upgrading/extension/upgrades/) directories name the steps — read the chain off the directory names rather than deriving it arithmetically. Each directory is `<from>-to-<to>`. A step is one minor while the version line is stable (`0.7-to-0.8`); on the v8 release-candidate line a step is one release candidate (`8.0.0-rc.1-to-8.0.0-rc.2`), because an RC may carry breaking changes and each one needs its own translation. Moving onto the RC line from the last stable minor is a single step of its own (`0.17-to-8.0.0-rc.1`).
42
+ The [`../upgrading/extension/upgrades/`](../upgrading/extension/upgrades/) directories name the steps — read the chain off the directory names rather than deriving it arithmetically. Each directory is `<from>-to-<to>`. A step normally spans one stable minor (`0.7-to-0.8`) or one release candidate (`8.0.0-rc.1-to-8.0.0-rc.2`). When intermediate versions were not published, a guide may span a larger hop; follow the available directory chain rather than inventing missing steps. Moving onto the RC line from the last stable minor is a single step of its own (`0.17-to-8.0.0-rc.1`).
43
43
 
44
44
  Apply each step in order, fully: bump, install, run instructions, check pins, validate, commit — before moving to the next. Halt the chain on the first failed step.
45
45
 
@@ -1,35 +0,0 @@
1
- ---
2
- from: 8.0.0-rc.11
3
- to: 8.0.0-rc.12
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.
8
- - id: postgres-target-owned-list-framing
9
- summary: |
10
- PostgreSQL list result decoding is target-owned; direct driver reads now expose raw array literals, and fixed-scale numeric arrays return database-normalized decimal text such as `"1.5000000000"`.
11
- ---
12
-
13
- ## `params-only-sql-facade-prepare`
14
-
15
- 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.
16
-
17
- 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.
18
-
19
- ```ts
20
- // Before
21
- const query = await db.prepare({ id: 'pg/int4@1' }, (sql, params) =>
22
- sql.public.users.select('id').where((f, fns) => fns.eq(f.id, params.id)).build(),
23
- );
24
-
25
- // After
26
- const query = await db.prepare({ id: 'pg/int4@1' }, (params) =>
27
- db.sql.public.users.select('id').where((f, fns) => fns.eq(f.id, params.id)).build(),
28
- );
29
- ```
30
-
31
- 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.
32
-
33
- ## `postgres-target-owned-list-framing`
34
-
35
- Review application code and snapshots that assert exact PostgreSQL list result spellings. Ordinary Prisma Next runtime reads still return JavaScript arrays, and builtin and enum lists now use the same raw-text-to-element-codec path. If you assert `Decimal[]` / `numeric[]` strings for fixed-scale columns, update those expectations to PostgreSQL's database-normalized scale: a `numeric(30,10)[]` element inserted as `1.5` reads as `"1.5000000000"`; scalar numeric decoding already follows this text-preserving policy. If you use lower-level Postgres driver direct-query rows, parse raw PostgreSQL array literal strings such as `'{a,b}'` instead of expecting registered builtin arrays to arrive as JavaScript arrays. Do not re-emit contracts solely for this change: codec ids, `typeParams`, and `CodecRef.many` stay unchanged.
@@ -1,64 +0,0 @@
1
- ---
2
- from: 8.0.0-rc.11
3
- to: 8.0.0-rc.12
4
- # contract.d.ts now orders every collection the way contract.json does; a re-emit reorders, nothing else.
5
- # Prepared include decoder specialization adds no consumer migration; retain existing entries below.
6
- changes:
7
- - id: expression-codec-on-return-type
8
- summary: Move custom expression wrapper codec metadata to returnType.codec and remove the separate ExpressionImpl codec argument.
9
- - id: shared-preparable-envelope
10
- summary: Type ORM preparation descriptions with the shared compositional Preparable protocol and pass their contained plan to SQL runtime.
11
- - id: params-only-sql-facade-prepare
12
- summary: Replace injected SQL-builder preparation callbacks with params-only callbacks and lexical facade SQL access.
13
- - id: postgres-list-element-codecs-receive-raw-strings
14
- summary: |
15
- PostgreSQL list decoding now parses array frames in the target and passes raw string elements to the scalar element codec; custom PostgreSQL codecs used in lists must accept those raw element spellings.
16
- - id: preserve-prepared-reference-nullability
17
- summary: Preserve declaration nullability when constructing or cloning PreparedParamRef AST nodes.
18
- - id: preserve-orm-pagination-expressions
19
- summary: Preserve expression-valued limit and offset when consuming ORM CollectionState.
20
- ---
21
-
22
- ## `expression-codec-on-return-type`
23
-
24
- 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.
25
-
26
- 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.
27
-
28
- ## `shared-preparable-envelope`
29
-
30
- 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.
31
-
32
- 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.
33
-
34
- ## `preserve-orm-pagination-expressions`
35
-
36
- 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.
37
-
38
- ## `preserve-prepared-reference-nullability`
39
-
40
- 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.
41
-
42
- ## `params-only-sql-facade-prepare`
43
-
44
- 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.
45
-
46
- 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.
47
-
48
- ```ts
49
- // Before
50
- const query = await db.prepare({ id: 'pg/int4@1' }, (sql, params) =>
51
- sql.public.users.select('id').where((f, fns) => fns.eq(f.id, params.id)).build(),
52
- );
53
-
54
- // After
55
- const query = await db.prepare({ id: 'pg/int4@1' }, (params) =>
56
- db.sql.public.users.select('id').where((f, fns) => fns.eq(f.id, params.id)).build(),
57
- );
58
- ```
59
-
60
- 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.
61
-
62
- ## `postgres-list-element-codecs-receive-raw-strings`
63
-
64
- Review PostgreSQL extension codecs whose descriptors can be used by `CodecRef.many` list columns. Inbound list framing is now target-owned: the target parses the Postgres array literal and invokes the scalar element codec for each non-null raw string element. Keep scalar direct-query compatibility as needed, but make the element `decode(wire, ctx)` accept the raw text spelling Postgres emits for that scalar value; the built-in numeric, boolean, integer, and float codecs accept both raw strings and native scalar wire values for this reason. Do not add a native-array fallback at the list-frame boundary, and do not add compatibility exports or codec-id aliases. `codecId`, `typeParams`, and emitted `CodecRef.many` shapes are unchanged.