feat: make pretty print the default option for pgsql-deparser#207
Closed
pyramation wants to merge 2 commits intomainfrom
Closed
feat: make pretty print the default option for pgsql-deparser#207pyramation wants to merge 2 commits intomainfrom
pyramation wants to merge 2 commits intomainfrom
Conversation
- Change default value of pretty option from false to true - Update DeparserOptions interface comment to reflect new default - Update SqlFormatter constructor default parameter to true - Update DeparserContext constructor default parameter to true - Update README documentation to show new default value - Fix entry-point tests to explicitly set pretty: false for backward compatibility - Maintain full backward compatibility - pretty: false still works as expected This makes pretty formatting the default behavior while preserving all existing functionality. Co-Authored-By: Dan Lynch <pyramation@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Add explicit pretty: false option to deparse calls in utils tests - Fixes CI failure in parser-tests utils step - Maintains backward compatibility for tests expecting compact SQL output Co-Authored-By: Dan Lynch <pyramation@gmail.com>
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.
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: