@prisma/orm-mongo 8.0.0-rc.8-dev.18 → 8.0.0-rc.8-dev.19

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.8-dev.18",
3
+ "version": "8.0.0-rc.8-dev.19",
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.8-dev.18",
14
- "@prisma/orm-framework": "8.0.0-rc.8-dev.18",
15
- "@prisma/orm-target-mongo": "8.0.0-rc.8-dev.18",
16
- "@prisma/orm-toolchain": "8.0.0-rc.8-dev.18",
13
+ "@prisma/orm-family-mongo": "8.0.0-rc.8-dev.19",
14
+ "@prisma/orm-framework": "8.0.0-rc.8-dev.19",
15
+ "@prisma/orm-target-mongo": "8.0.0-rc.8-dev.19",
16
+ "@prisma/orm-toolchain": "8.0.0-rc.8-dev.19",
17
17
  "pathe": "^2.0.3"
18
18
  },
19
19
  "devDependencies": {
20
- "@internal/mongo": "8.0.0-rc.8-dev.18",
21
- "@repo/tsconfig": "8.0.0-rc.8-dev.18",
22
- "@repo/tsdown": "8.0.0-rc.8-dev.18",
20
+ "@internal/mongo": "8.0.0-rc.8-dev.19",
21
+ "@repo/tsconfig": "8.0.0-rc.8-dev.19",
22
+ "@repo/tsdown": "8.0.0-rc.8-dev.19",
23
23
  "tsdown": "0.22.14",
24
24
  "typescript": "5.9.3"
25
25
  },
@@ -17,7 +17,7 @@ description: >-
17
17
  (schema.prisma + @prisma/client projects).
18
18
  metadata:
19
19
  library: '@prisma/orm-mongo'
20
- library_version: '8.0.0-rc.8-dev.18'
20
+ library_version: '8.0.0-rc.8-dev.19'
21
21
  ---
22
22
 
23
23
  # Prisma Next (Prisma 8)
@@ -22,6 +22,13 @@ changes:
22
22
  - id: namespace-qualify-sql-orm-filter-types
23
23
  summary: |
24
24
  SQL ORM reusable filter types now require the domain namespace before the model name: `<Contract, Namespace, Model>`.
25
+ - id: mongo-unlowered-attributes-are-rejected
26
+ summary: |
27
+ MongoDB Prisma schema files must not carry `@default(...)`, `@updatedAt`, or `@db.*` attributes; the Mongo interpreter never lowered them and now rejects them.
28
+ detection:
29
+ glob: "**/*.prisma"
30
+ matches:
31
+ - '@(?:default\(|updatedAt\b|db\.)'
25
32
  ---
26
33
 
27
34
  # 8.0.0-rc.8 → 8.0.0-rc.9 — User upgrade instructions
@@ -41,3 +48,9 @@ Review queries that order text-backed enum columns and rely on declaration order
41
48
  ## `namespace-qualify-sql-orm-filter-types`
42
49
 
43
50
  Find TypeScript references to `ShorthandWhereFilter`, `RelationPredicate`, `RelationPredicateInput`, and `RelationFilterAccessor`. Add the model's domain namespace as the second generic argument and place the model name third. Rewrite `ShorthandWhereFilter<Contract, Model>` as `ShorthandWhereFilter<Contract, Namespace, Model>` and `ShorthandWhereFilter<Contract, Model, Namespace>` as `ShorthandWhereFilter<Contract, Namespace, Model>`. Rewrite the relation types from `<Contract, Model>` to `<Contract, Namespace, Model>`. Use the namespace facet through which the model is queried, such as `'public'` for `db.public.User`.
51
+
52
+ ## `mongo-unlowered-attributes-are-rejected`
53
+
54
+ First, before editing any schema, determine whether the project targets MongoDB: its `prisma.config.ts` imports `@prisma/orm-mongo`, or its `package.json` depends on that package. If neither holds, skip this change entirely and leave every schema untouched. The `detection` pattern also matches SQL schemas, where `@default(...)` and `@db.<Type>` are supported and deleting them breaks the contract.
55
+
56
+ For every matched MongoDB schema, delete each `@default(...)`, `@updatedAt`, and `@db.<Type>` attribute from the field that carries it, leaving the field's type and its other attributes in place. For example, change `status ProductStatus @default(Active)` to `status ProductStatus` and `updatedAt DateTime @updatedAt` to `updatedAt DateTime`. The Mongo interpreter never lowered these attributes into the contract, so the emitted `contract.json` does not change; defaults and timestamps stay the responsibility of application code, as they already were. `prisma contract emit` now fails with `PSL_UNSUPPORTED_FIELD_ATTRIBUTE` while any of them remain.