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

chore: use es6 arrows function #870

Merged
merged 3 commits into from
Nov 17, 2018

Conversation

SimonSchick
Copy link
Contributor

@SimonSchick SimonSchick commented Nov 5, 2018

This converts most function callback use to arrow functions.

I will push 3 invidual commits and run them through CI (builds are extremely flaky locally).
The first 2 will run CI without lint, the 3rd one adds linting back.

The first commit was entirely automated via eslint.
The second and 2nd is fixing docs and invalid-this errors.
The 3rd final invalid-this errors.

@SimonSchick SimonSchick changed the title chore: use arrows stage chore: use es6 arrows function Nov 5, 2018
@sidorares
Copy link
Owner

Interesting to see if there is perf impact of this change ( could be either way )

@SimonSchick
Copy link
Contributor Author

Doubtful, especially given https://stackoverflow.com/questions/44030645/are-arrow-functions-faster-more-performant-lighter-than-ordinary-standalone-f

It mostly helps with code readability as they are less verbose and don't change this all the time.

On another note: I changed the way the db awaiter works, less spam :)
https://github.com/sidorares/node-mysql2/pull/870/files#diff-8736c5cbff21e1dee18b0c86d3d2689dR32

@sidorares
Copy link
Owner

On another note: I changed the way the db awaiter works, less spam :)

Thanks! One more thing to improve with test signal/noise ratio is to clean up "packet out of order" messages from test server (or actually fix packet numbers in server)

@SimonSchick
Copy link
Contributor Author

Yea, that's out of scope of my PR tho, plus I'm not exactly sure how I would fix those 😛

@SimonSchick
Copy link
Contributor Author

rebased

@SimonSchick
Copy link
Contributor Author

Broke link, goddamnit 😞

@SimonSchick
Copy link
Contributor Author

Hey @sidorares would you like to merge this and resolve conflicts yourself, or should I rebase again?

@sidorares
Copy link
Owner

if you can would be great, otherwise I'll do

@SimonSchick
Copy link
Contributor Author

Done, hoping that tests pass :)

lib/pool_connection.js Outdated Show resolved Hide resolved
@SimonSchick
Copy link
Contributor Author

Oh great, I amended without pulling first 😅

@SimonSchick
Copy link
Contributor Author

@sidorares I think this is ripe now, I checked for additional arguments magic just to be sure.

@sidorares sidorares merged commit 0c422dd into sidorares:master Nov 17, 2018
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