You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The Mongo TypeScript contract builder keeps its own enum encoding and storage hashing #30465
What a maintainer sees. The Mongo PSL interpreter and the Prisma 6 MongoDB schema reader both build storage with buildMongoStorage in @internal/mongo-contract. The TypeScript contract builder does not: it encodes enums and computes the storage hash with its own code. A change to how Mongo storage is built has to be made twice, and the two copies can drift, which is one cause of PSL- and TypeScript-authored contracts hashing differently.
Where.packages/2-mongo-family/2-authoring/contract-ts/src/contract-builder.ts (enum encoding and the computeStorageHash call) against packages/2-mongo-family/1-foundation/mongo-contract/src/build-mongo-storage.ts.
Likely fix. Move the TypeScript builder onto buildMongoStorage, as part of the fix for PSL and TypeScript storage hashes differing.
Where it came from.#30405 unified the PSL interpreter and the Prisma 6 reader on buildMongoStorage and left the TypeScript builder as it was.
Activity