-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
fix(javascript): regression for hasOwnProperty
#4603
fix(javascript): regression for hasOwnProperty
#4603
Conversation
src/language-js/printer-estree.js
Outdated
"flow", // Lodash | ||
"flowRight", // Lodash | ||
"connect" // Redux | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used an object here specifically to prevent calling indexOf
. I suggest we use Object.create(null)
, Map
or a Set
hasOwnProperty
hasOwnProperty
@ikatyang Thanks for the super fast fix 🏁🏎👏 |
flowRight: true, // Lodash | ||
connect: true // Redux | ||
}; | ||
const functionCompositionFunctionNames = new Set([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hehe, I proposed using a Set in the original PR :)
I'm not sure when but we should make these regression fixes available as soon as possible. And it seems Jest also encountered this issue jestjs/jest#6344 (comment). @duailibe what do you think? |
@ikatyang makes sense. I'll release 1.13.3 |
172: Update dependency prettier to v1.13.3 r=rehandalal a=renovate[bot] This Pull Request updates dependency [prettier](https://github.com/prettier/prettier) from `v1.13.2` to `v1.13.3` <details> <summary>Release Notes</summary> ### [`v1.13.3`](https://github.com/prettier/prettier/blob/master/CHANGELOG.md#​1133) [Compare Source](prettier/prettier@1.13.2...75e86b9) [link](prettier/prettier@1.13.2...1.13.3) - Fix a regression when printing `hasOwnProperty` and other functions in `Object`'s prototype ([#​4603](`https://github.com/prettier/prettier/pull/4603`)) - Fix a regression in exit status when using `--debug-check` and `--list-different` ([#​4600](https://github.com/prettier/prettier/pul/4600)) --- </details> --- This PR has been generated by [Renovate Bot](https://renovatebot.com). Co-authored-by: Renovate Bot <[email protected]>
Fixes #4602