feat: make pretty print the default option for pgsql-deparser #207
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.
feat: make pretty print the default option for pgsql-deparser
Summary
This PR changes the default value of the
prettyoption fromfalsetotrue, making pretty-formatted SQL output the default behavior for pgsql-deparser. The change maintains full backward compatibility - users can still explicitly setpretty: falseto get compact output.Key Changes:
SqlFormatterconstructor,DeparserContextconstructor, and interface documentationentry-point.test.tsby explicitly settingpretty: falseto maintain their expected compact outputReview & Testing Checklist for Human
{ pretty: false }still produces the exact same compact output as beforeDiagram
%%{ init : { "theme" : "default" }}%% graph TD subgraph Legend L1["Major Edit"]:::major-edit L2["Minor Edit"]:::minor-edit L3["Context/No Edit"]:::context end A["src/deparser.ts<br/>(interface comment)"]:::major-edit B["src/utils/sql-formatter.ts<br/>(constructor default)"]:::major-edit C["src/visitors/base.ts<br/>(constructor default)"]:::major-edit D["README.md<br/>(documentation)"]:::minor-edit E["__tests__/entry-point.test.ts<br/>(test fixes)"]:::minor-edit F["User API<br/>(deparseSync function)"]:::context A --> F B --> F C --> F F --> D F --> E classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
pretty: falserather than changing test expectations, maintaining test integritySession Details: