@prisma/orm-mongo 8.0.0-rc.5-dev.3 → 8.0.0-rc.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.5-dev.3",
3
+ "version": "8.0.0-rc.6",
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.5-dev.3",
14
- "@prisma/orm-framework": "8.0.0-rc.5-dev.3",
15
- "@prisma/orm-target-mongo": "8.0.0-rc.5-dev.3",
16
- "@prisma/orm-toolchain": "8.0.0-rc.5-dev.3",
13
+ "@prisma/orm-family-mongo": "8.0.0-rc.6",
14
+ "@prisma/orm-framework": "8.0.0-rc.6",
15
+ "@prisma/orm-target-mongo": "8.0.0-rc.6",
16
+ "@prisma/orm-toolchain": "8.0.0-rc.6",
17
17
  "pathe": "^2.0.3"
18
18
  },
19
19
  "devDependencies": {
20
- "@internal/mongo": "8.0.0-rc.5-dev.3",
21
- "@repo/tsconfig": "8.0.0-rc.5-dev.3",
22
- "@repo/tsdown": "8.0.0-rc.5-dev.3",
20
+ "@internal/mongo": "8.0.0-rc.6",
21
+ "@repo/tsconfig": "8.0.0-rc.6",
22
+ "@repo/tsdown": "8.0.0-rc.6",
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.5-dev.3'
20
+ library_version: '8.0.0-rc.6'
21
21
  ---
22
22
 
23
23
  # Prisma Next (Prisma 8)
@@ -105,40 +105,32 @@ changes:
105
105
  regex:
106
106
  - "(Date|Timestamp|Timestamptz|Time)(\\([0-9]+\\))?\\s+@default\\(\""
107
107
  anyMatch: true
108
-
108
+ - id: orm-init-no-longer-installs-agent-skills
109
+ summary: |
110
+ `prisma orm init` no longer installs agent skills: the GitHub fetch (`npx skills add`)
111
+ is removed and nothing inside `orm init` replaces it. Agent-skills setup belongs to the
112
+ family-level `prisma init` command. The `--skip-skills` flag is removed with the
113
+ behavior it opted out of. Existing projects keep whatever skills they already have;
114
+ only scripts that invoke `orm init` and expect it to deliver skills (or pass
115
+ `--skip-skills`) need to change.
116
+ detection:
117
+ glob: "**/*.{sh,yml,yaml,json,md}"
118
+ regex:
119
+ - '\borm\s+init\b'
120
+ anyMatch: true
121
+ - id: contract-artifacts-restamp
122
+ summary: |
123
+ The emitted `contract.json` / `contract.d.ts` embed the toolchain version, which moves
124
+ to 8.0.0-rc.6. Run `contract emit` once after upgrading so the emitted artifacts match
125
+ the installed toolchain. The restamp is independent of the other changes in this
126
+ release.
127
+ detection:
128
+ glob: "**/contract.json"
129
+ contains:
130
+ - '"version": "8.0.0-rc.5"'
109
131
  ---
110
132
 
111
- # 8.0.0-rc.4 → 8.0.0-rc.5 — User upgrade instructions
112
-
113
- ## `attach-pg-client-error-listener`
114
-
115
- Walk every file matched by `detection.glob`. For each `pg.Client` or `pg.Pool` your code constructs and uses directly (not one handed to `postgres({ pg: ... })` / `supabase({ pg: ... })` — the runtime covers those since rc.5), attach an `'error'` listener right after construction, before `connect()`:
116
-
117
- ```ts
118
- const client = new pg.Client({ connectionString });
119
- client.on('error', () => {});
120
- await client.connect();
121
- ```
122
-
123
- A no-op listener is enough: connect and query failures still reject their own promises, so nothing real is masked — the listener only stops a dropped idle connection from becoming an uncaught exception. If the handle is long-lived and you have a logging channel, log the error instead of discarding it.
124
-
125
- Note that a surrounding `try/catch` does **not** cover this case — the `'error'` event is emitted on the client object asynchronously, outside any promise chain the `catch` can see.
126
-
127
- # 8.0.0-rc.4 → 8.0.0-rc.5 — User upgrade instructions
128
-
129
- ## `attach-pg-client-error-listener`
130
-
131
- Walk every file matched by `detection.glob`. For each `pg.Client` or `pg.Pool` your code constructs and uses directly (not one handed to `postgres({ pg: ... })` / `supabase({ pg: ... })` — the runtime covers those since rc.5), attach an `'error'` listener right after construction, before `connect()`:
132
-
133
- ```ts
134
- const client = new pg.Client({ connectionString });
135
- client.on('error', () => {});
136
- await client.connect();
137
- ```
138
-
139
- A no-op listener is enough: connect and query failures still reject their own promises, so nothing real is masked — the listener only stops a dropped idle connection from becoming an uncaught exception. If the handle is long-lived and you have a logging channel, log the error instead of discarding it.
140
-
141
- Note that a surrounding `try/catch` does **not** cover this case — the `'error'` event is emitted on the client object asynchronously, outside any promise chain the `catch` can see.
133
+ # 8.0.0-rc.5 → 8.0.0-rc.6 — User upgrade instructions
142
134
 
143
135
  # PostgreSQL temporal representations
144
136
 
@@ -153,4 +145,13 @@ naming the `*String` type that reads the same column losslessly. And a nested re
153
145
  text a flat read does, because temporal expressions are cast to `text` before PostgreSQL builds the
154
146
  JSON, which means both reflect the session `TimeZone`.
155
147
 
148
+ ## `orm-init-no-longer-installs-agent-skills`
149
+
150
+ Nothing to change in an existing project: skills already on disk stay as they are. Walk every `orm init` invocation the detection finds (a mention in prose that is not a command needs no action):
151
+
152
+ - An invocation passing `--skip-skills`: drop the flag — it no longer exists and the invocation fails with an unknown-flag error. The behavior it opted out of is gone, so the flagless invocation is the equivalent.
153
+ - A plain invocation with no flag: the scaffold itself is unchanged, but it no longer installs agent skills. If the script (or the person following it) relied on that, run `prisma init` in the project afterwards; that command owns skills setup now. If skills were incidental, no change is needed.
154
+
155
+ ## `contract-artifacts-restamp`
156
156
 
157
+ For every `contract.json` matched by `detection`, run the project's emit command (`prisma contract emit`, or the project's `contract:emit` script) once after upgrading. The only expected diff is the embedded `version` moving to `8.0.0-rc.6`.
@@ -69,112 +69,20 @@ changes:
69
69
  regex:
70
70
  - "pg/(date|timestamp|timestamptz|time)-temporal@1"
71
71
  anyMatch: true
72
-
72
+ - id: contract-space-restamp
73
+ summary: |
74
+ The emitted contract artifacts embed the toolchain version, which moves to 8.0.0-rc.6.
75
+ Rebuild the extension's contract space (the package's `build:contract-space` script)
76
+ once after upgrading so the emitted artifacts match the installed toolchain. The
77
+ toolchain also re-released against `@prisma/cli-engine@0.2.2` (a CLI-side fix with no
78
+ extension-facing surface).
79
+ detection:
80
+ glob: "**/contract.json"
81
+ contains:
82
+ - '"version": "8.0.0-rc.5"'
73
83
  ---
74
84
 
75
- # 8.0.0-rc.4 → 8.0.0-rc.5 — Extension author upgrade instructions
76
-
77
- ## `wrap-pg-constructions-with-suppress-idle-connection-errors`
78
-
79
- Walk every file matched by `detection.glob`. For each pg `Pool` or `Client` the extension constructs, wrap the construction:
80
-
81
- ```ts
82
- import { suppressIdleConnectionErrors } from '@internal/driver-postgres/runtime';
83
-
84
- const pool = suppressIdleConnectionErrors(
85
- new Pool({ connectionString: options.url }),
86
- );
87
- ```
88
-
89
- This is the same translation applied to the in-repo `@internal/postgres` and `@internal/extension-supabase` runtimes in this transition. The helper only attaches a no-op `'error'` listener (connect/query failures still reject their own promises), so behavior is otherwise unchanged; without it, a dropped idle connection crashes the process that hosts the extension.
90
-
91
- If your extension's test suite fakes the `pg` module, the fakes need an `on` method (`on = vi.fn().mockReturnThis()` on a class fake, or `on: vi.fn()` on an object literal) — the runtime now calls `.on('error', ...)` on every pool, client, and checked-out pool client.
92
- ## `distinct-on-requires-postgres-capability`
93
-
94
- `Collection#distinctOn(...)` used to compile and run on any target, but only Postgres ever
95
- rendered its `DISTINCT ON` clause — a call on any other target (SQLite) compiled clean and
96
- silently returned undeduped rows at runtime. The method now carries the same capability gate the
97
- sql-builder lane already enforces: its parameter type narrows to `never` unless the contract
98
- declares `postgres.distinctOn`, so the same call is a compile error on a contract that lacks it,
99
- and a runtime error carrying `ORM.CAPABILITY_MISSING` if reached dynamically (e.g. through a
100
- hand-built `CollectionState`).
101
-
102
- Find every `.distinctOn(...)` call your code makes on a `Collection` and check whether the
103
- contract it runs against declares `postgres.distinctOn`. If it does, nothing changes — the call
104
- already worked correctly and keeps compiling. If it does not, the call was already producing the
105
- wrong result set; either move the collection onto a Postgres-capable contract, or remove the
106
- `.distinctOn(...)` call and accept the undeduped rows it was silently returning before.
107
-
108
- `Collection#distinct(...)` is unaffected — it lowers to a portable `ROW_NUMBER` dedup and needs
109
- no capability, on any target.
110
-
111
- ## `groupby-pre-group-pagination-now-scopes-rows`
112
-
113
- Any `.take(...)`, `.skip(...)`, `.cursor(...)`, `.distinct(...)`, `.distinctOn(...)`, or
114
- `.orderBy(...)` your extension calls *before* `.groupBy(...)` on a `Collection` used to be
115
- silently dropped once `.groupBy(...)` joined the chain — the aggregate reduced over every
116
- matching row, ignoring the pagination clause entirely. It now scopes the rows that get grouped,
117
- the same way root `.aggregate()` scopes its rows (see the sibling entry for that fix, already
118
- shipped in `8.0.0-rc.4` → `8.0.0-rc.5`'s predecessor window).
119
-
120
- There is no detection regex for this one worth writing: the call sites that need re-checking
121
- look identical, in source, to the call sites that already worked correctly (a chain built with
122
- this scoping in mind, versus one that assumed the pagination clause was a no-op). Grep for
123
- `.groupBy(` and read every match with a pre-group pagination clause; if the test asserting its
124
- result seeds fewer distinct groups than pagination scope allows, or asserts totals computed over
125
- every row rather than the paginated window, the expected values need updating to match the now-
126
- correct behavior.
127
-
128
- ## `groupby-post-group-pagination-requires-order-by`
129
-
130
- `GroupedCollection` (what `.groupBy(...)` returns) gained `take()`, `skip()`, and `orderBy()`,
131
- which page the *grouped* rows when written after `.groupBy(...)` — previously `.groupBy(...)` had
132
- no chain of its own past `.having(...)`. Calling post-group `take()` or `skip()` without a prior
133
- post-group `orderBy()` is a compile error: the parameter type narrows to `never`, because a
134
- database may return groups in any order and "the first n groups" has no defined meaning without
135
- one.
136
-
137
- If your extension's own code (or its test suite) calls `.groupBy(...).take(...)` or
138
- `.groupBy(...).skip(...)` with no `.orderBy(...)` between them, it will fail to compile after this
139
- upgrade. There is no default ordering to insert automatically — add an `.orderBy(...)` naming one
140
- of the fields you passed to `groupBy(...)` (ascending or descending is your call; whichever
141
- matches what "the first n groups" should mean for that query) before the `take()` / `skip()` call.
142
-
143
- # 8.0.0-rc.4 → 8.0.0-rc.5 — Extension author upgrade instructions
144
-
145
- ## `wrap-pg-constructions-with-suppress-idle-connection-errors`
146
-
147
- Walk every file matched by `detection.glob`. For each pg `Pool` or `Client` the extension constructs, wrap the construction:
148
-
149
- ```ts
150
- import { suppressIdleConnectionErrors } from '@internal/driver-postgres/runtime';
151
-
152
- const pool = suppressIdleConnectionErrors(
153
- new Pool({ connectionString: options.url }),
154
- );
155
- ```
156
-
157
- This is the same translation applied to the in-repo `@internal/postgres` and `@internal/extension-supabase` runtimes in this transition. The helper only attaches a no-op `'error'` listener (connect/query failures still reject their own promises), so behavior is otherwise unchanged; without it, a dropped idle connection crashes the process that hosts the extension.
158
-
159
- If your extension's test suite fakes the `pg` module, the fakes need an `on` method (`on = vi.fn().mockReturnThis()` on a class fake, or `on: vi.fn()` on an object literal) — the runtime now calls `.on('error', ...)` on every pool, client, and checked-out pool client.
160
- ## `distinct-on-requires-postgres-capability`
161
-
162
- `Collection#distinctOn(...)` used to compile and run on any target, but only Postgres ever
163
- rendered its `DISTINCT ON` clause — a call on any other target (SQLite) compiled clean and
164
- silently returned undeduped rows at runtime. The method now carries the same capability gate the
165
- sql-builder lane already enforces: its parameter type narrows to `never` unless the contract
166
- declares `postgres.distinctOn`, so the same call is a compile error on a contract that lacks it,
167
- and a runtime error carrying `ORM.CAPABILITY_MISSING` if reached dynamically (e.g. through a
168
- hand-built `CollectionState`).
169
-
170
- Find every `.distinctOn(...)` call your code makes on a `Collection` and check whether the
171
- contract it runs against declares `postgres.distinctOn`. If it does, nothing changes — the call
172
- already worked correctly and keeps compiling. If it does not, the call was already producing the
173
- wrong result set; either move the collection onto a Postgres-capable contract, or remove the
174
- `.distinctOn(...)` call and accept the undeduped rows it was silently returning before.
175
-
176
- `Collection#distinct(...)` is unaffected — it lowers to a portable `ROW_NUMBER` dedup and needs
177
- no capability, on any target.
85
+ # 8.0.0-rc.5 → 8.0.0-rc.6 — Extension author upgrade instructions
178
86
 
179
87
  # PostgreSQL temporal representations, for extension authors
180
88
 
@@ -189,4 +97,6 @@ that reads them losslessly. The driver hands temporal OIDs through as server tex
189
97
  building a `Date`. And temporal expressions are cast to `text` before PostgreSQL builds JSON, so a
190
98
  nested read returns the same text a flat one does.
191
99
 
100
+ ## `contract-space-restamp`
192
101
 
102
+ For every `contract.json` matched by `detection`, run the extension package's `build:contract-space` script (or its emit command) once after upgrading. Beyond the temporal changes above, the only expected diff is the embedded `version` moving to `8.0.0-rc.6`. The toolchain also re-released against `@prisma/cli-engine@0.2.2`; that change has no extension-facing surface.