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 minified version of 'create-react-class' #9939

Merged

Conversation

flarnie
Copy link
Contributor

@flarnie flarnie commented Jun 12, 2017

what is the change?:
We ran the latest version of
addons/create-react-class/create-react-class.js through https://jscompress.com/

why make this change?:
The last corner case I'm thinking of is this:

  • The createClass deprecation warning never went out in 15.5, and is going out now for real in 15.6.
  • The createClass UMD build is broken for AMD/CommonJS, but we fixed it. But not for the minified version of the file.
  • If someone see the warning, and tries to use the UMD build, then it's going to be broken in some cases.
  • Since we're skipping mentioning the add-ons in the blog post, and this might be a new warning for them, this could be a nasty surprise for folks.

We can do a quick 15.5.4 release of that package, we would at least fix that case. Seemed worth doing since it took 30 seconds.

This diverges from what @gaearon is doing to fix the add-ons. I would
probably try to use cherry-pick and interactive rebase to move this
commit to right after
ce3ecfb
and then do the patch release of create-react-class from that spot in
history.

Alternately I can merge this into the forked branch
15.6-before-addon-reconstruction and then do the patch release from
there.

test plan:
I didn't test this. Ideally minifying this file won't break anything,
and it's high cost to test add-ons until we have some repeatable tests
in place.

issue:
#9765

Before submitting a pull request, please make sure the following is done:

  1. Fork the repository and create your branch from master.
  2. If you've added code that should be tested, add tests!
  3. If you've changed APIs, update the documentation.
  4. Ensure the test suite passes (npm test).
  5. Make sure your code lints (npm run lint).
  6. Format your code with prettier (npm run prettier).
  7. Run the Flow typechecks (npm run flow).
  8. If you added or removed any tests, run ./scripts/fiber/record-tests before submitting the pull request, and commit the resulting changes.
  9. If you haven't already, complete the CLA.

**what is the change?:**
We ran the latest version of
`addons/create-react-class/create-react-class.js` through https://jscompress.com/

**why make this change?:**
The last corner case I'm thinking of is this:
 - The `createClass` deprecation warning never went out in 15.5, and is going out now for real in 15.6.
 - The `createClass` UMD build is broken for AMD/CommonJS, but we fixed it. But not for the minified version of the file.
 - If someone see the warning, and tries to use the UMD build, then it's going to be broken in some cases.
 - Since we're skipping mentioning the add-ons in the blog post, and this might be a new warning for them, this could be a nasty surprise for folks.

We can do a quick 15.5.4 release of that package, we would at least fix that case.

This diverges from what @gaearon is doing to fix the add-ons. I would
probably try to use cherry-pick and interactive rebase to move this
commit to right after
facebook@ce3ecfb
and then do the patch release of `create-react-class` from that spot in
history.

Alternately I can merge this into the forked branch
`15.6-before-addon-reconstruction` and then do the patch release from
there.

**test plan:**
I didn't test this. Ideally minifying this file won't break anything,
and it's high cost to test add-ons until we have some repeatable tests
in place.

**issue:**
facebook#9765
Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

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

I haven't tested, but seems fine to do as the last 15.5.x bump if you'd like.

I'd prefer we don't do this for 15.6, and instead wait for a build system.

@flarnie
Copy link
Contributor Author

flarnie commented Jun 12, 2017

Thanks! Sounds good.

@flarnie flarnie changed the base branch from 15.6-before-addon-reconstruction to 15-dev June 12, 2017 23:38
@flarnie flarnie merged commit 207f3ef into facebook:15-dev Jun 12, 2017
flarnie added a commit that referenced this pull request Jun 12, 2017
@flarnie flarnie deleted the updateMinifiedVersionOfCreateReactClass branch May 25, 2018 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants