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

Update babel to 7.12.13 to fix __proto__ #4

Merged
merged 1 commit into from Feb 5, 2021

Conversation

ChALkeR
Copy link

@ChALkeR ChALkeR commented Feb 4, 2021

Refs: babel/babel#12693

As this repo uses loose transforms, Babel < 7.12.13 produces code that hits __proto__ and doesn't work in hardened environments where it has been disabled.

Updating to ^7.12.13 fixes this issue.

Al alternative solution would be to disable loose mode (but that would generate bigger code).

@theKashey theKashey merged commit a273129 into theKashey:master Feb 5, 2021
@theKashey
Copy link
Owner

Thanks. __proto__ always strikes back.

@theKashey
Copy link
Owner

v@1.2.4 has been released.

@ChALkeR
Copy link
Author

ChALkeR commented Feb 10, 2021

@theKashey I don't think it includes a lib rebuild? Either local node_modules weren't updated or the lib wasn't rebuilt.

The only difference between v1.2.2 and v1.2.4 is in package.json:

$ diff -qr react-clientside-effect-1.2.2 react-clientside-effect-1.2.4
Files react-clientside-effect-1.2.2/package.json and react-clientside-effect-1.2.4/package.json differ

Just running yarn before publish should help (as it produces lib difference`):

diff -r react-clientside-effect-1.2.4/lib/index.umd.js react-clientside-effect/lib/index.umd.js
8a9,17
>   function _setPrototypeOf(o, p) {
>     _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
>       o.__proto__ = p;
>       return o;
>     };
> 
>     return _setPrototypeOf(o, p);
>   }
> 
12c21
<     subClass.__proto__ = superClass;
---
>     _setPrototypeOf(subClass, superClass);
62,64c71
<       var SideEffect =
<       /*#__PURE__*/
<       function (_PureComponent) {
---
>       var SideEffect = /*#__PURE__*/function (_PureComponent) {
94c101
<           return React__default.createElement(WrappedComponent, this.props);
---
>           return /*#__PURE__*/React__default.createElement(WrappedComponent, this.props);

@theKashey
Copy link
Owner

You are right. I did not update dependencies before publishing a new version.

@theKashey
Copy link
Owner

👉1.25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants