Skip to content

Update to prisma-next@0.17.0 - #749

Open
wmadden wants to merge 1 commit into
cipherstash:mainfrom
wmadden:prisma-next-snapshot-store-layout
Open

Update to prisma-next@0.17.0#749
wmadden wants to merge 1 commit into
cipherstash:mainfrom
wmadden:prisma-next-snapshot-store-layout

Conversation

@wmadden

@wmadden wmadden commented Jul 21, 2026

Copy link
Copy Markdown

Upgrades the CipherStash Prisma Next extension to Prisma Next 0.17.0 — the release where the framework moved into prisma/prisma ("Prisma 8") and re-published as the consolidated @prisma/orm-* shells.

Follows the upstream 0.16→0.17 extension-author recipe.

packages/stack-prisma

  • Dependencies: @prisma-next/* (retired scope) → @prisma/orm-framework / @prisma/orm-family-sql / @prisma/orm-toolchain at 0.17.0, with @prisma/orm-target-postgres as a peer dependency per the recipe (prevents two copies of the target and split codec registries). @prisma-next/extension-author-tools dropped (now @internal, unpublished).
  • Imports: every specifier rewritten via the canonical internal→shell mapping (shells.ts in prisma/prisma).
  • Hashes: all committed hashes are bare hex (upstream strip-sha256-hash-prefixes codemod); contract snapshots moved into the content-addressed migrations/snapshots/<hex>/ store; extensionPacksextensions re-emitted the contract (storage hash efd408cf…0c0734ba…) and re-anchored all three migrations. The frozen 3.0.2 upgrade edge keeps its baked 3.0.2 SQL bytes — only its manifest (from/to/migrationHash) moved.
  • Emitted import specifiers fixed: pack meta declared @prisma-next/extension-cipherstash/* — a stale name 0.17 emits verbatim into consumer contract.d.ts, where it cannot resolve. Now declares the real published subpaths @cipherstash/stack-prisma/{codec-types,operation-types,runtime} (verified end-to-end via the example's regenerated contract).
  • Codec descriptors: converted to the Postgres target-descriptor protocol (postgresCodec with nativeType + identity jsonProjection — a v3 column is a domain over jsonb, so the stored EQL payload document is its own canonical JSON). Published through types.codecTypes.codecDescriptors on both the pack meta and the runtime descriptor (0.17 removed the meta channel and codecInstances slot).
  • Tests updated for the 0.17 surfaces (unified authoring type namespace / scalarColumnDescriptors, composedExtensions, readMigrationPackage options, re-pinned frozen migration hashes).

examples/prisma

Single-facade install: the only framework dependency is @prisma/orm-postgres@0.17.0, config uses the facade's defineConfig, migrations tree converted (root migrations/snapshots/ store shared by the app space and the vendored cipherstash space), vendored cipherstash artefacts refreshed, app contract re-emitted and its migration re-anchored, deleteCountdeleteAndCount.

Repo plumbing

  • stash CLI now detects 0.17 projects (prisma-next / any @prisma/orm-* dependency) alongside the legacy signals.
  • pnpm cooldown exclusions extended to @prisma/orm-* + prisma-next (first-party), with the supply-chain e2e test updated to match.
  • skills/stash-prisma documents the 0.17 surface; changeset included (major for @cipherstash/stack-prisma, patch for stash).

Verification

  • pnpm --filter @cipherstash/stack-prisma test — 345 passed (incl. frozen-migration, vendored-parity, PSL-interpretation suites)
  • pnpm --filter stash test — 1070 passed
  • typechecks green for stack-prisma and the example; full workspace build green; code:check clean; supply-chain e2e passed
  • ⚠️ not run here: the live/e2e suites needing a database or CS credentials

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for Prisma Next 0.17 and its updated package ecosystem.
    • Enabled PostgreSQL scalar-list capabilities and improved encrypted field type handling.
    • Added recognition for current Prisma project dependencies during database detection.
  • Documentation

    • Updated setup examples, runtime imports, configuration guidance, and migration documentation.
    • Documented the snapshot-based migration contract layout and extension registration.
  • Chores

    • Updated generated contracts, migration metadata, and example projects for the new release.

@changeset-bot

changeset-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: af34d02

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@cipherstash/stack-prisma Major
stash Major
@cipherstash/prisma-example Patch
@cipherstash/basic-example Patch
@cipherstash/e2e Patch
@cipherstash/stack Major
@cipherstash/stack-drizzle Major
@cipherstash/stack-supabase Major
@cipherstash/wizard Major
@cipherstash/bench Patch
@cipherstash/test-kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Prisma Next 0.17 support updates package dependencies and imports, configuration, generated contracts, migration hashes and layouts, codec descriptors, CLI detection, tests, examples, and documentation.

Prisma Next 0.17 upgrade

Layer / File(s) Summary
Package and configuration surface
packages/stack-prisma/..., examples/prisma/..., packages/cli/..., skills/...
Migrates Prisma package paths, dependencies, configuration, runtime imports, CLI detection, supply-chain exclusions, and guidance to the 0.17 surface.
Codec descriptor and runtime integration
packages/stack-prisma/src/extension-metadata/*, packages/stack-prisma/src/v3/*, packages/stack-prisma/src/contract.d.ts
Replaces codec instances with PostgreSQL codec descriptors and updates contract type inference, native type metadata, JSON projection, and extension metadata.
Generated contract and snapshot artifacts
examples/prisma/src/prisma/*, examples/prisma/migrations/snapshots/*, packages/stack-prisma/migrations/snapshots/*
Regenerates contract declarations and metadata with new hashes, storage column maps, capabilities, imports, encrypted types, and extensions metadata.
Migration and layout updates
examples/prisma/migrations/*, packages/stack-prisma/migrations/*
Updates migration imports and hashes and adopts content-addressed snapshot lookup.
Tests and migration validation
packages/stack-prisma/test/*, e2e/tests/*
Updates test imports and fixtures and validates descriptor protocols, authoring configuration, migration materialization, snapshot discovery, and vendored contract parity.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PrismaConfig
  participant PrismaGenerator
  participant ContractSnapshot
  participant CipherstashDescriptors
  PrismaConfig->>PrismaGenerator: defineConfig with contract, output, and extensions
  PrismaGenerator->>CipherstashDescriptors: load codecDescriptors
  PrismaGenerator->>ContractSnapshot: generate contract.json and contract.d.ts
  ContractSnapshot->>ContractSnapshot: store hashes and metadata under snapshots/<hex>
Loading

Possibly related PRs

  • cipherstash/stack#444: Updates overlapping Prisma integration, configuration, generated contracts, and CLI detection surfaces.
  • cipherstash/stack#655: Introduces related contract, migration snapshot, and EQL v3 artifacts.
  • cipherstash/stack#763: Updates related migration hashes, contract artifacts, and snapshot layout.

Suggested reviewers: coderdan

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: upgrading the Prisma integration to Prisma 8 RC1.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@wmadden
wmadden marked this pull request as ready for review July 21, 2026 14:32
@wmadden
wmadden requested a review from a team as a code owner July 21, 2026 14:32
@wmadden
wmadden marked this pull request as draft July 21, 2026 15:25
@coderdan

Copy link
Copy Markdown
Contributor

Thanks for this @wmadden! I see that Prisma Next 0.16 has just been published - should we update that in this PR, or would you suggest doing it separately?

…sh surface)

Prisma Next 0.17 retires the @prisma-next/* scope: the framework now
publishes as consolidated @prisma/orm-* shells plus the prisma-next bin
shim, and an application depends on exactly one database facade. This
upgrades the extension, the example app, and the CLI's project detection
to that surface, following the upstream 0.16-to-0.17 extension-author
recipe.

- Depend on @prisma/orm-{framework,family-sql,toolchain} 0.17.0, with
  @prisma/orm-target-postgres as a peer; rewrite every import to the
  shell subpaths (one-hop mapping from shells.ts).
- Strip the sha256: prefix from all committed hashes (upstream codemod)
  and move migration contract snapshots into the content-addressed
  migrations/snapshots/ store (upstream one-shot migrator) — this
  supersedes the hand-built layout from PR cipherstash#749; the 0.17 migrator
  converts the tree cleanly and re-verifies every migrationHash.
- Rename extensionPacks -> extensions, re-emit src/contract.{json,d.ts},
  and re-anchor the migration set (from/to hashes + recomputed
  migrationHash; the frozen 3.0.2 upgrade edge keeps its baked 3.0.2
  ops bytes).
- Declare the emitted type imports under the package's real published
  name (@cipherstash/stack-prisma/*) instead of the stale
  @prisma-next/extension-cipherstash/* names, which 0.17 emits verbatim
  into consumer contract.d.ts files.
- Publish the v3 codecs as Postgres target descriptors (postgresCodec
  with nativeType + identity jsonProjection) through
  types.codecTypes.codecDescriptors, replacing the deleted meta channel
  and codecInstances slot.
- Example app: single-facade install (@prisma/orm-postgres), facade
  defineConfig, converted migrations tree, refreshed vendored
  cipherstash space, deleteCount -> deleteAndCount.
- stash CLI: detect 0.17 projects (prisma-next / @prisma/orm-*).
- Cooldown exclusions, supply-chain test, stash-prisma skill, and docs
  updated; changeset included (major for @cipherstash/stack-prisma).

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>
@wmadden wmadden changed the title prisma-next: move migration contracts into the snapshots/ store layout Update to Prisma 8 RC1 Aug 5, 2026
@wmadden
wmadden marked this pull request as ready for review August 5, 2026 16:02
@wmadden-electric
wmadden-electric force-pushed the prisma-next-snapshot-store-layout branch from 1a40257 to af34d02 Compare August 5, 2026 16:03
@wmadden wmadden changed the title Update to Prisma 8 RC1 Update to prisma-next@0.17.0 Aug 5, 2026
@wmadden

wmadden commented Aug 5, 2026

Copy link
Copy Markdown
Author

@coderdan I updated this to 0.17.0, that should be everything you need :)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/stack-prisma/package.json (1)

26-58: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Add CommonJS targets to every public export.

This package uses "type": "module" and the public subpaths under exports expose only types and import. Add matching CJS build outputs with require entries so CommonJS consumers can import these subpaths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/stack-prisma/package.json` around lines 26 - 58, Update every public
subpath in the package.json exports map—including codec-types, column-types,
control, operation-types, pack, runtime, stack, and v3—to include its
corresponding CommonJS build output via a require entry alongside the existing
types and import entries. Use the matching dist filename and preserve the
current ESM and type targets.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@examples/prisma/src/prisma/contract.d.ts`:
- Around line 4-14: Update the `@cipherstash/stack-prisma` package exports for the
codec-types and operation-types subpaths to include matching CommonJS require
entries alongside import, and add both subpaths to the package subpath
documentation table if they are public. Preserve the existing types and import
mappings.

In `@packages/stack-prisma/CHANGELOG.md`:
- Line 105: Restore the historical `@prisma-next/`* package names in the affected
pre-0.17 changelog entries, including the entries near d6d23be and the
additionally referenced lines, while preserving their original version guidance.
Update the Prisma ORM 0.17 release entry separately to document the new
`@prisma/orm-`* namespace.

In `@packages/stack-prisma/test/psl-interpretation.test.ts`:
- Around line 81-87: Update the composedExtensionContracts initialization in the
test to remove the type-erasing as unknown as Contract assertion by using
validation or a typed conversion; if the cast is necessary, add the
project-approved Biome suppression with a concise reason that contract JSON
cannot be typed at this boundary.

---

Outside diff comments:
In `@packages/stack-prisma/package.json`:
- Around line 26-58: Update every public subpath in the package.json exports
map—including codec-types, column-types, control, operation-types, pack,
runtime, stack, and v3—to include its corresponding CommonJS build output via a
require entry alongside the existing types and import entries. Use the matching
dist filename and preserve the current ESM and type targets.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e0d253a8-0d5a-4f51-a26b-18e8d084101e

📥 Commits

Reviewing files that changed from the base of the PR and between 970e759 and af34d02.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (78)
  • .changeset/prisma-next-0-17.md
  • e2e/tests/supply-chain.e2e.test.ts
  • examples/prisma/README.md
  • examples/prisma/migrations/app/20260714T2142_initial/end-contract.d.ts
  • examples/prisma/migrations/app/20260714T2142_initial/end-contract.json
  • examples/prisma/migrations/app/20260714T2142_initial/migration.json
  • examples/prisma/migrations/app/20260714T2142_initial/migration.ts
  • examples/prisma/migrations/cipherstash/20260601T0100_install_eql_v3_bundle/migration.json
  • examples/prisma/migrations/cipherstash/20260720T0000_upgrade_eql_v3_3_0_2/migration.json
  • examples/prisma/migrations/cipherstash/20260728T0000_upgrade_eql_v3_3_0_4/migration.json
  • examples/prisma/migrations/cipherstash/contract.d.ts
  • examples/prisma/migrations/cipherstash/refs/head.json
  • examples/prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.d.ts
  • examples/prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.json
  • examples/prisma/migrations/snapshots/f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7/contract.d.ts
  • examples/prisma/migrations/snapshots/f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7/contract.json
  • examples/prisma/package.json
  • examples/prisma/prisma-next.config.ts
  • examples/prisma/src/db.ts
  • examples/prisma/src/index.ts
  • examples/prisma/src/prisma/contract.d.ts
  • examples/prisma/src/prisma/contract.json
  • examples/prisma/test/e2e/mixed.e2e.test.ts
  • packages/cli/src/commands/db/detect.ts
  • packages/stack-prisma/CHANGELOG.md
  • packages/stack-prisma/DEVELOPING.md
  • packages/stack-prisma/README.md
  • packages/stack-prisma/integration/adapter.ts
  • packages/stack-prisma/integration/json-adapter.ts
  • packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/migration.json
  • packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/migration.ts
  • packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.json
  • packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.ts
  • packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.json
  • packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.ts
  • packages/stack-prisma/migrations/refs/head.json
  • packages/stack-prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.d.ts
  • packages/stack-prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.json
  • packages/stack-prisma/package.json
  • packages/stack-prisma/prisma-next.config.ts
  • packages/stack-prisma/src/contract-authoring.ts
  • packages/stack-prisma/src/contract.d.ts
  • packages/stack-prisma/src/contract.json
  • packages/stack-prisma/src/contract.prisma
  • packages/stack-prisma/src/execution/abort.ts
  • packages/stack-prisma/src/execution/decrypt-all.ts
  • packages/stack-prisma/src/execution/envelope-base.ts
  • packages/stack-prisma/src/execution/routing.ts
  • packages/stack-prisma/src/exports/codec-types.ts
  • packages/stack-prisma/src/exports/contract-space-typing.ts
  • packages/stack-prisma/src/exports/control.ts
  • packages/stack-prisma/src/exports/operation-types.ts
  • packages/stack-prisma/src/exports/pack.ts
  • packages/stack-prisma/src/extension-metadata/codec-metadata.ts
  • packages/stack-prisma/src/extension-metadata/descriptor-meta.ts
  • packages/stack-prisma/src/migration/cipherstash-codec-v3.ts
  • packages/stack-prisma/src/stack/from-stack-v3.ts
  • packages/stack-prisma/src/types/operation-types.ts
  • packages/stack-prisma/src/v3/bulk-encrypt-v3.ts
  • packages/stack-prisma/src/v3/codec-runtime-v3.ts
  • packages/stack-prisma/src/v3/derive-schemas-v3.ts
  • packages/stack-prisma/src/v3/operators-v3.ts
  • packages/stack-prisma/src/v3/query-term.ts
  • packages/stack-prisma/src/v3/runtime-v3.ts
  • packages/stack-prisma/test/abort.test.ts
  • packages/stack-prisma/test/bulk-encrypt-middleware.helpers.ts
  • packages/stack-prisma/test/descriptor.test.ts
  • packages/stack-prisma/test/live/helpers/harness.ts
  • packages/stack-prisma/test/psl-interpretation.test.ts
  • packages/stack-prisma/test/v3/bulk-encrypt-v3.test.ts
  • packages/stack-prisma/test/v3/codec-runtime-v3.test.ts
  • packages/stack-prisma/test/v3/migration-v3.test.ts
  • packages/stack-prisma/test/v3/operator-lowering-v3.helpers.ts
  • packages/stack-prisma/test/v3/properties.test.ts
  • packages/stack-prisma/test/v3/runtime-v3.test.ts
  • packages/stack-prisma/test/v3/vendored-space-parity.test.ts
  • pnpm-workspace.yaml
  • skills/stash-prisma/SKILL.md
💤 Files with no reviewable changes (3)
  • examples/prisma/migrations/cipherstash/contract.d.ts
  • examples/prisma/migrations/app/20260714T2142_initial/end-contract.d.ts
  • examples/prisma/migrations/app/20260714T2142_initial/end-contract.json

Comment on lines +4 to +14
import type { CodecTypes as CipherstashTypes } from '@cipherstash/stack-prisma/codec-types';
import type { QueryOperationTypes as CipherstashQueryOperationTypes } from '@cipherstash/stack-prisma/operation-types';
import type {
EncryptedBigInt,
EncryptedBoolean,
EncryptedDate,
EncryptedJson,
EncryptedNumber,
EncryptedString,
} from '@prisma-next/extension-cipherstash/runtime';
} from '@cipherstash/stack-prisma/runtime';
import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma/orm-postgres/adapter/operation-types';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify stack-prisma exports the subpaths that generated contracts import.
set -euo pipefail

echo "== exports map"
fd -t f 'package.json' packages/stack-prisma --max-depth 1 --exec jq '{name, version, exports}'

echo "== subpaths referenced by generated contracts and metadata"
rg -n --no-heading "`@cipherstash/stack-prisma/`[a-z-]+" -o \
  -g '!**/node_modules/**' -g '!pnpm-lock.yaml' \
  examples packages/stack-prisma | sort -u -t: -k3 | head -50

Repository: cipherstash/stack

Length of output: 1695


🏁 Script executed:

#!/bin/bash
# Check whether codec-types and operation-types exports have both ESM and CommonJS paths,
# and inspect the README subpath table for these exports.
set -euo pipefail

echo "== package.json exports for target subpaths"
jq '.exports["./codec-types"], .exports["./operation-types"]' packages/stack-prisma/package.json

echo
echo "== README stack-prisma subpath table context"
nl -ba packages/stack-prisma/README.md | sed -n '35,60p'

Repository: cipherstash/stack

Length of output: 450


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== package.json exports for target subpaths"
jq '.exports["./codec-types"], .exports["./operation-types"]' packages/stack-prisma/package.json

echo
echo "== README stack-prisma subpath table context"
nl -ba packages/stack-prisma/README.md | sed -n '35,60p'

Repository: cipherstash/stack

Length of output: 449


Add CommonJS entries for generated contract subpath exports.

./codec-types and ./operation-types are used by generated contracts, but the package exports only types plus import; they miss the required require entry for CommonJS consumers. Add matching require paths and document both subpaths in the @cipherstash/stack-prisma subpath table if they are public.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/prisma/src/prisma/contract.d.ts` around lines 4 - 14, Update the
`@cipherstash/stack-prisma` package exports for the codec-types and
operation-types subpaths to include matching CommonJS require entries alongside
import, and add both subpaths to the package subpath documentation table if they
are public. Preserve the existing types and import mappings.

Source: Coding guidelines

- 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.

- 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.
- 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep historical package names in released changelog entries.

These entries describe releases before this Prisma ORM 0.17 namespace migration. Replacing @prisma-next/* with @prisma/orm-* makes the historical dependency guidance inaccurate. Line 790 also conflicts with the unchanged @prisma-next/sql-runtime@0.8 reference on Line 792. Restore the original names in historical entries. Document the new namespace in the 0.17 release entry.

Also applies to: 116-116, 285-285, 706-706, 790-790

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/stack-prisma/CHANGELOG.md` at line 105, Restore the historical
`@prisma-next/`* package names in the affected pre-0.17 changelog entries,
including the entries near d6d23be and the additionally referenced lines, while
preserving their original version guidance. Update the Prisma ORM 0.17 release
entry separately to document the new `@prisma/orm-`* namespace.

Comment on lines 81 to +87
composedExtensionContracts: new Map([
[
cipherstashControl.id,
cipherstashControl.contractSpace!.contractJson as unknown as Contract,
],
]),
authoringContributions: { type: cipherstashPack.authoring.type, field: {} },
authoringContributions: { type: authoringTypes, field: {} },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Document or remove the type-erasing assertion.

Line 84 uses as unknown as Contract without the required documented Biome suppression. Add the project-approved suppression with the reason that this contract JSON cannot be typed at this boundary, or replace the cast with validation or a typed conversion.

As per coding guidelines, source code must not use type-erasing assertions unless a deliberate case is documented with a Biome suppression.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/stack-prisma/test/psl-interpretation.test.ts` around lines 81 - 87,
Update the composedExtensionContracts initialization in the test to remove the
type-erasing as unknown as Contract assertion by using validation or a typed
conversion; if the cast is necessary, add the project-approved Biome suppression
with a concise reason that contract JSON cannot be typed at this boundary.

Source: Coding guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants