@prisma/orm-mongo 8.0.0-rc.18-dev.5 → 8.0.0-rc.18-dev.6

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.18-dev.5",
3
+ "version": "8.0.0-rc.18-dev.6",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -10,18 +10,18 @@
10
10
  "skills"
11
11
  ],
12
12
  "dependencies": {
13
- "@prisma/orm-family-mongo": "8.0.0-rc.18-dev.5",
14
- "@prisma/orm-framework": "8.0.0-rc.18-dev.5",
15
- "@prisma/orm-target-mongo": "8.0.0-rc.18-dev.5",
16
- "@prisma/orm-toolchain": "8.0.0-rc.18-dev.5",
13
+ "@prisma/orm-family-mongo": "8.0.0-rc.18-dev.6",
14
+ "@prisma/orm-framework": "8.0.0-rc.18-dev.6",
15
+ "@prisma/orm-target-mongo": "8.0.0-rc.18-dev.6",
16
+ "@prisma/orm-toolchain": "8.0.0-rc.18-dev.6",
17
17
  "mongodb-connection-string-url": "^7.0.1",
18
18
  "pathe": "^2.0.3",
19
19
  "tinyglobby": "^0.2.17"
20
20
  },
21
21
  "devDependencies": {
22
- "@internal/mongo": "8.0.0-rc.18-dev.5",
23
- "@repo/tsconfig": "8.0.0-rc.18-dev.5",
24
- "@repo/tsdown": "8.0.0-rc.18-dev.5",
22
+ "@internal/mongo": "8.0.0-rc.18-dev.6",
23
+ "@repo/tsconfig": "8.0.0-rc.18-dev.6",
24
+ "@repo/tsdown": "8.0.0-rc.18-dev.6",
25
25
  "tsdown": "0.22.14",
26
26
  "typescript": "5.9.3"
27
27
  },
@@ -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.18-dev.5'
18
+ library_version: '8.0.0-rc.18-dev.6'
19
19
  version: '2026-09-12'
20
20
  ---
21
21
 
@@ -176,6 +176,7 @@ The concept: the runtime runs every statement and every transaction as an **acti
176
176
 
177
177
  - Lifecycle events, for every activity: `activityStarted(activity, ctx)`, `activityEnded(activity, result, ctx)` and `activityFinalized(activity, result, ctx)`. Check `activity.kind` (`'statement'` or `'transaction'`) at the top. `activityEnded` fires when the act ends: for a statement with `result.outcome` (`'succeeded'`, `'failed'`, or `'stopped'` when the caller stopped reading), `result.latencyMs`, `result.source` (`'driver'`, or `'middleware'` for a cache hit) and `result.rowCount` or `result.stats` according to `result.returns`. `activityFinalized` fires once the effects are final, with `result.outcome` `'committed'`, `'rolled-back'` or `'unknown'`: right after the end outside a transaction, and when the transaction ends inside one. Every statement that started is finalized, even one blocked before it ran.
178
178
  - Interceptors, for statements: `beforeEncode(plan, ctx, params)` before parameters are encoded (throw to block the statement), `intercept.onQuery` / `intercept.onExecute` to supply a result instead of running it, and `onRow(row, plan, ctx)` for each driver row.
179
+ - Client activities: a client library can start an activity of its own kind, which contains a hyphen, such as `orm-call`, and send its statements beneath it. A middleware sees it through the same lifecycle events, with `activity.kind` set to that kind and `ctx.parent` of its statements pointing at it, and can supply its result through `intercept.onActivity(activity, ctx)`. Outside a transaction it is finalized right after it ends; inside one, when the transaction ends, after its statements. No built-in client starts one yet, so a middleware that handles only `'statement'` and `'transaction'` should ignore other kinds rather than fail on them.
179
180
 
180
181
  Every hook of one activity receives the same `ctx`. Keep per-statement state in `ctx.state(key)` (use a `Symbol()` key); `activity.id` identifies the activity, and `ctx.parent` is the enclosing transaction's context. There is no separate telemetry package — observe statements with `activityEnded`. The `SqlMiddleware` type comes from `@prisma/orm-postgres/family-runtime`. `examples/prisma-8-demo/src/prisma/slow-query-warning.ts` is the canonical example:
181
182