Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[next-adapter] update RNW peer, remove deprecated types #3377

Merged
merged 3 commits into from
Apr 9, 2021

Conversation

Simek
Copy link
Contributor

@Simek Simek commented Apr 9, 2021

Why

Currently @expo/next-adapter lists the outdated version of react-native-web in the peerDependencies.

Also the package uses the deprecated and outdate @types/next package:

Screenshot 2021-04-09 at 12 25 55

How

This PR bumps the react-native-web version in @expo/next-adapter dependencies to match the one used in Expo environment - 0.13.12:

It also remove the deprecated and unnecessary Next.js types package and ensures that Next ^9 is used in the workspace. To do that, I had to bump explicit next dev dependency in dev-tools, otherwise dependency was always resolved to ^8.0.0 which do not includes types and was a miss-match for most of peerDependencies listed in other packages.

Unfortunately, currently there are no good build-in types for NextConfig - vercel/next.js#10254.

Also as seen below Next.js don't care about that and uses any 🤷‍♂️

Screenshot 2021-04-09 at 12 55 07

CC: @EvanBacon

Test Plan

Command yarn && yarn build executed on workspace and in @expo/next-adapter package works correctly.


export default function withExpo(nextConfig: NextConfig = {}): NextConfig {
export default function withExpo(nextConfig: any = {}): any {
Copy link
Contributor

Choose a reason for hiding this comment

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

lol ok

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can change it in next PR to Record<string, any> if you want, but probably we cannot go more strict than that, without writing the types by hand. 😉

Copy link
Contributor

@EvanBacon EvanBacon left a comment

Choose a reason for hiding this comment

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

LGTM

@EvanBacon EvanBacon merged commit 4536fc8 into expo:master Apr 9, 2021
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.

None yet

2 participants