Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

[Dev] Update to React Native 0.54 #954

Merged
merged 15 commits into from
Mar 7, 2018
Merged

[Dev] Update to React Native 0.54 #954

merged 15 commits into from
Mar 7, 2018

Conversation

orta
Copy link
Contributor

@orta orta commented Jan 19, 2018

[@alloy here] This is working now.

0.51 gives us SafeAreaView - which will be needed for iPhone X support

Plus we can do function only components and get HMR 👍

@orta orta changed the title [WIP][Dev] Update to React Native 0.51 [WIP][Dev] Update to React Native 0.52 Jan 19, 2018
@orta
Copy link
Contributor Author

orta commented Jan 22, 2018

Gonna give this a day or two, styled-components just updated to support 0.52 and it's still bit new, will give it more time tomorrow

@orta
Copy link
Contributor Author

orta commented Feb 6, 2018

The blocker here is on getting the tests to run reliably again, yarn jest will fail due to the require on images.

@orta orta changed the title [WIP][Dev] Update to React Native 0.52 [WIP][Dev] Update to React Native 0.3 Feb 12, 2018
@orta orta changed the title [WIP][Dev] Update to React Native 0.3 [WIP][Dev] Update to React Native 0.53 Feb 12, 2018
@orta
Copy link
Contributor Author

orta commented Feb 12, 2018

All our RN view controllers seem to run fine in-app, just blocked on getting tests to pass now

@orta
Copy link
Contributor Author

orta commented Feb 13, 2018

I think the issue with Jest + images is because it's not resolving to an @2x (or that in the older versions it wouldn't try to resolve at all, which seems suspicious when you look at the snapshot diffs )

-      source={1}
+      source={
+        Object {
+          "testUri": "../../../images/paddle.png",
+        }
+      }

@orta
Copy link
Contributor Author

orta commented Feb 15, 2018

lolz, 0.54 just came out also

@alloy
Copy link
Contributor

alloy commented Mar 1, 2018

Alright, got test suite green. Next step is to upgrade to the 0.54 RC.

@alloy alloy changed the title [WIP][Dev] Update to React Native 0.53 [Dev] Update to React Native 0.54 Mar 1, 2018
@alloy
Copy link
Contributor

alloy commented Mar 2, 2018

There are a bunch of yellow box warnings about some of the React life-cycle methods being deprecated, but leaving that in for now. facebook/react#12047

@@ -76,12 +76,14 @@ class Sales extends React.Component<Props, State> {
},
]

// The `renderItem` is alway
Copy link
Member

Choose a reason for hiding this comment

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

😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

^

Copy link
Contributor

Choose a reason for hiding this comment

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

@orta I guess you probably wanted to leave a note about why renderItem is set to be () => undefined ?

@@ -1,123 +0,0 @@
"use strict"
Copy link
Member

Choose a reason for hiding this comment

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

These transformer utils no longer needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We originally built our own, then https://github.com/ds300/react-native-typescript-transformer was built based on our work and made available for everyone's apps - we migrated to the module now

Copy link
Member

Choose a reason for hiding this comment

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

very nice! I bet a lot of people were psyched on this one

@alloy
Copy link
Contributor

alloy commented Mar 6, 2018

Alright this is now 🍏 and ready.

@alloy
Copy link
Contributor

alloy commented Mar 7, 2018

@orta bump

Copy link
Contributor Author

@orta orta left a comment

Choose a reason for hiding this comment

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

I approve (it's my PR, so I can't actually hit approve)

package.json Outdated
"lint-staged": "^6.0.0",
"patch-package": "^5.0.0",
"postinstall-prepare": "^1.0.1",
"prettier": "1.9.2",
"react-dom": "16.0.0-alpha.12",
"react-dom": "16.2.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this version is inconsistent with react above, dunno if that's an issue: "react": "^16.3.0-alpha.1",

Copy link
Contributor

Choose a reason for hiding this comment

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

Good spot 👍

"moduleNameMapper": {
"^lib/(.*)": "<rootDir>/src/lib/$1"
},
"transform": {
"^[./a-zA-Z0-9$_-]+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$":
"<rootDir>/node_modules/react-native/jest/assetFileTransformer.js",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

wanna try jest with this removed before shipping? might have been that @1 requiring it

Copy link
Contributor

Choose a reason for hiding this comment

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

Getting real weird results without this. Might be some cache that I haven’t though of yet, but I also don’t want to dive into another rabbit hole right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@@ -72,9 +70,6 @@ describe("state", () => {
sort: "-desc",
})

// Mount it to set up initial state
gene.componentWillMount()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense

@@ -76,12 +76,14 @@ class Sales extends React.Component<Props, State> {
},
]

// The `renderItem` is alway
Copy link
Contributor Author

Choose a reason for hiding this comment

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

^

@orta
Copy link
Contributor Author

orta commented Mar 7, 2018

OK, this is good to go on green

@alloy
Copy link
Contributor

alloy commented Mar 7, 2018

Doing it!

@alloy alloy merged commit e64f6c1 into master Mar 7, 2018
@ashfurrow ashfurrow deleted the rn_051 branch March 14, 2019 19: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.

3 participants