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(pretty-json): support custom query #3300

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

nakasyou
Copy link
Contributor

Pretty JSON middleware changed to support custom queries, like that:

app.use('*', prettyJSON({
  query: 'format'
})

In this case, you can see formatted JSON at ?format. I think it should be customizable.

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.31%. Comparing base (54dab7e) to head (0f7c378).
Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3300   +/-   ##
=======================================
  Coverage   96.31%   96.31%           
=======================================
  Files         151      151           
  Lines       15368    15378   +10     
  Branches     2683     2702   +19     
=======================================
+ Hits        14801    14811   +10     
  Misses        567      567           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yusukebe
Copy link
Member

yusukebe commented Aug 20, 2024

@nakasyou

This is a cool improvement! I've left a comment.

@nakasyou
Copy link
Contributor Author

@yusukebe Thank you for reviewing. I changed it, so please check it.

Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe
Copy link
Member

yusukebe commented Aug 21, 2024

@nakasyou

Thanks! Looks good. Not sure whether to include it in the next minor version or in the patch version. After considered, I'll merge it.

@yusukebe
Copy link
Member

Hey @nakasyou

I've decided to include this feature in the next patch release (I can't wait for the next minor release!). Merging now. Thank you!

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