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

UPGRADE react & friends && UPGRADE other dependencies #1908

Merged
merged 10 commits into from
Sep 30, 2017

Conversation

ndelangen
Copy link
Member

Issue: -upgrade to react 16.0.0-

What I did

  • Upgraded react & friends to latest
  • Upgraded all root dependencies
  • Upgraded package dependencies shared with root

How to test

Run all tests and examples

Notes

I had difficulty testing /lib/ui/src/modules/ui/components/left_panel/stories_tree/index.test.js
I narrowed down the test, would love some help getting this tested properly!

@ndelangen ndelangen self-assigned this Sep 28, 2017
@codecov
Copy link

codecov bot commented Sep 28, 2017

Codecov Report

Merging #1908 into master will increase coverage by 0.13%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1908      +/-   ##
==========================================
+ Coverage   21.29%   21.43%   +0.13%     
==========================================
  Files         261      261              
  Lines        5743     5743              
  Branches      687      687              
==========================================
+ Hits         1223     1231       +8     
+ Misses       4002     3994       -8     
  Partials      518      518
Impacted Files Coverage Δ
lib/ui/src/modules/ui/components/layout/index.js 80.35% <0%> (+1.78%) ⬆️
addons/knobs/src/KnobStore.js 9.09% <0%> (+2.27%) ⬆️
addons/knobs/src/react/WrapStory.js 20% <0%> (+8%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c7f910...2b4930d. Read the comment docs.

name: 'foo',
}),
};
testManager.knobStore = { set: jest.fn(), get: () => ({ defaultValue: 'default value', value: 'current value', name: 'foo' }) };
Copy link
Member

Choose a reason for hiding this comment

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

@ndelangen what's going on here? any chance we fix the linting setup so that our code is not filled with non-functional changes like this again and again? i think this is probably the fifth PR that i've looked at over the past few months that contains hundreds of lines of changes that have nothing to do with the functionality of the code. it looks really pretty when you are generating visualizations of the codebase, but wastes a lot of time for PR review and i've heard from others who are also annoyed about this. curious to hear your thoughts.

type: 'text',
},
};
const knobs = { foo: { name: 'foo', value: 'default string', type: 'text' }, baz: { name: 'baz', value: 'another knob value', type: 'text' } };
Copy link
Member

Choose a reason for hiding this comment

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

@ndelangen related to my comment above, i'm surprised that the linter allows long lines like this?

@shilman
Copy link
Member

shilman commented Sep 28, 2017

@ndelangen are there meaningful changes in here that make it work with react 16+? what happens when you run the new code with a react 15 project? what happens when you run the old code with a react 16 project? understanding that would help me evaluate the PR. it's currently hard to evaluate because most of the changes are non-functional and unrelated to the react 16 upgrade.

@Hypnosphi
Copy link
Member

Hypnosphi commented Sep 28, 2017

I can see quite a lot of lint warnings on CI, looks like @ndelangen had an outdated prettier version or something. I'll run eslint --fix, it should remove most of the noisy diff. The rest should be gone if we do the same on master (#1909)

@ndelangen
Copy link
Member Author

Sorry for the confusion, I'll see where this outdated prettier is coming from.. thanks @Hypnosphi ! 👍

@Hypnosphi
Copy link
Member

Hypnosphi commented Sep 28, 2017

@shilman @ndelangen How do you guys feel about raising prettier from warning to error level? This will guarantee the consistency between branches as soon as CI passes

@ndelangen
Copy link
Member Author

ndelangen commented Sep 28, 2017

I feel inconsequential whitespace issues should not fail a build. That's just not productive.

The point is to make it easier on everyone.

@Hypnosphi
Copy link
Member

Hypnosphi commented Sep 28, 2017

The only way those errors could appear is that someone had explicitly turned off git hooks, which is not good by itself. Prettier errors are 100% autofixable. And I agree with @shilman that those irrelevant diffs are quite annoying for reviewers

@ndelangen
Copy link
Member Author

BTW @igor-dv had some suggestion and a possible fix for the unit test I had trouble with.

@Hypnosphi
Copy link
Member

@ndelangen There is still some unneeded diff left, which can only be reverted manually because prettier is ok with both "before" and "after" states in those cases

@igor-dv
Copy link
Member

igor-dv commented Sep 29, 2017

I'm totally agree with @shilman. These changes will also be a pain in the ass when solving conflicts in the release branche

@ndelangen
Copy link
Member Author

ndelangen commented Sep 29, 2017

I'll remove the unrelated changes ASAP.

@ndelangen ndelangen force-pushed the ndelangen/upgrade-react branch from 9890135 to 02c6198 Compare September 29, 2017 21:37
Copy link
Member Author

@ndelangen ndelangen left a comment

Choose a reason for hiding this comment

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

You people happy now? 😎

@Hypnosphi
Copy link
Member

The test changes look OK to me

"react": "^15.6.1",
"react-document-title": "^2.0.3",
"react-dom": "^15.6.1",
"react-dom": "^15.5.0",
Copy link
Member

Choose a reason for hiding this comment

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

Is it intentional?

"core-js": "^2.5.1",
"css-loader": "^0.28.7",
Copy link
Member

Choose a reason for hiding this comment

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

Please remove the duplication (see lint errors)

@Hypnosphi
Copy link
Member

I wonder why there are no changes in lockfiles

@ndelangen
Copy link
Member Author

@Hypnosphi can you review / approve?

Anyone else on the @storybooks/team wants to review this?

@ndelangen ndelangen requested a review from a team September 30, 2017 18:01
@ndelangen ndelangen merged commit f0fdfc7 into master Sep 30, 2017
@ndelangen ndelangen deleted the ndelangen/upgrade-react branch September 30, 2017 18:45
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.

4 participants