Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(query-parser): allow falsy indentation, default to 2 space in toJSString, deprecate stringify #235

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

Anemy
Copy link
Member

@Anemy Anemy commented Feb 13, 2024

As part of https://jira.mongodb.org/browse/COMPASS-6980 we need to make Compass not use stringify for query parsing so that we can retain multi-spaces in values. We also want to have more flexibility over how we indent those places. This pr adds that flexibility and a deprecated notice on stringify so hopefully we can avoid using it in future.

To see a quick example of the bug stringify usage causes in Compass, run a query with the following:

{
 name: 'te    st'
}

And then click on it in query history and observe the multiple spaces in te st are replaced by one space.

@Anemy Anemy merged commit 233edcc into main Feb 14, 2024
5 checks passed
@Anemy Anemy deleted the allow-falsy-values-in-stringify branch February 14, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants