New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(schema-files-loader): Customize file loading logic #24085
Conversation
size-limit report 📦
|
CodSpeed Performance ReportMerging #24085 will not alter performanceComparing Summary
|
Use `@prisma/schema-files-loader` to resolve schema files from memory or disk. See also prisma/prisma#24085 Message handler's methods now accept `PrismaSchema` instance from outside, rather than creating it from a single document. Singatures of the methods are also adjusted to consistently be in `(schema, intitianigDocument, params)` form.
a3e6c2f
to
08128cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! :) ✨
packages/schema-files-loader/src/resolver/CompositeFilesResolver.ts
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
This seems like something broke here |
No dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No dependency changes detected in pull request |
81aa269
to
87e3454
Compare
Use `@prisma/schema-files-loader` to resolve schema files from memory or disk. See also prisma/prisma#24085 Message handler's methods now accept `PrismaSchema` instance from outside, rather than creating it from a single document. Singatures of the methods are also adjusted to consistently be in `(schema, intitianigDocument, params)` form.
Allows to swap files resolution logic used by the package. By default, package still uses real fs (see `realFsResolver`). Additinal implementatins are: - `InMemoryFilesResolver` as the name suggests, keeps virtual file tree in memory. - `CompsoiteFilesResolver` combines two resolvers together. Both will be used for language-tools, where some of the source files might diverge from their on-disk content while editing. Contribute to prisma/team-orm#1042
87e3454
to
ab7b6cb
Compare
Use `@prisma/schema-files-loader` to resolve schema files from memory or disk. See also prisma/prisma#24085 Message handler's methods now accept `PrismaSchema` instance from outside, rather than creating it from a single document. Singatures of the methods are also adjusted to consistently be in `(schema, intitianigDocument, params)` form.
Use `@prisma/schema-files-loader` to resolve schema files from memory or disk. See also prisma/prisma#24085 Message handler's methods now accept `PrismaSchema` instance from outside, rather than creating it from a single document. Singatures of the methods are also adjusted to consistently be in `(schema, intitianigDocument, params)` form.
Use `@prisma/schema-files-loader` to resolve schema files from memory or disk. See also prisma/prisma#24085 Message handler's methods now accept `PrismaSchema` instance from outside, rather than creating it from a single document. Singatures of the methods are also adjusted to consistently be in `(schema, intitianigDocument, params)` form.
Use `@prisma/schema-files-loader` to resolve schema files from memory or disk. See also prisma/prisma#24085 Message handler's methods now accept `PrismaSchema` instance from outside, rather than creating it from a single document. Singatures of the methods are also adjusted to consistently be in `(schema, intitianigDocument, params)` form.
Allows to swap files resolution logic used by the package.
By default, package still uses real fs (see
realFsResolver
).Additinal implementatins are:
InMemoryFilesResolver
as the name suggests, keeps virtual file treein memory.
CompsoiteFilesResolver
combines two resolvers together.Both will be used for language-tools, where some of the source files
might diverge from their on-disk content while editing.
We had to make them both aware of potential case-sensitivity and adjust their logic
accordingly, because on case-insensitive file systems URIs we getting from VSCode
will not neccessary match casing of files on disk. Both new resolvers need to be aware of that
so they can de-duplicate in-memory and on-disk entries correctly on each system.
Contribute to prisma/team-orm#1042
For usage, see prisma/language-tools#1718
/integration