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: Upgrade production dependencies + babel and eslint #197

Merged
merged 7 commits into from
Sep 18, 2020

Conversation

julienw
Copy link
Contributor

@julienw julienw commented Sep 11, 2020

Some dependencies have security problems so I updated all of the production ones (the ones that are important for projects using the lib).

Because the project uses an old Flow version I had to hack a bit around the flow libdefs, but that should be OK. The dependencies don't have a lot of changes, so keeping the old libdefs was easy. Only for yargs I got it from flow-typed' previous version.

Because there was an issue with eslint in travis I also went ahead and upgraded both babel and eslint. And then fixed all new eslint violations. So this makes a big patch! but with quite independent commits. I hope that will be ok :-)

Next step could be to upgrade jest, that shouldn't be too painful, and then maybe you can add depfu.com (my favorite dependency upgrader) on this repository so that it's handled some more automatically and progressively in the future.

I checked with our project and this runs and gives the same result as before the change (both text and html) in about the same time.

One test seems flaky but it seemed flaky on master too (the one about the badge)... It looks like it passes on Travis though.

@julienw
Copy link
Contributor Author

julienw commented Sep 11, 2020

Dang, the linter fails on travis but not for me locally :-/
And I have no idea: it fails on an export type XXX = YYY saying XXX is not defined. Well obviously, the line defines it...

@julienw
Copy link
Contributor Author

julienw commented Sep 15, 2020

I decided to upgrade eslint and babel and related packages. It's still failing but with another error. Let's see :)

@julienw
Copy link
Contributor Author

julienw commented Sep 15, 2020

Yay, I managed to make it green \o/

So, what do you think @rpl? Sorry for this quite big PR...

@julienw julienw changed the title Upgrade production dependencies Upgrade production dependencies + babel and eslint Sep 15, 2020
Copy link
Owner

@rpl rpl left a comment

Choose a reason for hiding this comment

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

@julienw Thank you so much for taking care of updating all these dependency!
This looks great, and you have been absolutely awesome for preparing this huge PR and also for keeping the commit separated, that really helped a lot to get to this sooner.

I'm going to merge this to master in a minute and then (given that you did already the biggest chunk of work needed to update the dependencies) I'm going to take a quick look into how much work is needed to update the remaining ones in a separate pull request (from a quick look it seems that there are no many left to update, it is not unlikely that upgrading flow may require more changes but babel-jest and jest shouldn't require me to change much).

"@babel/preset-env": "^7.11.5",
"@babel/preset-flow": "^7.10.4",
"@babel/preset-react": "^7.10.4",
"babel-core": "^7.0.0-bridge.0",
Copy link
Owner

Choose a reason for hiding this comment

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

I guess that this version still needs both @babel-core and babel-core dependencies because of babel-jest, right?
If I'm right I guess that we'll be able to remove babel-core along with updating the babel-jest dependency (which will likely require to also upgrade the jest dependency).

I'll take care of this additional tweaks in a separate pull request.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes exactly, that's not needed anymore from jest v24 :)

@julienw
Copy link
Contributor Author

julienw commented Sep 18, 2020

Thanks for the merge !

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants