Skip to content

feat: add AST-based schema parsing for Prisma >= 6.16.0 compatibility#151

Open
renatocron wants to merge 1 commit into47ng:nextfrom
renatocron:feat/prisma-7-multi-schema
Open

feat: add AST-based schema parsing for Prisma >= 6.16.0 compatibility#151
renatocron wants to merge 1 commit into47ng:nextfrom
renatocron:feat/prisma-7-multi-schema

Conversation

@renatocron
Copy link
Copy Markdown

@renatocron renatocron commented Feb 23, 2026

Add @mrleebo/prisma-ast based schema parsing to support Prisma 6.16.0+ where DMMF no longer includes field-level documentation.

  • Add analyseSchema() to parse schema from string
  • Add analyseSchemaFile() to parse from file or directory
  • Add findSchemaPath() for auto-detection of schema files
  • Support multi-file schemas (prismaSchemaFolder)
  • Maintain backward compatibility with DMMF fallback
  • Add 17 AST-specific tests including multi-file tests
  • Export analyseSchema and analyseSchemaFile functions

Fixes #142 and it's a new ideia based on #144

Still needs update on docs, but I want feedback from you all

Add @mrleebo/prisma-ast based schema parsing to support Prisma 6.16.0+
where DMMF no longer includes field-level documentation.

- Add analyseSchema() to parse schema from string
- Add analyseSchemaFile() to parse from file or directory
- Add findSchemaPath() for auto-detection of schema files
- Support multi-file schemas (prismaSchemaFolder)
- Maintain backward compatibility with DMMF fallback
- Add 17 AST-specific tests including multi-file tests
- Export analyseSchema and analyseSchemaFile functions

Fixes 47ng#143
@tycomo
Copy link
Copy Markdown

tycomo commented Mar 4, 2026

Is it possible to create a preview package for testing @franky47? I would be happy to try it out with the latest version of Prisma.

This seems similar to the approach taken by one of the forks I was browsing (https://github.com/ikbenignace/prisma-field-encryption/tree/feature/prisma-ast), could be worth comparing changes. I think they also started working on the documentation.

@franky47 franky47 added the deploy:preview Deploy a preview version of this PR on pkg.pr.new label Mar 4, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 4, 2026

pnpm add https://pkg.pr.new/prisma-field-encryption@151

commit: cbdb758

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

Labels

deploy:preview Deploy a preview version of this PR on pkg.pr.new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No dmmf available from new prisma client generator

3 participants