upgrading/extension/upgrades/0.15-to-0.16/instructions.md
upgrading/extension/upgrades/0.15-to-0.16/instructions.mdBrowse 76 files
3,610 tokens
14,822 bytes
Token encoding: o200k_base
Snapshot fac8604
← Back to SKILL.md
from: "0.15" to: "0.16" changes:
- id: extension-supabase-test-utils-export-removed
summary: |
@internal/extension-supabaseno longer exports the./test/utilssubpath (bootstrapSupabaseShim), and it is no longer a pattern to copy for extension test tooling. The import typechecked (types shipped indist), but the subpath never worked from npm — the shim reads fixture.sqlfiles that were never published, so every call failed with ENOENT before touching a database. Delete any import of@internal/extension-supabase/test/utils; keep hermetic test helpers package-internal (tests import them by source path) rather than publishing them as subpath exports whose on-disk fixtures don't ship. detection: glob: "**/*.{ts,mts,cts,js,mjs}" contains: - "extension-supabase/test/utils" anyMatch: true - id: identity-columns-need-explicit-default-under-strict-verify
summary: |
contract infernow emits@default(autoincrement())for a PostgresGENERATED ALWAYS AS IDENTITY/GENERATED BY DEFAULT AS IDENTITYcolumn (previously it emitted a bare column with no default, since Postgres reports nocolumn_defaultfor an identity column). Symmetrically,db verifyintrospecting a live identity column now resolves its default toautoincrement()too (previously it resolved to nothing). This only changesdb verify --strict— without--strict, an undeclared live default is tolerated either way (and it is fully tolerated regardless of strictness undercontrol: 'external', the posture most extension packs declare). If your pack's own tests rundb verify --strictagainst a table with an identity column whose contract does not declare@default(autoincrement()), verify now reports that default as an unexpected extra. Re-runcontract inferfor the affected table, or add@default(autoincrement())by hand. - id: pluralize-back-relation-names-no-longer-double-pluralize
summary: |
contract infer's back-relation field name generation used a hand-rolled pluralization rule that appendedesto any table name already ending ins/x/z/ch/sh, doubling an already-plural table name (sessions->sessionses).contract infernow uses real inflection (thepluralizelibrary) and produces the correct name (sessionsstayssessions; a genuinely singularstatusstill becomesstatuses). This only affects a futurecontract inferrun — an already-generated.prismafile is untouched, so nothing breaks until you next re-run infer for your pack. If you do re-runcontract inferagainst a schema with an already-plural table name, diff the regenerated.prismafile for any back-relation field whose name changed — that's a public field name your pack's consumers access via.include()/.select()/the generated TypeScript types, so a rename is a breaking change to your pack's own published surface, to be versioned and documented like any other. - id: scalar-type-descriptors-channel-removed
summary: |
ComponentMetadata.scalarTypeDescriptorsis retired — the unified authoring type namespace is now the single channel for scalar types. If your extension/adapter descriptor declaredscalarTypeDescriptors: new Map([['String', 'pg/text@1'], ...]), move each entry to a zero-arg type-constructor contribution in the descriptor'sauthoring.typenamespace:String: { kind: 'typeConstructor', output: { codecId: 'pg/text@1', nativeType: 'text' } }. ThenativeTypeis now explicit — it was previously derived from the codec's first target type, so check the codec manifest for the value to inline. Code that readControlStack.scalarTypeDescriptors/ContractSourceContext.scalarTypeDescriptorsshould readstack.scalarTypes(the scalar type names) or derive the name ->{ codecId, nativeType }map viacollectScalarTypeConstructors(stack.authoringContributions.type)from@internal/framework-components/authoring.assembleScalarTypeDescriptorsis deleted, andvalidateScalarTypeCodecIdsnow takes the authoring type namespace instead of a descriptor map. detection: glob: "**/*.{ts,mts,cts}" contains: - "scalarTypeDescriptors" - "assembleScalarTypeDescriptors" anyMatch: true - id: postgres-json-rebound-to-native-json
summary: |
On the postgres target the PSL
Jsonscalar re-binds frompg/jsonb@1/jsonbtopg/json@1/json; a new bareJsonbscalar carriespg/jsonb@1/jsonb(postgresScalarAuthoringTypesin@internal/adapter-postgres). Extension test schemas and fixtures that author postgresJsonfields and mean jsonb storage must switch those fields toJsonb; assertions that pin theJsonname's derived binding (e.g. overcollectScalarTypeConstructors(stack.authoringContributions.type)orstack.scalarTypes) now expectJson -> { codecId: 'pg/json@1', nativeType: 'json' }plus the newJsonb -> { codecId: 'pg/jsonb@1', nativeType: 'jsonb' }entry. PSL value-object storage columns still emit jsonb (the interpreter now prefers the target'sJsonbscalar and falls back toJson). The legacy@db.Jsonattribute path (NATIVE_TYPE_SPECS) is unchanged, as are sqlite/mongoJsonbindings and the TS builder surface (field.json(),jsonbColumn). detection: glob: "**/*.{prisma,ts,mts,cts}" contains: - "Json" anyMatch: true - id: default-generators-no-longer-set-storage
summary: |
@default(<generator>)never mutates a column's storage any more — the type position is the only storage decider — and the whole generator-storage-override SPI is retired with it. Removed surfaces:MutationDefaultGeneratorDescriptor.resolveGeneratedColumnDescriptor(@internal/framework-components/control) — generator descriptors are now{ id, applicableCodecIds?, buildPhases? }only, andapplicableCodecIdsremains the validation channel (PSL_INVALID_DEFAULT_APPLICABILITYon mismatch); the transitionalbaseScalarmarker onAuthoringTypeConstructorDescriptorandScalarTypeConstructorOutput(@internal/framework-components/authoring) — scalar type-constructor contributions and the derived scalar view are plain{ codecId, nativeType, typeParams? }again; and the@internal/idsexportsresolveBuiltinGeneratedColumnDescriptor/GeneratedColumnDescriptor(the TS spec helpersuuidv4(),nanoid(), … still returnGeneratedColumnSpecbundling their explicitsql/char@1column). Packs that registered a generator descriptor with a storage-resolution hook must drop the hook; PSL schemas in extension fixtures relying onString @default(uuid()/cuid()/nanoid()/ulid())producingcharacter(N)columns must either accept the target String storage (postgres:pg/text@1/text) or author the char storage explicitly in the type position (Char(36) @default(uuid()), …), then re-emit. detection: glob: "**/*.{ts,mts,cts,prisma}" contains: - "resolveGeneratedColumnDescriptor" - "resolveBuiltinGeneratedColumnDescriptor" - "baseScalar" - "@default(uuid(" - "@default(cuid(" - "@default(nanoid(" - "@default(ulid(" anyMatch: true