fix: recognize prisma.config.ts as an entry-point (#281)#286
Merged
BartWaardenburg merged 1 commit intofallow-rs:mainfrom May 5, 2026
Merged
Conversation
…#281) Prisma 6.x added `prisma.config.{ts,mts,cts,js,mjs,cjs}` as the officially-supported root config-file location. The Prisma CLI loads it directly, so no source file imports it, which made `fallow list` and `fallow dead-code` report it as an unused file. Add the config-file pattern to the prisma plugin's `config_patterns` and `always_used` lists. The plugin is already activated by the `prisma` / `@prisma/client` enablers, so the new entry only takes effect when prisma is actually a dependency.
Collaborator
|
Released in v2.65.0. Thanks @ChrisJr404. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #281.
Prisma 6.x introduced
prisma.config.tsas the officially-supported root config-file location. The Prisma CLI loads it directly, so no source file imports it, which meansfallow listandfallow dead-codecurrently report it as an unused file:Change
Adds
prisma.config.{ts,mts,cts,js,mjs,cjs}to the prisma plugin'sCONFIG_PATTERNSandALWAYS_USEDlists incrates/core/src/plugins/prisma.rs. The plugin is already activated by theprisma/@prisma/clientenablers, so the new entry only takes effect when prisma is actually a dependency.Six extensions match the supported ESM/CJS variants for both TypeScript and JavaScript:
.ts.mts/.cts.js.mjs/.cjsThis mirrors the convention already used by sibling plugins (
cypress.config.{ts,js,mjs,cjs},tsdown.config.{ts,js,cjs,mjs}).Test
Adds
prisma_config_ts_is_recognized_as_entry_pointtofalse_positive_fixes.rs. Builds a temp project with:and asserts that
prisma.config.tsis not reported inunused_files.Verification
cargo test -p fallow-core— 316 integration tests pass, 110 plugin-registry unit tests passcargo test -p fallow-cli --bin fallow— 1737 tests pass