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

refactor: remove useless spread #3600

Merged
merged 5 commits into from
Nov 1, 2024
Merged

Conversation

exoego
Copy link
Contributor

@exoego exoego commented Oct 31, 2024

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 Oct 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.71%. Comparing base (4dd8b2b) to head (5bf29e2).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3600      +/-   ##
==========================================
- Coverage   94.71%   94.71%   -0.01%     
==========================================
  Files         158      158              
  Lines        9555     9552       -3     
  Branches     2813     2789      -24     
==========================================
- Hits         9050     9047       -3     
  Misses        505      505              

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

@@ -80,7 +80,7 @@ class ClientRequestImpl {
let methodUpperCase = this.method.toUpperCase()

const headerValues: Record<string, string> = {
...(args?.header ?? {}),
...args?.header,
Copy link
Contributor Author

@exoego exoego Oct 31, 2024

Choose a reason for hiding this comment

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

Note) spread fallback is redundant

const a = undefined
console.log({ ...a, b: 1 })

// { b: 1}

Copy link
Contributor

Choose a reason for hiding this comment

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

I put out a PR related to this.

exoego#5

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 Nov 1, 2024

@exoego @EdamAme-x

Thank you both!

@yusukebe yusukebe merged commit ae99d86 into honojs:main Nov 1, 2024
16 checks passed
@exoego exoego deleted the useless-spread branch November 1, 2024 01:32
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.

3 participants