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

[WIP] Update React Native to 0.57.4 #1210

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7aa00ad
Update the React Native version, and get types up to date
orta Oct 30, 2018
c732afa
Update native deps
orta Oct 31, 2018
535d359
React Native upgrade for rutime behavior
orta Oct 31, 2018
7c4cb28
WIP on React NAtive upgrade for jest tests
orta Nov 2, 2018
b9511bc
Resolve a version of fsevents that doesn't crash on node 10
orta Nov 13, 2018
1703442
Gets some of the tests to compile
orta Nov 13, 2018
aeffc47
Dep updates
orta Nov 15, 2018
9dbd415
Try updating to RN 0.58
orta Dec 10, 2018
7c3a201
Downgrade rn to 57
zephraph Dec 12, 2018
1894ce5
Update snapshots
zephraph Dec 12, 2018
205b466
Fix react-tracking mock failing
zephraph Dec 12, 2018
712068b
Clean up comments
zephraph Dec 12, 2018
21f30bd
[babel] Strip Flow type annotations before any other transforms.
alloy Feb 21, 2019
8a5046b
[test] Update snapshots with new default values.
alloy Feb 21, 2019
6a35072
[test] Fail on error/warn logs with helpful message.
alloy Feb 21, 2019
a4f82bf
[package] Pin exact RN/React/ReactDOM/Enzyme deps
alloy Feb 21, 2019
8b26f80
[test] Ignore ReactDOM warnings that don’t apply to RN.
alloy Feb 21, 2019
42d1a3a
[test] Fix tests that were logging.
alloy Feb 21, 2019
373c444
[test] A few more snapshot updates after dep updates.
alloy Feb 21, 2019
fac389a
[MockRelayRenderer] Properly name test
alloy Feb 21, 2019
f173ff1
[test] Fix test that was bleeding failing async code into other tests
alloy Feb 21, 2019
666a9eb
[styled-components] Remove usage of deprecated API.
alloy Feb 21, 2019
c0c1b0e
[ci] Make fsevents optional
orta Mar 21, 2019
c179cfd
[tsc] Makes types green
orta Mar 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
React Native upgrade for rutime behavior
  • Loading branch information
orta committed Oct 31, 2018
commit 535d3593f5a01641bed84f2281861b26768fb308
7 changes: 5 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"plugins": [["relay", { "artifactDirectory": "./src/__generated__" }]],
"presets": ["react-native"]
"plugins": [
["relay", { "artifactDirectory": "./src/__generated__" }],
["@babel/plugin-proposal-decorators", { "legacy": true }]
],
"presets": ["module:metro-react-native-babel-preset"]
}
21 changes: 9 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,23 @@
"moment-timezone": "^0.5.17",
"prop-types": "^15.5.10",
"query-string": "^4.1.0",
"react": "^16.6.0",
"react": "16.6.0-alpha.8af6728",
"react-native": "0.57.4",
"react-native-hyperlink": "0.0.11",
"react-native-parallax-scroll-view": "https://github.com/orta/react-native-parallax-scroll-view",
"react-native-scrollable-tab-view": "^0.8.0",
"react-native-scrollable-tab-view": "^0.9.0",
"react-native-sentry": "^0.30.2",
"react-relay": "https://github.com/alloy/relay/releases/download/v1.5.0-artsy.5/react-relay-1.5.0-artsy.5.tgz",
"react-tracking": "^5.0.0",
"relay-runtime": "https://github.com/alloy/relay/releases/download/v1.5.0-artsy.5/relay-runtime-1.5.0-artsy.5.tgz",
"remove-markdown": "0.1.0",
"simple-markdown": "^0.4.0",
"styled-components": "3.2.2",
"styled-components": "3.4.9",
"tipsi-stripe": "5.2.4"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.1.2",
"@playlyfe/gql": "^2.3.2",
"@storybook/react-native": "^3.3.11",
"@types/jest": "^22.1.1",
Expand All @@ -103,30 +105,25 @@
"@types/relay-runtime": "^1.3.5",
"@types/styled-system": "^3.0.1",
"awesome-typescript-loader": "^3.2.3",
"babel-jest": "^22.1.0",
"babel-jest": "23.6.0",
"babel-plugin-relay": "https://github.com/alloy/relay/releases/download/v1.5.0-artsy.3/babel-plugin-relay-1.5.0-artsy.3.tgz",
"babel-polyfill": "^6.13.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-react-native": "^4.0.0",
"babel-preset-stage-0": "^6.24.1",
"concurrently": "^2.2.0",
"danger": "^3",
"danger-plugin-jest": "^1.1.0",
"enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.0.2",
"husky": "^0.14.3",
"jest": "^22.4.2",
"jest": "23.6.0",
"jest-styled-components": "^4.10.0",
"lint-staged": "^6.0.0",
"metro-react-native-babel-preset": "0.49.0",
"patch-package": "^5.0.0",
"postinstall-prepare": "^1.0.1",
"prettier": "^1.14",
"react-dom": "^16.3.0-alpha.1",
"react-native-storybook-loader": "^1.6.0",
"react-native-typescript-transformer": "^1.2.3",
"react-storybooks-relay-container": "^1.0.0",
"react-test-renderer": "^16.3.0-alpha.1",
"react-test-renderer": "16.6.0-alpha.8af6728",
"recursive-readdir-sync": "^1.0.6",
"relay-compiler": "https://github.com/alloy/relay/releases/download/v1.5.0-artsy.5/relay-compiler-1.5.0-artsy.5.tgz",
"relay-compiler-language-typescript": "^1.1.0",
Expand Down
15 changes: 0 additions & 15 deletions patches/@types/react-native+0.52.1.patch

This file was deleted.

14 changes: 6 additions & 8 deletions rn-cli.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module.exports = {
getTransformModulePath() {
return require.resolve("react-native-typescript-transformer")
},
getSourceExts() {
return ["ts", "tsx"]
},
}
console.log("ASDASDASDASS")

// module.exports = {
// getTransformModulePath: require.resolve("react-native-typescript-transformer"),
// getSourceExts: ["ts", "tsx"],
// }
186 changes: 4 additions & 182 deletions src/lib/utils/track.ts → src/lib/utils/track/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,193 +2,15 @@ import _track, { Track as _Track, TrackingInfo } from "react-tracking"

import Events from "lib/NativeModules/Events"

// The schema definition for analytics tracking lives inside `./schema`, not here.
import * as Schema from "./schema"
export { Schema }

/**
* Useful notes:
* * At the bottom of this file there is an example of how to test track'd code.
*/

// tslint:disable-next-line:no-namespace
export namespace Schema {
/**
* The global tracking-info keys in Artsy’s schema.
*/
export interface Global {
/**
* The name of an event.
*
* Options are: Tap, Fail, Success
*
* This is unique to a "Track" event, meaning a "screen view" in Segment does not have this
* This is how we distinguish the two type of events in Eigen
* Track data inherits the screen view (called "context_screen") properties
*
*/
action_type: ActionTypes

/**
* The discription of an event
*
* E.g. Conversation artwork attachment tapped
*/
action_name: ActionNames

/**
* OPTIONAL: Additional properties of the action
*/
additional_properties?: object
}

export interface Entity extends Global {
/**
* The ID of the entity in its database. E.g. the Mongo ID for entities that reside in Gravity.
*/
owner_id: string

/**
* The public slug for this entity.
*/
owner_slug: string

/**
* The type of entity, e.g. Artwork, Artist, etc.
*/
owner_type: OwnerEntityTypes
}

export interface PageView {
/**
* The root container component should specify this as the screen context.
*/
context_screen: PageNames

/**
* The public slug for the entity that owns this page (e.g. for the Artist page)
*/
context_screen_owner_slug?: string

/**
* The ID of the entity in its database. E.g. the Mongo ID for entities that reside in Gravity.
*
* OPTIONAL: This may not always be available before the relay call for props has been made
*/
context_screen_owner_id?: string

/**
* The type of entity (owner), E.g. Artist, Artwork, etc.
*/
context_screen_owner_type: OwnerEntityTypes
}

export enum PageNames {
ArtistPage = "Artist",
BidFlowMaxBidPage = "YourMaxBid",
BidFlowConfirmBidPage = "ConfirmYourBid",
BidFlowBillingAddressPage = "YourBillingAddress",
BidFlowRegistration = "Registration",
BidFlowRegistrationResultConfirmed = "RegistrationConfirmed",
BidFlowRegistrationResultPending = "RegistrationPending",
BidFlowRegistrationResultError = "RegistrationError",
ConversationPage = "Conversation",
ConsignmentsWelcome = "ConsignmentsWelcome",
ConsignmentsOverView = "ConsignmentsOverview",
ConsignmentsSubmission = "ConsignmentsSubmit",
GenePage = "Gene",
FairPage = "Fair",
ShowPage = "Show",
InboxPage = "Inbox",
InquiryPage = "Inquiry",
HomeArtistsWorksForYou = "HomeArtistsWorksForYou",
HomeForYou = "HomeForYou",
HomeAuctions = "HomeAuctions",
SavesAndFollows = "SavesAndFollows",
}

export enum OwnerEntityTypes {
Artist = "Artist",
Artwork = "Artwork",
Conversation = "Conversation",
Gene = "Gene",
Fair = "Fair",
Show = "Show",
Invoice = "Invoice",
Consignment = "ConsignmentSubmission",
}

export enum ActionTypes {
/**
* User actions
*/
Tap = "tap",

/**
* Events / results
*/
Fail = "fail",
Success = "success",
}

/**
* Action event discriptors / names
*/
export enum ActionNames {
/**
* Artist Page Events
*/
ArtistAbout = "artistAbout",
ArtistFollow = "artistFollow",
ArtistUnfollow = "artistUnfollow",
ArtistWorks = "artistWorks",
ArtistShows = "artistShows",

/**
* Gene Page Events
*/
GeneAbout = "geneAbout",
GeneFollow = "geneFollow",
GeneUnfollow = "geneUnfollow",
GeneWorks = "geneWorks",
Refine = "geneRefine",

/**
* Home page events
*/
HomeArtistRailFollow = "homeArtistRailFollow",
HomeArtistArtworksBlockFollow = "homeArtistArtworksBlockFollow",

/**
* Conversations / Inbox / Messaging Events
*/
ConversationSelected = "conversationSelected",
ConversationSendReply = "conversationSendReply",
ConversationAttachmentShow = "conversationAttachmentShow",
ConversationAttachmentArtwork = "conversationAttachmentArtwork",
ConversationAttachmentInvoice = "conversationAttachmentInvoice",
ConversationLink = "conversationLinkUsed",
InquiryCancel = "inquiryCancel",
InquirySend = "inquirySend",

/**
* Saves And Follows Events
*/
SavesAndFollowsWorks = "savesAndFollowsWorks",
SavesAndFollowsArtists = "savesAndFollowsArtists",
SavesAndFollowsCategories = "savesAndFollowsCategories",

/**
* Consignment flow
*/
ConsignmentDraftCreated = "consignmentDraftCreated",
ConsignmentSubmitted = "consignmentSubmitted",

/**
* Bid flow
*/
BidFlowAddBillingAddress = "addBillingAddress",
BidFlowPlaceBid = "placeBid",
BidFlowSaveBillingAddress = "saveBillingAddress",
}
}

/**
* Use this interface to augment the `track` function with props, state, or custom tracking-info schema.
*
Expand Down
Loading