Problem
Libraries like https://github.com/arthurfiorette/prisma-json-types-generator#configuration might have their only reference in the project inside the schema.prisma file as the provider for a generator.
Right now, fallow doesn't seem to analyze dependencies referenced in schema.prisma, causing it to list packages like prisma-json-types-generator (and other generator packages) as unused dependencies in this scenario.
Proposed solution
If a file is a .prisma file, scan for dependencies with a regex that detects lines like
provider = "prisma-json-types-generator"
and add the dependency to fallow's internal graph of tracked dependencies.
Parsing .schema files "properly" instead of regex is probably too much work.
Alternatives considered
Users add Prisma providers to ignoreDependencies in .fallowrc.json.
Problem
Libraries like https://github.com/arthurfiorette/prisma-json-types-generator#configuration might have their only reference in the project inside the
schema.prismafile as the provider for a generator.Right now, fallow doesn't seem to analyze dependencies referenced in
schema.prisma, causing it to list packages likeprisma-json-types-generator(and other generator packages) as unused dependencies in this scenario.Proposed solution
If a file is a
.prismafile, scan for dependencies with a regex that detects lines likeand add the dependency to fallow's internal graph of tracked dependencies.
Parsing
.schemafiles "properly" instead of regex is probably too much work.Alternatives considered
Users add Prisma providers to
ignoreDependenciesin.fallowrc.json.