Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Full dep/devDep updates to latest versions #2873

Merged
merged 5 commits into from
Mar 21, 2019
Merged

Conversation

hwillson
Copy link
Member

@hwillson hwillson commented Mar 16, 2019

This PR updates all dependencies / devDependencies to their latest versions, and includes code (mostly Typescript) changes required by the new versions.

One thing to note - these changes only include the bare minimum needed to make walkTree compile after the dep updates, and work exactly like it did before (bugs and all). Re-capping from 98adf92):

walkTree is no longer used by react-apollo (see #2533), but
since it was previously exported and made available externally,
it is still available (albeit deprecated) until react-apollo
3.0. Unfortunately, the current walkTree implementation does not
fully work with React's new Context API. It can be updated to work
with modern versions of React, but the entire point of #2533 is
to avoid spending anymore time working on walkTree, since its
implementation relies on React internals (and is very brittle).
Since external use of walkTree is very minimal, and since there
have been no complaints of walkTree not working with React's
new Context API since it has been made a standalone module
(these problems were only noticed when walkTree was being used
by react-apollo), I think we should leave walkTree as is.

This commit makes sure walkTree passes Typescript compilation,
but disables failing tests caused by render tree differences in
newer versions of React.

I don't think we should spend anymore time on walkTree (and will add the above to the CHANGELOG). I know in theory we should make sure walkTree works fully with current day React until it's removed (in react-apollo 3.0), but given that its use is now quite minimal, and it still works just like it did before (which is broken with current day React), I really feel spending further time on it is not productive. I also don't want us to be held up on updating the rest of react-apollo to work with modern React versions, until we hit 3.0 and can remove walkTree. Definitely let me know if anyone disagrees.

Thanks!

`walkTree` is no longer used by `react-apollo` (see #2533), but
since it was previously exported and made available externally,
it is still available (albeit deprecated) until `react-apollo`
3.0. Unfortunately, the current `walkTree` implementation does not
fully work with React's new Context API. It can be updated to work
with modern versions of React, but the entire point of #2533 is
to avoid spending anymore time working on `walkTree`, since its
implementation relies on React internals (and is very brittle).
Since external use of `walkTree` is very minimal, and since there
have been no complaints of `walkTree` not working with React's
new Context API since it has been made a standalone module
(these problems were only noticed when `walkTree` was being used
by `react-apollo`), I think we should leave `walkTree` as is.

This commit makes sure `walkTree` passes Typescript compilation,
but disables failing tests caused by render tree differences in
newer versions of React.
@hwillson hwillson requested a review from benjamn as a code owner March 16, 2019 21:43
@@ -31,7 +31,7 @@ export function withMutation<
if (typeof mapPropsToOptions !== 'function') mapPropsToOptions = () => options as MutationOpts;

return (
WrappedComponent: React.ComponentType<TChildProps & TProps>,
WrappedComponent: React.ComponentType<TProps & TChildProps>,
Copy link
Member Author

Choose a reason for hiding this comment

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

Switching the TProps & TChildProps order around has no technical merit - it just bugged me!

@hwillson hwillson merged commit 6f6b6ed into master Mar 21, 2019
@hwillson hwillson deleted the hwillson/full-dep-updates branch March 21, 2019 12:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant