Skip to content

Commit e69da21

Browse files
fix: address CodeRabbit review on the 0.17 upgrade
- Restore the pre-0.17 package names in historical CHANGELOG entries — release notes describe the dependencies of their own release, and the 0.17 rename lands via the changeset, not by rewriting history. - Drop the 'as unknown as Contract' assertion in the PSL interpretation test: on 0.17 the descriptor's contractJson is directly assignable to the interpreter's composedExtensionContracts map, so the cast (and the Contract import) were dead weight. - Document the ./codec-types and ./operation-types subpaths in the README export table — generated contract.d.ts files import them, so they are public surface. No require entries added: the package (like the whole @prisma/orm-* 0.17 surface it plugs into) is ESM-only, and was before this PR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
1 parent b566ccf commit e69da21

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

‎packages/stack-prisma/CHANGELOG.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
- Every v3 codec id registers a control-plane `expandNativeType` hook that strips the `public.` qualifier — `prisma-next migration plan` now renders `CREATE TABLE` columns as bare domain names (`eql_v3_bigint_ord`), matching what introspection reports, with **no `add_search_config` ops** (v3 domains carry their own index metadata). No `onFieldEvent` is registered for v3.
103103
- The v3 bundle baseline migration op is reclassified `data` (it is a contract-shape-neutral self-edge; the aggregate integrity checker rejects self-edges without a data-class op), unblocking `prisma-next migration plan` / `migrate` in consuming apps.
104104

105-
- d6d23be: Upgrade to Prisma Next 0.14.0 (from 0.8.0). Every `@prisma/orm-*` dependency is now pinned at 0.14.0; consuming apps must run Prisma Next 0.14 to use this release.
105+
- d6d23be: Upgrade to Prisma Next 0.14.0 (from 0.8.0). Every `@prisma-next/*` dependency is now pinned at 0.14.0; consuming apps must run Prisma Next 0.14 to use this release.
106106

107107
Highlights of the upgrade:
108108

@@ -113,7 +113,7 @@
113113

114114
- b7fa61f: Upgrade the Prisma Next integration to Prisma Next 0.16.
115115

116-
All `@prisma/orm-*` dependencies move from `0.14.0` to `0.16.0`, in lockstep. The
116+
All `@prisma-next/*` dependencies move from `0.14.0` to `0.16.0`, in lockstep. The
117117
CipherStash encryption surface is unchanged — column types, envelopes, the `eql*`
118118
operators, `cipherstashFromStack`, and every subpath export behave exactly as before.
119119

@@ -282,7 +282,7 @@ not a function`. The bundled `stash-prisma` skill documents this too.
282282
- d2772b0: Renamed `@cipherstash/prisma-next` to **`@cipherstash/stack-prisma`** (#842),
283283
matching the `@cipherstash/stack-drizzle` / `@cipherstash/stack-supabase`
284284
adapter naming. Only the npm name changes: the `prisma-next` CLI,
285-
`prisma-next.config.ts`, and the `@prisma/orm-*` framework packages are the
285+
`prisma-next.config.ts`, and the `@prisma-next/*` framework packages are the
286286
Prisma Next framework's own surface and keep their names. Update imports
287287
(`@cipherstash/prisma-next/stack` → `@cipherstash/stack-prisma/stack`, and the
288288
other subpaths likewise) and the `extensionPacks` import in
@@ -703,7 +703,7 @@ not a function`. The bundled `stash-prisma` skill documents this too.
703703

704704
### Minor Changes
705705

706-
- d6d23be: Upgrade to Prisma Next 0.14.0 (from 0.8.0). Every `@prisma/orm-*` dependency is now pinned at 0.14.0; consuming apps must run Prisma Next 0.14 to use this release.
706+
- d6d23be: Upgrade to Prisma Next 0.14.0 (from 0.8.0). Every `@prisma-next/*` dependency is now pinned at 0.14.0; consuming apps must run Prisma Next 0.14 to use this release.
707707

708708
Highlights of the upgrade:
709709

@@ -787,7 +787,7 @@ not a function`. The bundled `stash-prisma` skill documents this too.
787787

788788
### Minor Changes
789789

790-
- f2aca22: Upgrade `@prisma/orm-*` peer/runtime stack from `0.6.0-dev.8` to `0.8.0`.
790+
- f2aca22: Upgrade `@prisma-next/*` peer/runtime stack from `0.6.0-dev.8` to `0.8.0`.
791791

792792
`@prisma-next/sql-runtime@0.8` reordered the SQL execution pipeline so the `beforeExecute` middleware chain fires _before_ `encodeParams`. `bulkEncryptMiddleware` now mutates params via `replaceValues(...)` ahead of encode, which means `CipherstashCellCodec.encode` is invoked with the wire-format string rather than the original `EncryptedEnvelopeBase`. The cell codec now short-circuits string values through unchanged; the envelope path is preserved for direct (non-runtime) callers such as the codec unit tests.
793793

‎packages/stack-prisma/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ See the [full documentation](https://cipherstash.com/docs/stack/cipherstash/encr
108108
| `./runtime` | Envelope classes + `CipherstashSdk` + v3 codec runtime + `decryptAll` + `bulkEncryptMiddlewareV3` |
109109
| `./pack` | `cipherstashPackMeta` for TS contract authoring |
110110
| `./column-types` | The v3 domain factories: `text` / `textSearch` / `integerOrd` / `bigIntOrd` / `date` / `boolean` / `json` / … |
111+
| `./codec-types` | `CodecTypes` — the codec-id-keyed type map generated `contract.d.ts` files import |
112+
| `./operation-types` | `QueryOperationTypes` — the `eql*` operator type surface generated `contract.d.ts` files import |
111113

112114
`./control` and `./runtime` are tree-shakable. `./stack` sits on top of `./runtime` and additionally pulls in `@cipherstash/stack`; consumers who implement `CipherstashSdk` against a different KMS skip `./stack` and pay no `@cipherstash/stack` bundle cost.
113115

‎packages/stack-prisma/test/psl-interpretation.test.ts‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import { interpretPslDocumentToSqlContract } from '@prisma/orm-family-sql/contract-psl'
1717
import type { AuthoringTypeNamespace } from '@prisma/orm-framework/components/authoring'
1818
import { collectScalarTypeConstructors } from '@prisma/orm-framework/components/authoring'
19-
import type { Contract } from '@prisma/orm-framework/contract/types'
2019
import { buildSymbolTable } from '@prisma/orm-framework/psl-parser'
2120
import { parse } from '@prisma/orm-framework/psl-parser/syntax'
2221
import { postgresCreateNamespace } from '@prisma/orm-target-postgres/target/types'
@@ -79,10 +78,7 @@ function interpret(schema: string) {
7978
),
8079
composedExtensions: [cipherstashControl.id],
8180
composedExtensionContracts: new Map([
82-
[
83-
cipherstashControl.id,
84-
cipherstashControl.contractSpace!.contractJson as unknown as Contract,
85-
],
81+
[cipherstashControl.id, cipherstashControl.contractSpace!.contractJson],
8682
]),
8783
authoringContributions: { type: authoringTypes, field: {} },
8884
createNamespace: postgresCreateNamespace,

0 commit comments

Comments
 (0)