-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prisma-fmt: Make
get_config
error tolerant (#4875)
* prisma-fmt: Make `parse_confgiration_multi` error tolerant Now the function never fails and always returns both `Config` and `Diagnostics`. In case of errors, `Diagnostic` would be non-empty, but it will still try to return as much of a config as it was able to parse. This is useful mostly for dev tools - they need to be able to read preview feature from more invalid files than old `get_config` would've allowed. It also improves diagnostics in the CLI since we are now also able to tell that user wanted to have more cases. This is a breaking change to consumers of `prisma-fmt`: both prisma cli and language-tools would need to be adapted to the new signature. Contributes to prisma/team-orm#1143 Contributes to prisma/team-orm#1127 (opportunistic refactor) * Rename method once more
- Loading branch information
Showing
6 changed files
with
234 additions
and
87 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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