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

fix(javascript): regression for hasOwnProperty #4603

Merged

Conversation

ikatyang
Copy link
Member

Fixes #4602

"flow", // Lodash
"flowRight", // Lodash
"connect" // Redux
];
Copy link
Member

@duailibe duailibe May 30, 2018

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

@j-f1 j-f1 changed the title fix(javascript): no regression for hasOwnProperty fix(javascript): regression for hasOwnProperty May 30, 2018
@IvanGoncharov
Copy link

IvanGoncharov commented May 30, 2018

@ikatyang Thanks for the super fast fix 🏁🏎👏
I'm just wondering when to expect next release with this fix included?

flowRight: true, // Lodash
connect: true // Redux
};
const functionCompositionFunctionNames = new Set([
Copy link
Member

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 :)

#4431 (comment)

@ikatyang ikatyang merged commit 8abbc5d into prettier:master May 30, 2018
@ikatyang ikatyang deleted the fix/javascript-no-regression-hasOwnProperty branch May 30, 2018 16:39
@ikatyang
Copy link
Member Author

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?

@duailibe
Copy link
Member

@ikatyang makes sense. I'll release 1.13.3

bors bot referenced this pull request in mozilla/delivery-console May 30, 2018
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#&#8203;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 ([#&#8203;4603](`https://github.com/prettier/prettier/pull/4603`))
- Fix a regression in exit status when using `--debug-check` and `--list-different` ([#&#8203;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]>
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Aug 28, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants