diff --git a/.babelrc b/.babelrc index 9bcdf2f013..0db564e20f 100644 --- a/.babelrc +++ b/.babelrc @@ -1,4 +1,4 @@ { - "plugins": ["./data/schema"], + "plugins": ["relay"], "presets": ["react-native"] } diff --git a/.gitignore b/.gitignore index 9b42991da7..79e24ce45f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ ## Build generated build/ DerivedData +__generated__ +dist ## Various settings *.pbxuser diff --git a/.gqlconfig b/.gqlconfig new file mode 100644 index 0000000000..27ab14868a --- /dev/null +++ b/.gqlconfig @@ -0,0 +1,20 @@ +{ + "schema": { + "files": "data/schema.graphql" + }, + "query": { + "files": [ + { + "match": "src/**/*.ts*", + "parser": ["EmbeddedQueryParser", { "startTag": "graphql(\\.experimental)?`", "endTag": "`" }], + "isRelay": true, + "validate": { + "extends": "gql-rules-query-relay", + "rules": { + "KnownDirectives": "off" + } + } + } + ] + } +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 65aa324431..96604a4b6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ###### Dev +- Upgrades React Native to v0.48.0 - sarah - Extracts connectivity banner into its own component - sarah - Adds stylelint to the dev-experience, not validated on CI yet - orta - Updates Storybooks to 3.2 - orta diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 4fb0aa06cc..f520cbbb98 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -15,16 +15,16 @@ PODS: - Artsy+UIColors - Artsy+UIFonts (>= 3.0.0) - Extraction (>= 1.2.1) - - React/BatchedBridge (= 0.45.0-rc.2) - - React/Core (= 0.45.0-rc.2) - - React/RCTAnimation (= 0.45.0-rc.2) - - React/RCTCameraRoll (= 0.45.0-rc.2) - - React/RCTImage (= 0.45.0-rc.2) - - React/RCTNetwork (= 0.45.0-rc.2) - - React/RCTText (= 0.45.0-rc.2) + - React/BatchedBridge (= 0.48.0) + - React/Core (= 0.48.0) + - React/RCTAnimation (= 0.48.0) + - React/RCTCameraRoll (= 0.48.0) + - React/RCTImage (= 0.48.0) + - React/RCTNetwork (= 0.48.0) + - React/RCTText (= 0.48.0) - SDWebImage (< 4, >= 3.7.2) - SentryReactNative (= 0.14.5) - - Yoga (= 0.45.0-rc.2.React) + - Yoga (= 0.48.0.React) - Extraction (1.2.3): - Extraction/ARAnimationContinuation (= 1.2.3) - Extraction/ARLoadFailureView (= 1.2.3) @@ -63,33 +63,36 @@ PODS: - NSURL+QueryDictionary (1.2.0) - ORStackView (2.0.3): - FLKAutoLayout - - React (0.45.0-rc.2): - - React/Core (= 0.45.0-rc.2) - - React/BatchedBridge (0.45.0-rc.2): + - React (0.48.0): + - React/Core (= 0.48.0) + - React/BatchedBridge (0.48.0): - React/Core - React/cxxreact_legacy - - React/Core (0.45.0-rc.2): - - Yoga (= 0.45.0-rc.2.React) - - React/cxxreact_legacy (0.45.0-rc.2): + - React/Core (0.48.0): + - Yoga (= 0.48.0.React) + - React/cxxreact_legacy (0.48.0): - React/jschelpers_legacy - - React/DevSupport (0.45.0-rc.2): + - React/DevSupport (0.48.0): - React/Core - React/RCTWebSocket - - React/jschelpers_legacy (0.45.0-rc.2) - - React/RCTAnimation (0.45.0-rc.2): + - React/jschelpers_legacy (0.48.0) + - React/RCTAnimation (0.48.0): - React/Core - - React/RCTCameraRoll (0.45.0-rc.2): + - React/RCTBlob (0.48.0): + - React/Core + - React/RCTCameraRoll (0.48.0): - React/Core - React/RCTImage - - React/RCTImage (0.45.0-rc.2): + - React/RCTImage (0.48.0): - React/Core - React/RCTNetwork - - React/RCTNetwork (0.45.0-rc.2): + - React/RCTNetwork (0.48.0): - React/Core - - React/RCTText (0.45.0-rc.2): + - React/RCTText (0.48.0): - React/Core - - React/RCTWebSocket (0.45.0-rc.2): + - React/RCTWebSocket (0.48.0): - React/Core + - React/RCTBlob - SAMKeychain (1.5.0) - SDWebImage (3.7.5): - SDWebImage/Core (= 3.7.5) @@ -104,7 +107,7 @@ PODS: - Sentry (~> 3.1.2) - Sentry/KSCrash (~> 3.1.2) - UIView+BooleanAnimations (1.0.2) - - Yoga (0.45.0-rc.2.React) + - Yoga (0.48.0.React) DEPENDENCIES: - AppHub (from `https://github.com/orta/apphub.git`, branch `build_list`) @@ -151,20 +154,20 @@ SPEC CHECKSUMS: Artsy+UIColors: 31c03c4146f5e6618a9b950f37dfe02dd9ac09a6 Artsy+UIFonts: e66afb5c40100e2fc5bba28feb7487e252f2d06f Artsy-UIButtons: cdcc3ccf4d0d31ee80f45c1d11ffd2d772695b74 - Emission: 6fc77205363e5070b0d4a99bf38a0763ea87b543 + Emission: 7cd023eeebd140217dc39f30b311a402af4ac4bc Extraction: 612cf0866f74d4c0dd616677ff24146efa200958 FLKAutoLayout: 106b14dbae09d32c6730190f4e78a959759ba4a4 ISO8601DateFormatter: 4551b6ce4f83185425f583b0b3feb3c7b59b942c KSCrash: 7bd106ca4a2247774deeeb587c740ce0207de8f3 NSURL+QueryDictionary: bae616404e2adf6409d3d5c02a093cbf44c8a236 ORStackView: b9507271cb41fb9e0b3eecc6414d831201e7cf7c - React: c30b44eb8e84d2071fb78cd1ed58e1512a822a57 + React: 830e32675a1cef76f854240fbda322282b150f98 SAMKeychain: 1fc9ae02f576365395758b12888c84704eebc423 SDWebImage: 69c6303e3348fba97e03f65d65d4fbc26740f461 Sentry: 5a578891f177e994d89d57effc70adb97bfb29db SentryReactNative: 8f251df76f03c5ee42e702f37a41803709632217 UIView+BooleanAnimations: a760be9a066036e55f298b7b7350a6cb14cfcd97 - Yoga: d43165f478a090e7b603edc5796965a1de27d473 + Yoga: 056a82a5b4abd6b145f3d341176406e7174afff6 PODFILE CHECKSUM: 0c385e9313daa3b7b7130176793f59f9c6ee2778 diff --git a/Pod/Classes/Core/RCTScrollView+EnclosingScrollView.m b/Pod/Classes/Core/RCTScrollView+EnclosingScrollView.m index 3db27f0b71..2cae5800e6 100644 --- a/Pod/Classes/Core/RCTScrollView+EnclosingScrollView.m +++ b/Pod/Classes/Core/RCTScrollView+EnclosingScrollView.m @@ -21,98 +21,107 @@ @interface RCTScrollEvent : NSObject - (instancetype)initWithEventName:(NSString *)eventName reactTag:(NSNumber *)reactTag - scrollView:(UIScrollView *)scrollView + scrollViewContentOffset:(CGPoint)scrollViewContentOffset + scrollViewContentInset:(UIEdgeInsets)scrollViewContentInset + scrollViewContentSize:(CGSize)scrollViewContentSize + scrollViewFrame:(CGRect)scrollViewFrame + scrollViewZoomScale:(CGFloat)scrollViewZoomScale userData:(NSDictionary *)userData coalescingKey:(uint16_t)coalescingKey NS_DESIGNATED_INITIALIZER; @end @interface RCTDescendantScrollEvent : RCTScrollEvent +@property (nonatomic, strong, readonly) NSDictionary *body; @end @implementation RCTDescendantScrollEvent -{ - NSDictionary *__userData; - UIScrollView *__scrollView; - UIScrollView *_enclosingScrollView; -} + +@synthesize body = _body; - (instancetype)initWithEventName:(NSString *)eventName reactTag:(NSNumber *)reactTag - scrollView:(UIScrollView *)scrollView - enclosingScrollView:(UIScrollView *)enclosingScrollView + scrollViewContentOffset:(CGPoint)scrollViewContentOffset + scrollViewContentInset:(UIEdgeInsets)scrollViewContentInset + scrollViewContentSize:(CGSize)scrollViewContentSize + scrollViewZoomScale:(CGFloat)scrollViewZoomScale + enclosingScrollViewFrame:(CGRect)enclosingScrollViewFrame userData:(NSDictionary *)userData coalescingKey:(uint16_t)coalescingKey { - if ((self = [super initWithEventName:eventName - reactTag:reactTag - scrollView:scrollView - userData:userData - coalescingKey:coalescingKey])) { - __userData = userData; - __scrollView = scrollView; - _enclosingScrollView = enclosingScrollView; + // Use the enclosing scrollview’s dimensions for `scrollViewFrame``, because it is likely that the receiver wants to + // do calculations based on the location of the content in the enclosing scrollview. + if ((self = [super initWithEventName:(NSString *)eventName + reactTag:(NSNumber *)reactTag + scrollViewContentOffset:(CGPoint)scrollViewContentOffset + scrollViewContentInset:(UIEdgeInsets)scrollViewContentInset + scrollViewContentSize:(CGSize)scrollViewContentSize + scrollViewFrame:(CGRect)enclosingScrollViewFrame + scrollViewZoomScale:(CGFloat)scrollViewZoomScale + userData:(NSDictionary *)userData + coalescingKey:(uint16_t)coalescingKey])) { + // Theoretically it’s probably better to calculate this once `body` is actually used (which is what the superclass + // does) but that probably works in conjunction with coalescing, something we don’t do atm anyways. + NSDictionary *body = @{ + @"contentOffset": @{ + @"x": @(scrollViewContentOffset.x), + @"y": @(scrollViewContentOffset.y) + }, + @"contentInset": @{ + @"top": @(scrollViewContentInset.top), + @"left": @(scrollViewContentInset.left), + @"bottom": @(scrollViewContentInset.bottom), + @"right": @(scrollViewContentInset.right) + }, + @"contentSize": @{ + @"width": @(scrollViewContentSize.width), + @"height": @(scrollViewContentSize.height) + }, + @"layoutMeasurement": @{ + @"width": @(enclosingScrollViewFrame.size.width), + @"height": @(enclosingScrollViewFrame.size.height) + }, + @"zoomScale": @(scrollViewZoomScale ?: 1), + }; + + if (userData) { + NSMutableDictionary *mutableBody = [body mutableCopy]; + [mutableBody addEntriesFromDictionary:userData]; + body = [mutableBody copy]; + } + + _body = body; } return self; } -- (NSDictionary *)body -{ - CGPoint originOffset = [__scrollView convertPoint:CGPointZero toView:_enclosingScrollView]; - - CGPoint contentOffset = _enclosingScrollView.contentOffset; - // TODO: contentOffset.x -= originOffset.x; - contentOffset.x = __scrollView.contentOffset.x; - contentOffset.y -= originOffset.y; - - NSDictionary *body = @{ - @"contentOffset": @{ - @"x": @(contentOffset.x), - @"y": @(contentOffset.y) - }, - @"contentInset": @{ - @"top": @(__scrollView.contentInset.top), - @"left": @(__scrollView.contentInset.left), - @"bottom": @(__scrollView.contentInset.bottom), - @"right": @(__scrollView.contentInset.right) - }, - @"contentSize": @{ - @"width": @(__scrollView.contentSize.width), - @"height": @(__scrollView.contentSize.height) - }, - // Use the enclosing scrollview’s dimensions here, because it is likely that the receiver - // wants to do calculations based on the location of the content in the enclosing scrollview. - @"layoutMeasurement": @{ - @"width": @(_enclosingScrollView.frame.size.width), - @"height": @(_enclosingScrollView.frame.size.height) - }, - @"zoomScale": @(__scrollView.zoomScale ?: 1), - }; - - if (__userData) { - NSMutableDictionary *mutableBody = [body mutableCopy]; - [mutableBody addEntriesFromDictionary:__userData]; - body = mutableBody; - } - - return body; -} - @end @implementation RCTScrollEvent (RCTEnclosingScrollView) -- (RCTDescendantScrollEvent *)scrollEventRelativeToDescendant:(UIScrollView *)descendantScrollView - reactTag:(NSNumber *)reactTag - coalescingKey:(uint16_t)coalescingKey +- (RCTDescendantScrollEvent *)scrollEventForScrollView:(UIScrollView *)scrollView + relativeFromEnclosingScrollView:(UIScrollView *)enclosingScrollView + reactTag:(NSNumber *)reactTag + coalescingKey:(uint16_t)coalescingKey { + // TODO: Is this not simply scrollView.frame.origin ? + CGPoint originOffset = [scrollView convertPoint:CGPointZero toView:enclosingScrollView]; + CGPoint contentOffset = enclosingScrollView.contentOffset; + // TODO: contentOffset.x -= originOffset.x; + contentOffset.x = scrollView.contentOffset.x; + contentOffset.y -= originOffset.y; + return [[RCTDescendantScrollEvent alloc] initWithEventName:self.eventName reactTag:reactTag - scrollView:descendantScrollView - enclosingScrollView:[self valueForKey:@"_scrollView"] + scrollViewContentOffset:contentOffset + scrollViewContentInset:scrollView.contentInset + scrollViewContentSize:scrollView.contentSize + scrollViewZoomScale:scrollView.zoomScale + enclosingScrollViewFrame:enclosingScrollView.frame userData:[self valueForKey:@"_userData"] coalescingKey:coalescingKey]; + } @end @@ -136,10 +145,10 @@ - (void)sendScrollEventWithName:(NSString *)eventName // userData:userData // coalescingKey:_coalescingKey]; // [_eventDispatcher sendEvent:scrollEvent]; - - + + uint16_t coalescingKey = [[self valueForKey:@"_coalescingKey"] unsignedIntegerValue]; - + if (![eventName isEqualToString:[self valueForKey:@"_lastEmittedEventName"]]) { coalescingKey++; [self setValue:@(coalescingKey) forKey:@"_coalescingKey"]; @@ -148,7 +157,11 @@ - (void)sendScrollEventWithName:(NSString *)eventName RCTScrollEvent *scrollEvent = [[RCTScrollEvent alloc] initWithEventName:eventName reactTag:self.reactTag - scrollView:scrollView + scrollViewContentOffset:self.scrollView.contentOffset + scrollViewContentInset:self.contentInset + scrollViewContentSize:self.contentSize + scrollViewFrame:self.frame + scrollViewZoomScale:self.scrollView.zoomScale userData:userData coalescingKey:coalescingKey]; [[self valueForKey:@"_eventDispatcher"] sendEvent:scrollEvent]; @@ -164,9 +177,9 @@ - (void)_enclosingRCTScrollViewEvent:(NSNotification *)notification; // I was not able to find a great place in RN where the ancestor view hierarchy // is guaranteed to exist. // - RCTScrollView *scrollView = notification.object; + RCTScrollView *enclosingScrollView = notification.object; // Only handle events of scrollviews that actually enclose this scrollview. - if (scrollView == self || ![self isDescendantOfView:scrollView]) { + if (enclosingScrollView == self || ![self isDescendantOfView:enclosingScrollView]) { return; } @@ -174,23 +187,24 @@ - (void)_enclosingRCTScrollViewEvent:(NSNotification *)notification; // The enclosing scroll view *must* have a throttle amount set or // it won’t send more scroll move events. // - if (scrollView.scrollEventThrottle == 0) { - scrollView.scrollEventThrottle = self.scrollEventThrottle; + if (enclosingScrollView.scrollEventThrottle == 0) { + enclosingScrollView.scrollEventThrottle = self.scrollEventThrottle; } - + RCTScrollEvent *scrollEvent = notification.userInfo[@"event"]; - + uint16_t coalescingKey = [[self valueForKey:@"_coalescingKey"] unsignedIntegerValue]; - + if (![scrollEvent.eventName isEqualToString:[self valueForKey:@"_lastEmittedEventName"]]) { coalescingKey++; [self setValue:@(coalescingKey) forKey:@"_coalescingKey"]; [self setValue:scrollEvent.eventName forKey:@"_lastEmittedEventName"]; } - scrollEvent = [scrollEvent scrollEventRelativeToDescendant:self.scrollView - reactTag:self.reactTag - coalescingKey:coalescingKey]; + scrollEvent = [scrollEvent scrollEventForScrollView:self.scrollView + relativeFromEnclosingScrollView:enclosingScrollView.scrollView + reactTag:self.reactTag + coalescingKey:coalescingKey]; [[self valueForKey:@"_eventDispatcher"] sendEvent:scrollEvent]; } diff --git a/__mocks__/react-relay.js b/__mocks__/react-relay.js index a0af1771cb..7c7a4b5f91 100644 --- a/__mocks__/react-relay.js +++ b/__mocks__/react-relay.js @@ -1,11 +1,11 @@ // Comes from https://github.com/facebook/relay/issues/161 // Should be used in tests as a replacement for `react-storybooks-relay-container` // -var Relay = require.requireActual('react-relay') +var Relay = require.requireActual("react-relay") module.exports = { - QL: Relay.QL, - Mutation: Relay.Mutation, - Route: Relay.Route, - createContainer: (component) => component, -} \ No newline at end of file + createFragmentContainer: component => component, + createPaginationContainer: component => component, + createRefetchContainer: component => component, + graphql: Relay.graphql, +} diff --git a/index.ios.js b/index.ios.js index 85005b2014..95b7020d1b 100644 --- a/index.ios.js +++ b/index.ios.js @@ -3,7 +3,6 @@ import "./src/lib/ErrorReporting" import Containers from "./src/lib/Containers" import Components from "./src/lib/Components" -import Routes from "./src/lib/relay/routes" import "./src/lib/relay/config" import "./src/lib/AppRegistry" @@ -11,5 +10,4 @@ import "./src/lib/AppRegistry" export default { Containers, Components, - Routes, } diff --git a/package.json b/package.json index 15f811c7da..adbdb8c17f 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "ci": "npm run type-check && npm run lint && npm run prettier-project -- -l && npm run test", "danger": "danger", "start": "npm run clean-example && npm run start-servers", - "start-servers": "concurrently --kill-others 'npm run start-packager' 'npm run storybook'", + "start-servers": "concurrently --kill-others 'npm run start-packager' 'npm run relay -- --watch' 'npm run storybook'", "start-packager": "env REACT_DEBUGGER=\"$([ -d '/Applications/React Native Debugger.app' ] && echo \"open 'rndebugger://set-debugger-loc?host=localhost&port=8081' --args\")\" node node_modules/react-native/local-cli/cli.js start", "storybook": "storybook start -p 9001 -c .storybook --skip-packager", "ios": "node node_modules/react-native/local-cli/cli.js run-ios", @@ -28,6 +28,7 @@ "test": "jest", "testing": "jest --watch", "tslint": "tslint", + "relay": "relay-compiler --src ./src --schema data/schema.graphql --extensions ts tsx", "sync-colors": "cd externals/elan && git fetch && git checkout origin/master && cp components/lib/variables/colors.json ../../data", "sync-externals": "npm run-script sync-schema && npm run-script sync-colors", "sync-schema": "cd externals/metaphysics && git fetch && git checkout origin/master && yarn install && npm run dump-schema -- ../../data && rm -rf node_modules", @@ -40,47 +41,58 @@ "type": "git", "url": "git+https://github.com/artsy/emission.git" }, - "keywords": ["artsy", "react", "react-native"], + "keywords": [ + "artsy", + "react", + "react-native" + ], "author": "Eloy Durán", "license": "MIT", "bugs": { "url": "https://github.com/artsy/emission/issues" }, "homepage": "https://github.com/artsy/emission#readme", - "files": ["index.js", "data", "lib"], + "files": [ + "index.js", + "data", + "lib" + ], "dependencies": { "lodash": "^4.17.4", "moment": "latest", "prop-types": "^15.5.10", - "qs": "*", "react": "16.0.0-alpha.12", - "react-native": "next", + "react-native": "0.48.0", "react-native-parallax-scroll-view": "https://github.com/orta/react-native-parallax-scroll-view", "react-native-reversed-flat-list": "^1.0.1", "react-native-sentry": "^0.14.5", - "react-relay": "https://github.com/alloy/relay/releases/download/react-relay-0.9.3%2Breact-native-0.45-fix-2/react-relay-0.9.3.react-native-0.45-fix-2.tgz", + "react-relay": "https://github.com/alloy/relay/releases/download/v1.3.0-artsy/react-relay-1.3.0-artsy.1.tgz", + "relay-runtime": "https://github.com/alloy/relay/releases/download/v1.3.0-artsy/relay-runtime-artsy.1.tgz", "remove-markdown": "0.1.0", "styled-components": "^2.0.0" }, "devDependencies": { + "@playlyfe/gql": "^2.3.2", "@storybook/react-native": "^3.2.0", - "@types/jest": "^19.2.2", + "@types/jest": "^20.0.8", "@types/lodash": "^4.14.64", - "@types/qs": "^6.5.0", - "@types/react-native": "^0.44.0", - "@types/react-relay": "^0.9.10", - "@types/react-test-renderer": "^15.5.0", + "@types/react": "^16.0.5", + "@types/react-native": "^0.48.0", "apphub": "^0.5.1", "awesome-typescript-loader": "^3.1.3", "babel-jest": "^18.0.0", + "babel-plugin-relay": "https://github.com/alloy/relay/releases/download/v1.3.0-artsy/babel-plugin-relay-1.3.0-artsy.1.tgz", "babel-polyfill": "^6.13.0", + "babel-preset-es2015": "^6.24.1", + "babel-preset-react": "^6.24.1", "babel-preset-react-native": "^1.9.1", - "babel-relay-plugin": "https://github.com/alloy/relay/releases/download/v0.9.3/babel-relay-plugin-0.9.3.tgz", + "babel-preset-stage-0": "^6.24.1", "concurrently": "^2.2.0", "danger": "2.0.0-alpha-14", - "jest": "^20.0.4", + "jest": "^21.0.1", "jest-react-native": "18.0.0", - "jest-snapshots-svg": "^0.0.18", + "jest-snapshots-svg": "^0.0.21", + "jest-styled-components": "^4.5.0", "lint-staged": "^3.4.1", "prettier": "^1.5.2", "react-dom": "16.0.0-alpha.12", @@ -88,41 +100,57 @@ "react-storybooks-relay-container": "^1.0.0", "react-test-renderer": "16.0.0-alpha.12", "recursive-readdir-sync": "^1.0.6", + "relay-compiler": "https://github.com/alloy/relay/releases/download/v1.3.0-artsy/relay-compiler-1.3.0-artsy.1.tgz", "relay2ts": "^0.2.0", "stylelint": "^7.13.0", "stylelint-config-standard": "^16.0.0", "stylelint-processor-styled-components": "^0.1.2", - "ts-jest": "^20.0.3", + "ts-jest": "^21.0.0", "tslint": "^5.4.3", "tslint-config-prettier": "^1.0.0", "typescript": "^2.3.2" }, - "peerDependencies": { - "babel-relay-plugin": "^0.9.0" - }, "jest": { "preset": "react-native", - "moduleFileExtensions": ["ts", "tsx", "js"], + "globals": { + "ts-jest": { + "useBabelrc": true + } + }, + "moduleFileExtensions": [ + "ts", + "tsx", + "js" + ], "transform": { "^.+\\.js$": "/node_modules/babel-jest", ".(ts|tsx)": "/node_modules/ts-jest/preprocessor.js" }, "testRegex": "/__tests__/.*-tests.(ts|tsx|js)$", - "testPathIgnorePatterns": ["\\.snap$", "/node_modules/"], - "setupFiles": ["./src/setupJest.ts"], + "testPathIgnorePatterns": [ + "\\.snap$", + "/node_modules/" + ], + "setupFiles": [ + "./src/setupJest.ts" + ], "cacheDirectory": ".jest/cache" }, - "graphql": { - "file": "data/schema.json", - "tsInterfaceName": "RelayProps" - }, "lint-staged": { - "*.@(ts|tsx)": ["tslint --fix", "npm run prettier-write --", "git add"], - "*.json": ["npm run prettier-write --"] + "*.@(ts|tsx)": [ + "tslint --fix", + "npm run prettier-write --", + "git add" + ], + "*.json": [ + "npm run prettier-write --" + ] }, "config": { "react-native-storybook-loader": { - "searchDir": ["./src"], + "searchDir": [ + "./src" + ], "pattern": "**/*.story.tsx", "outputFile": "./storybook/storyLoader.js" } diff --git a/rn-cli.config.js b/rn-cli.config.js index c3e4b1ed22..3739a87398 100644 --- a/rn-cli.config.js +++ b/rn-cli.config.js @@ -1,10 +1,8 @@ -var blacklist = require("react-native/packager/blacklist") +const blacklist = require("metro-bundler/src/blacklist") var config = { getBlacklistRE(platform) { - return blacklist(platform, [ - /coverage\/.*/ - ]) + return blacklist(platform, [/coverage\/.*/]) }, getSourceExts() { diff --git a/src/lib/AppRegistry.tsx b/src/lib/AppRegistry.tsx index 05d8dc3c28..f5b91bd6a9 100644 --- a/src/lib/AppRegistry.tsx +++ b/src/lib/AppRegistry.tsx @@ -1,137 +1,83 @@ import * as _ from "lodash" import * as React from "react" import { AppRegistry, ViewProperties } from "react-native" -import * as Relay from "react-relay" import Consignments from "./Components/Consignments" import LoadFailureView from "./Components/LoadFailureView" import Spinner from "./Components/Spinner" import Containers from "./Containers/index" -import Routes from "./relay/routes" + +import { + ArtistRenderer, + ConversationRenderer, + GeneRenderer, + HomeRenderer, + InboxRenderer, + InquiryRenderer, + MyAccountRenderer, + RenderCallback, + WorksForYouRenderer, +} from "./relay/QueryRenderers" interface Props extends ViewProperties { trigger1pxScrollHack?: boolean } -class RootContainer extends React.Component { - state: { retrying: boolean } - component: Relay.RelayContainerClass - route: Relay.Route - renderFetched?: Relay.RootContainerProps["renderFetched"] - forceFetch: boolean - - constructor(props) { - super(props) - this.state = { retrying: false } - this.forceFetch = false - } - - render() { - // FIXME: These props are missing from the DefinitelyTyped package. - const untypedProps: any = { forceFetch: this.forceFetch } - - // https://facebook.github.io/relay/docs/guides-root-container.html - return ( - { - if (this.state.retrying) { - // This will re-use the native view first created in the renderFailure callback, which means it can - // continue its ‘retry’ animation. - return - } else { - return - } - }} - renderFailure={(error, retry) => { - this.state.retrying = true - return - }} - {...untypedProps} - /> - ) - } -} - -class Artist extends RootContainer { - constructor(props) { - super(props) - this.component = Containers.Artist - this.route = new Routes.Artist({ artistID: props.artistID }) +const renderWithLoadProgress = (Component: React.ReactType, initialProps: object = {}): RenderCallback => { + let retrying = false + return ({ error, props, retry }) => { + if (error) { + if (retrying) { + retrying = false + // TODO Even though this code path is reached, the retry button keeps spinning. iirc it _should_ disappear when + // `onRetry` on the instance is unset. + // + // This will re-use the native view first created in the renderFailure callback, which means it can + // continue its ‘retry’ animation. + return + } else { + retrying = true + return + } + } else if (props) { + return + } else { + return + } } } -class Gene extends RootContainer { - constructor(props) { - super(props) - this.component = Containers.Gene +const Artist: React.SFC<{ artistID: string }> = props => + - const medium = _.get(props, "refineSettings.medium") - const priceRange = _.get(props, "refineSettings.price_range") as string +const Inbox: React.SFC<{}> = () => - this.route = new Routes.Gene({ - geneID: props.geneID, - medium: medium ? medium : "*", - // The replace can be removed once metaphysics#486 is merged - price_range: priceRange ? priceRange.replace(/\.00/g, "") : "*-*", - }) - } +const Gene: React.SFC<{ geneID: string; refineSettings: { medium: string; price_range: string } }> = ({ + geneID, + refineSettings: { medium, price_range }, +}) => { + const initialProps = { geneID, medium, price_range } + return } -class Home extends RootContainer { - constructor(props) { - super(props) - this.component = Containers.Home - this.route = new Routes.Home() - this.renderFetched = data => - } -} +// TODO This was required to trigger the 1px wake-up hack (in case the scrollview goes blank) +// +// this.renderFetched = data => +const Home: React.SFC<{}> = () => -class WorksForYou extends RootContainer { - constructor(props) { - super(props) +// TODO This was required to trigger the 1px wake-up hack (in case the scrollview goes blank) +// +// this.renderFetched = data => +const WorksForYou: React.SFC<{ selectedArtist: string }> = props => + - this.component = Containers.WorksForYou - this.route = new Routes.WorksForYou({ selectedArtist: props.selectedArtist }) - this.renderFetched = data => - - } -} - -class MyAccount extends RootContainer { - constructor(props) { - super(props) - this.component = Containers.MyAccount - this.route = new Routes.MyAccount() - } -} +const Inquiry: React.SFC<{ artworkID: string }> = props => + -class Inbox extends RootContainer { - constructor(props) { - super(props) - this.component = Containers.Inbox - this.route = new Routes.MyAccount() - this.forceFetch = true - } -} +const Conversation: React.SFC<{ conversationID: string }> = props => + -class Conversation extends RootContainer { - constructor(props) { - super(props) - this.component = Containers.Conversation - this.route = new Routes.Conversation({ conversationID: props.conversationID }) - } -} - -class Inquiry extends RootContainer { - constructor(props) { - super(props) - this.component = Containers.Inquiry - this.route = new Routes.Inquiry({ artworkID: props.artworkID }) - } -} +const MyAccount: React.SFC<{}> = () => AppRegistry.registerComponent("Consignments", () => Consignments) AppRegistry.registerComponent("Artist", () => Artist) diff --git a/src/lib/Components/Artist/About.tsx b/src/lib/Components/Artist/About.tsx index 43dcf5aceb..4f2386218a 100644 --- a/src/lib/Components/Artist/About.tsx +++ b/src/lib/Components/Artist/About.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { Dimensions, StyleSheet, View, ViewProperties } from "react-native" @@ -71,21 +71,20 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(About, { - fragments: { - artist: () => Relay.QL` - fragment on Artist { - has_metadata - is_display_auction_link - id - ${Biography.getFragment("artist")} - related_artists: artists(size: 16) { - ${RelatedArtists.getFragment("artists")} - } - articles { - ${Articles.getFragment("articles")} - } +export default createFragmentContainer( + About, + graphql` + fragment About_artist on Artist { + has_metadata + is_display_auction_link + id + ...Biography_artist + related_artists: artists(size: 16) { + ...RelatedArtists_artists } - `, - }, -}) + articles { + ...Articles_articles + } + } + ` +) diff --git a/src/lib/Components/Artist/Articles/Article.tsx b/src/lib/Components/Artist/Articles/Article.tsx index 4596a2f54b..d10e2b8300 100644 --- a/src/lib/Components/Artist/Articles/Article.tsx +++ b/src/lib/Components/Artist/Articles/Article.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { StyleSheet, Text, TextStyle, TouchableWithoutFeedback, View, ViewProperties, ViewStyle } from "react-native" @@ -84,22 +84,21 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(Article, { - fragments: { - article: () => Relay.QL` - fragment on Article { - thumbnail_title - href - author { - name - } - thumbnail_image { - url(version: "large") - } +export default createFragmentContainer( + Article, + graphql` + fragment Article_article on Article { + thumbnail_title + href + author { + name } - `, - }, -}) + thumbnail_image { + url(version: "large") + } + } + ` +) interface RelayProps { article: { diff --git a/src/lib/Components/Artist/Articles/index.tsx b/src/lib/Components/Artist/Articles/index.tsx index c35bec4611..1a73498c31 100644 --- a/src/lib/Components/Artist/Articles/index.tsx +++ b/src/lib/Components/Artist/Articles/index.tsx @@ -1,6 +1,6 @@ import * as React from "react" import { ScrollView, StyleSheet, View, ViewProperties } from "react-native" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import SerifText from "../../Text/Serif" import Article from "./Article" @@ -39,16 +39,15 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(Articles, { - fragments: { - articles: () => Relay.QL` - fragment on Article @relay(plural: true) { - __id - ${Article.getFragment("article")} - } - `, - }, -}) +export default createFragmentContainer( + Articles, + graphql` + fragment Articles_articles on Article @relay(plural: true) { + __id + ...Article_article + } + ` +) interface RelayProps { articles: Array<{ diff --git a/src/lib/Components/Artist/Artworks/index.tsx b/src/lib/Components/Artist/Artworks/index.tsx index ab5b354028..d3a9ede0b6 100644 --- a/src/lib/Components/Artist/Artworks/index.tsx +++ b/src/lib/Components/Artist/Artworks/index.tsx @@ -1,8 +1,9 @@ import * as React from "react" import { StyleSheet, View, ViewProperties } from "react-native" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" -import ArtworksGrid from "../../ArtworkGrids/RelayConnections/ArtistArtworksGrid" +import ArtistForSaleArtworksGrid from "../../ArtworkGrids/RelayConnections/ArtistForSaleArtworksGrid" +import ArtistNotForSaleArtworksGrid from "../../ArtworkGrids/RelayConnections/ArtistNotForSaleArtworksGrid" import Separator from "../../Separator" import SerifText from "../../Text/Serif" @@ -41,6 +42,8 @@ class Artworks extends React.Component { count: otherCount, filter: "IS_NOT_FOR_SALE", onComplete: null, + Component: ArtistNotForSaleArtworksGrid, + queryKey: "notForSaleArtworks", }) } else { const otherWorks: any[] = [] @@ -53,6 +56,8 @@ class Artworks extends React.Component { count: otherCount, filter: "IS_NOT_FOR_SALE", onComplete: null, + Component: ArtistNotForSaleArtworksGrid, + queryKey: "notForSaleArtworks", }) ) } @@ -65,6 +70,8 @@ class Artworks extends React.Component { onComplete: () => { this.setState({ completedForSaleWorks: true }) }, + Component: ArtistForSaleArtworksGrid, + queryKey: "forSaleArtworks", })} {otherWorks} @@ -72,14 +79,14 @@ class Artworks extends React.Component { } } - renderSection({ title, count, filter, onComplete }) { + renderSection({ title, count, filter, onComplete, Component, queryKey }) { const countStyles = [styles.text, styles.count] return ( {title} ({count}) - + ) } @@ -104,20 +111,19 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(Artworks, { - fragments: { - artist: () => Relay.QL` - fragment on Artist { - counts { - artworks - for_sale_artworks - } - ${ArtworksGrid.getFragment("artist", { filter: "IS_FOR_SALE" })} - ${ArtworksGrid.getFragment("artist", { filter: "IS_NOT_FOR_SALE" })} +export default createFragmentContainer( + Artworks, + graphql.experimental` + fragment Artworks_artist on Artist { + counts { + artworks + for_sale_artworks } - `, - }, -}) + ...ArtistForSaleArtworksGrid_artist + ...ArtistNotForSaleArtworksGrid_artist + } + ` +) interface RelayProps { artist: { diff --git a/src/lib/Components/Artist/Biography.tsx b/src/lib/Components/Artist/Biography.tsx index 6317743904..2704d76c16 100644 --- a/src/lib/Components/Artist/Biography.tsx +++ b/src/lib/Components/Artist/Biography.tsx @@ -1,8 +1,8 @@ import * as React from "react" import { Dimensions, StyleSheet, View, ViewProperties } from "react-native" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" -import * as removeMarkdown from "remove-markdown" +import removeMarkdown from "remove-markdown" import Headline from "../Text/Headline" import SerifText from "../Text/Serif" @@ -60,16 +60,15 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(Biography, { - fragments: { - artist: () => Relay.QL` - fragment on Artist { - bio - blurb - } - `, - }, -}) +export default createFragmentContainer( + Biography, + graphql` + fragment Biography_artist on Artist { + bio + blurb + } + ` +) interface RelayProps { artist: { diff --git a/src/lib/Components/Artist/Header.tsx b/src/lib/Components/Artist/Header.tsx index c1a38a5496..49d6e86588 100644 --- a/src/lib/Components/Artist/Header.tsx +++ b/src/lib/Components/Artist/Header.tsx @@ -1,6 +1,6 @@ import * as PropTypes from "prop-types" import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { Dimensions, NativeModules, StyleSheet, TextStyle, View, ViewStyle } from "react-native" const { ARTemporaryAPIModule } = NativeModules @@ -170,22 +170,21 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(Header, { - fragments: { - artist: () => Relay.QL` - fragment on Artist { - _id - id - name - nationality - birthday - counts { - follows - } +export default createFragmentContainer( + Header, + graphql` + fragment Header_artist on Artist { + _id + id + name + nationality + birthday + counts { + follows } - `, - }, -}) + } + ` +) interface RelayProps { artist: { diff --git a/src/lib/Components/Artist/Shows/Metadata.tsx b/src/lib/Components/Artist/Shows/Metadata.tsx index 367993fd21..c825f2d6c0 100644 --- a/src/lib/Components/Artist/Shows/Metadata.tsx +++ b/src/lib/Components/Artist/Shows/Metadata.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { StyleSheet, Text, TextStyle, View, ViewProperties, ViewStyle } from "react-native" @@ -100,25 +100,24 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(Metadata, { - fragments: { - show: () => Relay.QL` - fragment on PartnerShow { - kind +export default createFragmentContainer( + Metadata, + graphql` + fragment Metadata_show on PartnerShow { + kind + name + exhibition_period + status_update + status + partner { name - exhibition_period - status_update - status - partner { - name - } - location { - city - } } - `, - }, -}) + location { + city + } + } + ` +) interface RelayProps { show: { diff --git a/src/lib/Components/Artist/Shows/Show.tsx b/src/lib/Components/Artist/Shows/Show.tsx index f027f98b83..493d6bfcde 100644 --- a/src/lib/Components/Artist/Shows/Show.tsx +++ b/src/lib/Components/Artist/Shows/Show.tsx @@ -1,10 +1,10 @@ import * as React from "react" import { TouchableWithoutFeedback, View, ViewProperties } from "react-native" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import SwitchBoard from "../../../NativeModules/SwitchBoard" import OpaqueImageView from "../../OpaqueImageView" -import ShowMetadata from "./Metadata" +import Metadata from "./Metadata" interface Props extends ViewProperties { show: { @@ -36,26 +36,25 @@ class Show extends React.Component { - + ) } } -export default Relay.createContainer(Show, { - fragments: { - show: () => Relay.QL` - fragment on PartnerShow { - href - cover_image { - url(version: "large") - } - ${ShowMetadata.getFragment("show")} +export default createFragmentContainer( + Show, + graphql` + fragment Show_show on PartnerShow { + href + cover_image { + url(version: "large") } - `, - }, -}) + ...Metadata_show + } + ` +) interface RelayProps { show: { diff --git a/src/lib/Components/Artist/Shows/SmallList.tsx b/src/lib/Components/Artist/Shows/SmallList.tsx index 8fa6631e43..441289d6bd 100644 --- a/src/lib/Components/Artist/Shows/SmallList.tsx +++ b/src/lib/Components/Artist/Shows/SmallList.tsx @@ -1,6 +1,6 @@ import * as React from "react" import { ListView, ListViewDataSource, StyleSheet, View, ViewProperties } from "react-native" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import Show from "./Show" @@ -63,15 +63,14 @@ const showStyles = StyleSheet.create({ }, }) -export default Relay.createContainer(SmallList, { - fragments: { - shows: () => Relay.QL` - fragment on PartnerShow @relay(plural: true) { - ${Show.getFragment("show")} - } - `, - }, -}) +export default createFragmentContainer( + SmallList, + graphql` + fragment SmallList_shows on PartnerShow @relay(plural: true) { + ...Show_show + } + ` +) interface RelayProps { shows: Array<{} | null> | null diff --git a/src/lib/Components/Artist/Shows/VariableSizeShowsList.tsx b/src/lib/Components/Artist/Shows/VariableSizeShowsList.tsx index b16c9e254e..282352b51e 100644 --- a/src/lib/Components/Artist/Shows/VariableSizeShowsList.tsx +++ b/src/lib/Components/Artist/Shows/VariableSizeShowsList.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { LayoutChangeEvent, StyleSheet, View, ViewProperties, ViewStyle } from "react-native" @@ -92,16 +92,15 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(ShowsList, { - fragments: { - shows: () => Relay.QL` - fragment on PartnerShow @relay(plural: true) { - __id - ${Show.getFragment("show")} - } - `, - }, -}) +export default createFragmentContainer( + ShowsList, + graphql` + fragment VariableSizeShowsList_shows on PartnerShow @relay(plural: true) { + __id + ...Show_show + } + ` +) interface RelayProps { shows: Array<{ diff --git a/src/lib/Components/Artist/Shows/index.tsx b/src/lib/Components/Artist/Shows/index.tsx index 80626b2da1..04dd40b49b 100644 --- a/src/lib/Components/Artist/Shows/index.tsx +++ b/src/lib/Components/Artist/Shows/index.tsx @@ -1,11 +1,11 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { Dimensions, StyleSheet, TextStyle, View, ViewProperties, ViewStyle } from "react-native" import Separator from "../../Separator" import SerifText from "../../Text/Serif" -import SmallShowsList from "./SmallList" +import SmallList from "./SmallList" import VariableSizeShowsList from "./VariableSizeShowsList" const windowDimensions = Dimensions.get("window") @@ -43,11 +43,11 @@ class Shows extends React.Component { } pastShowsList() { - if (windowDimensions.width > 700) { - return - } else { - return - } + // if (windowDimensions.width > 700) { + // return + // } else { + return + // } } currentAndUpcomingList() { @@ -79,26 +79,26 @@ const styles = StyleSheet.create({ }, }) -const pastShowsFragment = - windowDimensions.width > 700 ? VariableSizeShowsList.getFragment("shows") : SmallShowsList.getFragment("shows") +// TODO How do we dynamically determine what component to use? Needs to be fixed after Relay Modern migration. +// const pastShowsFragment = +// windowDimensions.width > 700 ? VariableSizeShowsList.getFragment("shows") : SmallShowsList.getFragment("shows") -export default Relay.createContainer(Shows, { - fragments: { - artist: () => Relay.QL` - fragment on Artist { - current_shows: partner_shows(status: "running") { - ${VariableSizeShowsList.getFragment("shows")} - } - upcoming_shows: partner_shows(status: "upcoming") { - ${VariableSizeShowsList.getFragment("shows")} - } - past_shows: partner_shows(status: "closed", size: 20) { - ${pastShowsFragment} - } +export default createFragmentContainer( + Shows, + graphql` + fragment Shows_artist on Artist { + current_shows: partner_shows(status: "running") { + ...VariableSizeShowsList_shows } - `, - }, -}) + upcoming_shows: partner_shows(status: "upcoming") { + ...VariableSizeShowsList_shows + } + past_shows: partner_shows(status: "closed", size: 20) { + ...SmallList_shows + } + } + ` +) interface RelayProps { artist: { diff --git a/src/lib/Components/Artist/__stories__/ArtistArticles.story.tsx b/src/lib/Components/Artist/__stories__/ArtistArticles.story.tsx index 3e99dd770c..167349fed3 100644 --- a/src/lib/Components/Artist/__stories__/ArtistArticles.story.tsx +++ b/src/lib/Components/Artist/__stories__/ArtistArticles.story.tsx @@ -1,48 +1,48 @@ -import { storiesOf } from "@storybook/react-native" -import * as React from "react" -import { View } from "react-native" -import StubContainer from "react-storybooks-relay-container" +// TODO Move to metametaphysics after Relay Modern migration. -import ArtistArticles from "../Articles" +// import { storiesOf } from "@storybook/react-native" +// import * as React from "react" +// import { View } from "react-native" +// import StubContainer from "react-storybooks-relay-container" -storiesOf("Artist/Articles") - .addDecorator(story => - - {story()} - - ) - .add("Single Item", () => { - const props = { - articles: [ - { - thumbnail_title: "Example Article", - href: "/artist/glenn-brown", - id: "1", - author: { name: "Made by Orta" }, - thumbnail_image: { url: "" }, - }, - ], - } - return - }) - .add("Multiple Items", () => { - const props = { - articles: [ - { - thumbnail_title: "Example Article", - href: "/artist/glenn-brown", - id: "2", - author: { name: "Made by Orta" }, - thumbnail_image: { url: "" }, - }, - { - thumbnail_title: "Second Article", - href: "/artist/leda-catunda", - id: "3", - author: { name: "Made by Danger" }, - thumbnail_image: { url: "" }, - }, - ], - } - return - }) +// storiesOf("Artist/Articles") +// .addDecorator(story => +// +// {story()} +// +// ) +// .add("Single Item", () => { +// const props = { +// articles: [ +// { +// thumbnail_title: "Example Article", +// href: "/artist/glenn-brown", +// id: "1", +// author: { name: "Made by Orta" }, +// thumbnail_image: { url: "" }, +// }, +// ], +// } +// return +// }) +// .add("Multiple Items", () => { +// const props = { +// articles: [ +// { +// thumbnail_title: "Example Article", +// href: "/artist/glenn-brown", +// id: "2", +// author: { name: "Made by Orta" }, +// thumbnail_image: { url: "" }, +// }, +// { +// thumbnail_title: "Second Article", +// href: "/artist/leda-catunda", +// id: "3", +// author: { name: "Made by Danger" }, +// thumbnail_image: { url: "" }, +// }, +// ], +// } +// return +// }) diff --git a/src/lib/Components/Artist/__stories__/ArtistHeader.story.tsx b/src/lib/Components/Artist/__stories__/ArtistHeader.story.tsx index 7730b874f0..7ab986922d 100644 --- a/src/lib/Components/Artist/__stories__/ArtistHeader.story.tsx +++ b/src/lib/Components/Artist/__stories__/ArtistHeader.story.tsx @@ -1,11 +1,39 @@ import { storiesOf } from "@storybook/react-native" import * as React from "react" import { View } from "react-native" -import { RootContainer } from "react-relay" -import StubContainer from "react-storybooks-relay-container" +import { Environment, Network, RecordSource, Store } from "relay-runtime" +// import StubContainer from "react-storybooks-relay-container" -import Routes from "../../../relay/routes" -import ArtistHeader from "../Header" +import Header from "../Header" + +// TODO Move to metametaphysics after Relay Modern migration +import { graphql, QueryRenderer } from "react-relay" +import createEnvironment from "../../../relay/createEnvironment" +const RootContainer: React.SFC = ({ Component, artistID }) => { + return ( + { + if (error) { + console.error(error) + } else if (props) { + return + } + return null + }} + /> + ) +} storiesOf("Artist/Header") .addDecorator(story => @@ -14,34 +42,34 @@ storiesOf("Artist/Header") ) .add("Real Artist - Glenn Brown", () => { - const artistRoute = new Routes.Artist({ artistID: "glenn-brown" }) - return + return }) .add("Real Artist - Leda Catunda", () => { - const artistRoute = new Routes.Artist({ artistID: "leda-catunda" }) - return - }) - // Note that for these two, the follow button / count will remain the - // same as it was from one of the above artists. Once they are in relay/graphQL - // stubbing that data can be a possiblity - .add("No Birthday", () => { - const props = { - artist: { - name: "Example Data", - nationality: "UK", - counts: { follows: 12 }, - }, - } - return - }) - .add("Full Data", () => { - const api = { - artist: { - name: "Another Exmaple", - nationality: "OK", - birthday: "1999", - counts: { follows: 12 }, - }, - } - return + return }) +// TODO Move to metametaphysics after Relay Modern migration +// +// Note that for these two, the follow button / count will remain the +// same as it was from one of the above artists. Once they are in relay/graphQL +// stubbing that data can be a possiblity +// .add("No Birthday", () => { +// const props = { +// artist: { +// name: "Example Data", +// nationality: "UK", +// counts: { follows: 12 }, +// }, +// } +// return +// }) +// .add("Full Data", () => { +// const api = { +// artist: { +// name: "Another Exmaple", +// nationality: "OK", +// birthday: "1999", +// counts: { follows: 12 }, +// }, +// } +// return +// }) diff --git a/src/lib/Components/ArtworkGrids/Artwork.tsx b/src/lib/Components/ArtworkGrids/Artwork.tsx index 413e2f0a9a..b8fa1e9692 100644 --- a/src/lib/Components/ArtworkGrids/Artwork.tsx +++ b/src/lib/Components/ArtworkGrids/Artwork.tsx @@ -1,7 +1,7 @@ import { map } from "lodash" import * as React from "react" import { Image, StyleSheet, TouchableWithoutFeedback, View } from "react-native" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import colors from "../../../data/colors" import SwitchBoard from "../../NativeModules/SwitchBoard" @@ -108,37 +108,40 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(Artwork, { - fragments: { - artwork: () => Relay.QL` - fragment on Artwork { - title - date - sale_message - is_in_auction - sale_artwork { - opening_bid { display } - current_bid { display } - bidder_positions_count - sale { - is_open - } +export default createFragmentContainer( + Artwork, + graphql` + fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + sale_artwork { + opening_bid { + display } - image { - url(version: "large") - aspect_ratio + current_bid { + display } - artists { - name + bidder_positions_count + sale { + is_open } - partner { - name - } - href } - `, - }, -}) + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + } + partner { + name + } + href + } + ` +) interface RelayProps { artwork: { diff --git a/src/lib/Components/ArtworkGrids/GenericGrid.tsx b/src/lib/Components/ArtworkGrids/GenericGrid.tsx index f99b64e457..3a65e5e066 100644 --- a/src/lib/Components/ArtworkGrids/GenericGrid.tsx +++ b/src/lib/Components/ArtworkGrids/GenericGrid.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { LayoutChangeEvent, StyleSheet, View, ViewStyle } from "react-native" @@ -147,21 +147,20 @@ const styles = StyleSheet.create({ }, }) -const GenericArtworksGridContainer = Relay.createContainer(GenericArtworksGrid, { - fragments: { - artworks: () => Relay.QL` - fragment on Artwork @relay(plural: true) { - __id - image { - aspect_ratio - } - ${Artwork.getFragment("artwork")} +const GenericGrid = createFragmentContainer( + GenericArtworksGrid, + graphql` + fragment GenericGrid_artworks on Artwork @relay(plural: true) { + __id + image { + aspect_ratio } - `, - }, -}) + ...Artwork_artwork + } + ` +) -export default GenericArtworksGridContainer +export default GenericGrid interface RelayProps { artworks: Array<{ diff --git a/src/lib/Components/ArtworkGrids/InfiniteScrollGrid.tsx b/src/lib/Components/ArtworkGrids/InfiniteScrollGrid.tsx index a558f720d0..e171e5eb9d 100644 --- a/src/lib/Components/ArtworkGrids/InfiniteScrollGrid.tsx +++ b/src/lib/Components/ArtworkGrids/InfiniteScrollGrid.tsx @@ -7,13 +7,16 @@ // 4. Update height of grid to encompass all items. import * as React from "react" +import { RelayPaginationProp } from "react-relay" + +import { get } from "lodash" import { Dimensions, LayoutChangeEvent, ScrollView, StyleSheet, View, ViewStyle } from "react-native" import Spinner from "../Spinner" import Artwork from "./Artwork" -import { ArtistRelayProps } from "./RelayConnections/ArtistArtworksGrid" +import { ArtistRelayProps } from "./RelayConnections/ArtistForSaleArtworksGrid" import { GeneRelayProps } from "./RelayConnections/GeneArtworksGrid" export const PageSize = 10 @@ -28,12 +31,21 @@ export const PageEndThreshold = 1000 * - the calculation currently only takes into account the size of the image, not if e.g. the sale message is present */ -type Artworks = Array<{ +interface Artwork { __id: string image: { aspect_ratio: number | null } | null -}> +} + +type Artworks = Artwork[] + +interface ArtworksConnection { + pageInfo: { hasNextPage: boolean } + edges: Array<{ + node: Artwork + }> +} interface Props extends ArtistRelayProps, GeneRelayProps { /** The direction for the grid, currently only 'column' is supported . */ @@ -70,7 +82,7 @@ interface Props extends ArtistRelayProps, GeneRelayProps { sort: any /** Relay */ - relay: any + relay?: RelayPaginationProp /** A callback that is called once all artworks have been queried. */ onComplete?: () => void @@ -104,31 +116,42 @@ class InfiniteScrollArtworksGrid extends React.Component { this.sentEndForContentLength = null } + artworksConnection(): ArtworksConnection { + return get(this.props, this.props.queryKey) as any + } + fetchNextPage() { if (this.state.fetchingNextPage || this.state.completed) { return } this.setState({ fetchingNextPage: true }) - this.props.relay.setVariables( - { - totalSize: this.props.relay.variables.totalSize + PageSize, - }, - readyState => { - if (readyState.done) { - this.setState({ fetchingNextPage: false }) - if (!this.props[this.props.queryKey].artworks.pageInfo.hasNextPage && this.props.onComplete) { - this.props.onComplete() - this.setState({ completed: true }) - } - } + this.props.relay.loadMore(PageSize, error => { + this.setState({ fetchingNextPage: false }) + if (!this.artworksConnection().pageInfo.hasNextPage && this.props.onComplete) { + this.props.onComplete() + this.setState({ completed: true }) } - ) + }) + // this.props.relay.setVariables( + // { + // totalSize: this.props.relay.variables.totalSize + PageSize, + // }, + // readyState => { + // if (readyState.done) { + // this.setState({ fetchingNextPage: false }) + // if (!this.props[this.props.queryKey].artworks.pageInfo.hasNextPage && this.props.onComplete) { + // this.props.onComplete() + // this.setState({ completed: true }) + // } + // } + // } + // ) } /** A simplified version of the Relay debugging logs for infinite scrolls */ debugLog(query: string, response?: any, error?: any) { // tslint:disable:no-console - if (__DEV__ && (global as any).originalXMLHttpRequest !== undefined) { + if (__DEV__ && originalXMLHttpRequest !== undefined) { const groupName = "Infinite scroll request" const c: any = console c.groupCollapsed(groupName, "color:" + (response ? "black" : "red") + ";") @@ -158,10 +181,7 @@ class InfiniteScrollArtworksGrid extends React.Component { sectionedArtworks() { const sectionedArtworks: Artworks[] = [] const sectionRatioSums: number[] = [] - const queryKey = this.props.queryKey - const artworks: Artworks = this.props[queryKey].artworks - ? this.props[queryKey].artworks.edges.map(({ node }) => node) - : [] + const artworks: Artworks = this.artworksConnection() ? this.artworksConnection().edges.map(({ node }) => node) : [] for (let i = 0; i < this.props.sectionCount; i++) { sectionedArtworks.push([]) @@ -203,8 +223,7 @@ class InfiniteScrollArtworksGrid extends React.Component { height: this.props.itemMargin, } - const queryKey = this.props.queryKey - const artworks = this.props[queryKey].artworks ? this.props[queryKey].artworks.edges : [] + const artworks = this.artworksConnection() ? this.artworksConnection().edges : [] const sectionedArtworks = this.sectionedArtworks() const sections: JSX.Element[] = [] for (let i = 0; i < this.props.sectionCount; i++) { diff --git a/src/lib/Components/ArtworkGrids/RelayConnections/ArtistArtworksGrid.tsx b/src/lib/Components/ArtworkGrids/RelayConnections/ArtistArtworksGrid.tsx deleted file mode 100644 index e3f3954357..0000000000 --- a/src/lib/Components/ArtworkGrids/RelayConnections/ArtistArtworksGrid.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import * as React from "react" -import * as Relay from "react-relay" -import Artwork from "../Artwork" - -import InfiniteScrollArtworksGrid, { PageSize } from "../InfiniteScrollGrid" - -export default Relay.createContainer(InfiniteScrollArtworksGrid, { - initialVariables: { - totalSize: PageSize, - filter: null, - }, - fragments: { - artist: () => Relay.QL` - fragment on Artist { - artworks: artworks_connection(sort: partner_updated_at_desc, filter: $filter, first: $totalSize) { - pageInfo { - hasNextPage - } - edges { - node { - __id - image { - aspect_ratio - } - ${Artwork.getFragment("artwork")} - } - } - } - } - `, - }, -}) - -export interface ArtistRelayProps { - artist: { - artworks_connection: { - pageInfo: { - hasNextPage: boolean - } - edges: Array<{ - node: { - __id: string - image: { - aspect_ratio: number | null - } | null - } | null - }> - } | null - } -} diff --git a/src/lib/Components/ArtworkGrids/RelayConnections/ArtistForSaleArtworksGrid.tsx b/src/lib/Components/ArtworkGrids/RelayConnections/ArtistForSaleArtworksGrid.tsx new file mode 100644 index 0000000000..a6916432f9 --- /dev/null +++ b/src/lib/Components/ArtworkGrids/RelayConnections/ArtistForSaleArtworksGrid.tsx @@ -0,0 +1,98 @@ +import { createPaginationContainer, graphql } from "react-relay" +import InfiniteScrollArtworksGrid, { PageSize } from "../InfiniteScrollGrid" + +import Artwork from "../Artwork" +// tslint:disable-next-line:no-unused-expression +// This is so that TypeScript won’t remove the seemingly unused `Artwork` import. Relay depends on it to exist. +Artwork + +const ArtistForSaleArtworksGrid = createPaginationContainer( + InfiniteScrollArtworksGrid, + { + artist: graphql.experimental` + fragment ArtistForSaleArtworksGrid_artist on Artist + @argumentDefinitions( + count: { type: "Int", defaultValue: 10 } + cursor: { type: "String" } + filter: { type: "[ArtistArtworksFilters]", defaultValue: [IS_FOR_SALE] } + ) { + __id + forSaleArtworks: artworks_connection( + first: $count + after: $cursor + filter: $filter + sort: partner_updated_at_desc + ) @connection(key: "ArtistForSaleArtworksGrid_forSaleArtworks") { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + __id + image { + aspect_ratio + } + ...Artwork_artwork + } + } + } + } + `, + }, + { + direction: "forward", + getConnectionFromProps(props) { + return props.artist && props.artist.forSaleArtworks + }, + getFragmentVariables(prevVars, totalCount) { + return { + ...prevVars, + count: totalCount, + } + }, + getVariables(props, { count, cursor }, { filter }) { + return { + __id: props.artist.__id, + count, + cursor, + filter, + } + }, + query: graphql.experimental` + query ArtistForSaleArtworksGridQuery( + $__id: ID! + $count: Int! + $cursor: String + $filter: [ArtistArtworksFilters] + ) { + node(__id: $__id) { + ... on Artist { + ...ArtistForSaleArtworksGrid_artist @arguments(count: $count, cursor: $cursor, filter: $filter) + } + } + } + `, + } +) + +export default ArtistForSaleArtworksGrid + +export interface ArtistRelayProps { + artist: { + artworks_connection: { + pageInfo: { + hasNextPage: boolean + } + edges: Array<{ + node: { + __id: string + image: { + aspect_ratio: number | null + } | null + } | null + }> + } | null + } +} diff --git a/src/lib/Components/ArtworkGrids/RelayConnections/ArtistNotForSaleArtworksGrid.tsx b/src/lib/Components/ArtworkGrids/RelayConnections/ArtistNotForSaleArtworksGrid.tsx new file mode 100644 index 0000000000..73c50521c2 --- /dev/null +++ b/src/lib/Components/ArtworkGrids/RelayConnections/ArtistNotForSaleArtworksGrid.tsx @@ -0,0 +1,98 @@ +import { createPaginationContainer, graphql } from "react-relay" +import InfiniteScrollArtworksGrid, { PageSize } from "../InfiniteScrollGrid" + +import Artwork from "../Artwork" +// tslint:disable-next-line:no-unused-expression +// This is so that TypeScript won’t remove the seemingly unused `Artwork` import. Relay depends on it to exist. +Artwork + +const ArtistNotForSaleArtworksGrid = createPaginationContainer( + InfiniteScrollArtworksGrid, + { + artist: graphql.experimental` + fragment ArtistNotForSaleArtworksGrid_artist on Artist + @argumentDefinitions( + count: { type: "Int", defaultValue: 10 } + cursor: { type: "String" } + filter: { type: "[ArtistArtworksFilters]", defaultValue: [IS_NOT_FOR_SALE] } + ) { + __id + notForSaleArtworks: artworks_connection( + first: $count + after: $cursor + filter: $filter + sort: partner_updated_at_desc + ) @connection(key: "ArtistNotForSaleArtworksGrid_notForSaleArtworks") { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + __id + image { + aspect_ratio + } + ...Artwork_artwork + } + } + } + } + `, + }, + { + direction: "forward", + getConnectionFromProps(props) { + return props.artist && props.artist.notForSaleArtworks + }, + getFragmentVariables(prevVars, totalCount) { + return { + ...prevVars, + count: totalCount, + } + }, + getVariables(props, { count, cursor }, { filter }) { + return { + __id: props.artist.__id, + count, + cursor, + filter, + } + }, + query: graphql.experimental` + query ArtistNotForSaleArtworksGridQuery( + $__id: ID! + $count: Int! + $cursor: String + $filter: [ArtistArtworksFilters] + ) { + node(__id: $__id) { + ... on Artist { + ...ArtistNotForSaleArtworksGrid_artist @arguments(count: $count, cursor: $cursor, filter: $filter) + } + } + } + `, + } +) + +export default ArtistNotForSaleArtworksGrid + +export interface ArtistRelayProps { + artist: { + artworks_connection: { + pageInfo: { + hasNextPage: boolean + } + edges: Array<{ + node: { + __id: string + image: { + aspect_ratio: number | null + } | null + } | null + }> + } | null + } +} diff --git a/src/lib/Components/ArtworkGrids/RelayConnections/GeneArtworksGrid.tsx b/src/lib/Components/ArtworkGrids/RelayConnections/GeneArtworksGrid.tsx index 202d242819..e4ef3d40cf 100644 --- a/src/lib/Components/ArtworkGrids/RelayConnections/GeneArtworksGrid.tsx +++ b/src/lib/Components/ArtworkGrids/RelayConnections/GeneArtworksGrid.tsx @@ -1,24 +1,36 @@ -import * as Relay from "react-relay" -import Artwork from "../Artwork" +import { createPaginationContainer, graphql } from "react-relay" import InfiniteScrollArtworksGrid, { PageSize } from "../InfiniteScrollGrid" -export default Relay.createContainer(InfiniteScrollArtworksGrid, { - initialVariables: { - totalSize: PageSize, - medium: "*", - priceRange: "*-*", - sort: "-partner_updated_at", - }, - fragments: { - gene: () => Relay.QL` - fragment on Gene { - artworks: artworks_connection(sort: $sort, - price_range: $priceRange, - medium: $medium, - first: $totalSize, - for_sale: true) { +import Artwork from "../Artwork" +// tslint:disable-next-line:no-unused-expression +// This is so that TypeScript won’t remove the seemingly unused `Artwork` import. Relay depends on it to exist. +Artwork + +const GeneArtworksGrid = createPaginationContainer( + InfiniteScrollArtworksGrid, + { + gene: graphql.experimental` + fragment GeneArtworksGrid_gene on Gene + @argumentDefinitions( + count: { type: "Int", defaultValue: 10 } + cursor: { type: "String" } + sort: { type: "String", defaultValue: "-partner_updated_at" } + medium: { type: "String", defaultValue: "*" } + priceRange: { type: "String", defaultValue: "*-*" } + ) { + __id + artworks: artworks_connection( + first: $count + after: $cursor + sort: $sort + medium: $medium + price_range: $priceRange + for_sale: true + ) @connection(key: "GeneArtworksGrid_artworks") { pageInfo { hasNextPage + startCursor + endCursor } edges { node { @@ -26,17 +38,56 @@ export default Relay.createContainer(InfiniteScrollArtworksGrid, { image { aspect_ratio } - ${Artwork.getFragment("artwork")} + ...Artwork_artwork } } } } `, }, -}) + { + direction: "forward", + getConnectionFromProps(props) { + return props.gene && props.gene.artworks + }, + getFragmentVariables(prevVars, totalCount) { + return { + ...prevVars, + count: totalCount, + } + }, + getVariables(props, { count, cursor }, fragmentVariables) { + return { + ...fragmentVariables, + __id: props.gene.__id, + count, + cursor, + } + }, + query: graphql.experimental` + query GeneArtworksGridQuery( + $__id: ID! + $count: Int! + $cursor: String + $sort: String + $medium: String + $priceRange: String + ) { + node(__id: $__id) { + ... on Gene { + ...GeneArtworksGrid_gene + @arguments(count: $count, cursor: $cursor, sort: $sort, medium: $medium, priceRange: $priceRange) + } + } + } + `, + } +) + +export default GeneArtworksGrid export interface GeneRelayProps { - gene: { + artist: { artworks_connection: { pageInfo: { hasNextPage: boolean diff --git a/src/lib/Components/ArtworkGrids/RelayConnections/__tests__/ArtistArtworksGrid-tests.tsx b/src/lib/Components/ArtworkGrids/RelayConnections/__tests__/ArtistArtworksGrid-tests.tsx index 25965b8a00..f0f9e289a2 100644 --- a/src/lib/Components/ArtworkGrids/RelayConnections/__tests__/ArtistArtworksGrid-tests.tsx +++ b/src/lib/Components/ArtworkGrids/RelayConnections/__tests__/ArtistArtworksGrid-tests.tsx @@ -4,7 +4,7 @@ import * as React from "react" import { renderWithLayout } from "../../../../tests/renderWithLayout" import artwork from "../../__tests__/__fixtures__/artwork" -import InfiniteScrollArtworksGrid from "../ArtistArtworksGrid" +import ArtistForSaleArtworksGrid from "../ArtistForSaleArtworksGrid" it("renders properly", () => { const artist = { @@ -13,6 +13,6 @@ it("renders properly", () => { }, } - const grid = renderWithLayout(, { width: 768 }) + const grid = renderWithLayout(, { width: 768 }) expect(grid).toMatchSnapshot() }) diff --git a/src/lib/Components/ArtworkGrids/__tests__/InfiniteScrollGrid-tests.tsx b/src/lib/Components/ArtworkGrids/__tests__/InfiniteScrollGrid-tests.tsx index 60bbc41018..7afc6603c3 100644 --- a/src/lib/Components/ArtworkGrids/__tests__/InfiniteScrollGrid-tests.tsx +++ b/src/lib/Components/ArtworkGrids/__tests__/InfiniteScrollGrid-tests.tsx @@ -3,7 +3,7 @@ import "react-native" import * as React from "react" import { renderWithLayout } from "../../../tests/renderWithLayout" -import InfiniteScrollArtworksGrid from "../RelayConnections/ArtistArtworksGrid" +import InfiniteScrollArtworksGrid from "../RelayConnections/ArtistForSaleArtworksGrid" import artwork from "./__fixtures__/artwork" it("renders properly", () => { diff --git a/src/lib/Components/Consignments/Components/ArtworkConsignmentTodo.tsx b/src/lib/Components/Consignments/Components/ArtworkConsignmentTodo.tsx index 3309e1dbb3..73effc7569 100644 --- a/src/lib/Components/Consignments/Components/ArtworkConsignmentTodo.tsx +++ b/src/lib/Components/Consignments/Components/ArtworkConsignmentTodo.tsx @@ -84,10 +84,10 @@ const DoneButton = () => -const Button = (props: TouchableHighlightProperties) => +const Button: React.SFC = ({ children, ...props }) => - {(props as any).children} + {children} diff --git a/src/lib/Components/Consignments/Components/BottomAlignedButton.tsx b/src/lib/Components/Consignments/Components/BottomAlignedButton.tsx index 303ce8ab8c..de73c90e1e 100644 --- a/src/lib/Components/Consignments/Components/BottomAlignedButton.tsx +++ b/src/lib/Components/Consignments/Components/BottomAlignedButton.tsx @@ -25,15 +25,14 @@ export interface ButtonBodyStyle { paddingTop: number } -export interface BottomAlignedProps { +export interface BottomAlignedProps extends React.Props { onPress: () => void - children?: any[] bodyStyle: ButtonBodyStyle buttonText: string disabled?: boolean } -const render = (props: BottomAlignedProps) => +const BottomAlignedButton: React.SFC = props => {props.children} @@ -47,8 +46,4 @@ const render = (props: BottomAlignedProps) => -export default class BottomAlignedButton extends React.Component { - render() { - return render(this.props) - } -} +export default BottomAlignedButton diff --git a/src/lib/Components/Consignments/Components/DoneButton.tsx b/src/lib/Components/Consignments/Components/DoneButton.tsx index 740cda4f7b..cf0d36708d 100644 --- a/src/lib/Components/Consignments/Components/DoneButton.tsx +++ b/src/lib/Components/Consignments/Components/DoneButton.tsx @@ -2,12 +2,11 @@ import * as React from "react" import BottomAlignedButton from "./BottomAlignedButton" -export interface DoneButtonProps { +export interface DoneButtonProps extends React.Props { onPress: () => void - children?: any[] } -const render = (props: DoneButtonProps) => { +const DoneButton: React.SFC = props => { const doneButtonStyles = { backgroundColor: "black", marginBottom: 0, @@ -21,8 +20,4 @@ const render = (props: DoneButtonProps) => { ) } -export default class DoneButton extends React.Component { - render() { - return render(this.props) - } -} +export default DoneButton diff --git a/src/lib/Components/Consignments/Components/FormElements.tsx b/src/lib/Components/Consignments/Components/FormElements.tsx index fd26142563..1b6b01b4b9 100644 --- a/src/lib/Components/Consignments/Components/FormElements.tsx +++ b/src/lib/Components/Consignments/Components/FormElements.tsx @@ -1,11 +1,11 @@ import * as React from "react" -import { ScrollView, TextProperties, View, ViewProperties } from "react-native" +import { ScrollView, TextProperties, View, ViewProperties, ViewStyle } from "react-native" import { BodyText, LargeHeadline } from "../Typography/index" import Text from "./TextInput" /** A re-usable full-screen form with a scrollview */ -export const Form = (props: { title?: string }) => +export const Form: React.SFC<{ title?: string }> = props => {props.title && @@ -19,9 +19,9 @@ export const Form = (props: { title?: string }) => /** An individual row inside the form */ -export const Row = (props: ViewProperties) => - - {(props as any).children} +export const Row: React.SFC = ({ children, ...props }) => + + {children} /** A label for form element */ diff --git a/src/lib/Components/Consignments/Components/TextArea.tsx b/src/lib/Components/Consignments/Components/TextArea.tsx index b619b875da..961da53a10 100644 --- a/src/lib/Components/Consignments/Components/TextArea.tsx +++ b/src/lib/Components/Consignments/Components/TextArea.tsx @@ -54,7 +54,7 @@ export default class TextArea extends React.Component { delete this.props.text.placeholder return ( - + {displayPlaceholder ? diff --git a/src/lib/Components/Consignments/Components/TextInput.tsx b/src/lib/Components/Consignments/Components/TextInput.tsx index a7e5956b7f..5f3b90d1d1 100644 --- a/src/lib/Components/Consignments/Components/TextInput.tsx +++ b/src/lib/Components/Consignments/Components/TextInput.tsx @@ -37,7 +37,7 @@ const Separator = styled.View` ` const render = (props: TextInputProps) => - + {props.preImage && } { const tree = renderer.create().toJSON() expect(tree.props.renderToHardwareTextureAndroid).toBeTruthy() - const styles = Object.keys(tree.props.style) - expect(styles.length).not.toEqual(1) + const styles = Object.keys(tree.props.style[0]) expect(styles).toContain("scaleX") }) }) diff --git a/src/lib/Components/Consignments/Components/__tests__/__snapshots__/BottomAlignedButton-tests.tsx.snap b/src/lib/Components/Consignments/Components/__tests__/__snapshots__/BottomAlignedButton-tests.tsx.snap index d70420ccc6..b949456393 100644 --- a/src/lib/Components/Consignments/Components/__tests__/__snapshots__/BottomAlignedButton-tests.tsx.snap +++ b/src/lib/Components/Consignments/Components/__tests__/__snapshots__/BottomAlignedButton-tests.tsx.snap @@ -52,6 +52,7 @@ exports[`Bottom-Aligned states: Looks right when With a Text element 1`] = ` accessibilityLabel={undefined} accessibilityTraits={undefined} accessible={true} + collapsable={undefined} hitSlop={undefined} isTVSelectable={true} nativeID={undefined} @@ -125,9 +126,14 @@ exports[`Bottom-Aligned states: Looks right when With an Artist Search Results -

L

+

L

diff --git a/src/lib/Components/Consignments/Components/__tests__/__snapshots__/bottom_aligned_button-tests.tsx-shows-an-activity-indicator-when-searching-.svg b/src/lib/Components/Consignments/Components/__tests__/__snapshots__/bottom_aligned_button-tests.tsx-shows-an-activity-indicator-when-searching-.svg deleted file mode 100644 index e1ffb22b9a..0000000000 --- a/src/lib/Components/Consignments/Components/__tests__/__snapshots__/bottom_aligned_button-tests.tsx-shows-an-activity-indicator-when-searching-.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx-shows-3-sets-of-questions-when-there's-no-edition-info-on-ipad.svg b/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx-shows-3-sets-of-questions-when-there's-no-edition-info-on-ipad.svg index 83bd6c4da3..59997fe71a 100644 --- a/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx-shows-3-sets-of-questions-when-there's-no-edition-info-on-ipad.svg +++ b/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx-shows-3-sets-of-questions-when-there's-no-edition-info-on-ipad.svg @@ -16,14 +16,14 @@ -

Answer a few questions about the work

+

Answer a few questions about the work

-

Is this an edition?

+

Is this an edition?

@@ -34,7 +34,7 @@ -

YES

+

YES

@@ -52,7 +52,7 @@ -

Is this work signed?

+

Is this work signed?

@@ -63,7 +63,7 @@ -

YES

+

YES

@@ -81,7 +81,7 @@ -

Do you have a certificate of authenticity?

+

Do you have a certificate of authenticity?

@@ -92,7 +92,7 @@ -

YES

+

YES

diff --git a/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx-shows-3-sets-of-questions-when-there's-no-edition-info.svg b/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx-shows-3-sets-of-questions-when-there's-no-edition-info.svg index a575cda48e..586e99c510 100644 --- a/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx-shows-3-sets-of-questions-when-there's-no-edition-info.svg +++ b/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx-shows-3-sets-of-questions-when-there's-no-edition-info.svg @@ -16,14 +16,14 @@ -

Answer a few questions about the work

+

Answer a few questions about the work

-

Is this an edition?

+

Is this an edition?

@@ -34,7 +34,7 @@ -

YES

+

YES

@@ -52,7 +52,7 @@ -

Is this work signed?

+

Is this work signed?

@@ -63,7 +63,7 @@ -

YES

+

YES

@@ -81,7 +81,7 @@ -

Do you have a certificate of authenticity?

+

Do you have a certificate of authenticity?

@@ -92,7 +92,7 @@ -

YES

+

YES

diff --git a/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx-shows-and-additional-2-inputs-when-there's-edition-info.svg b/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx-shows-and-additional-2-inputs-when-there's-edition-info.svg index 99efe8f461..abfe1995dd 100644 --- a/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx-shows-and-additional-2-inputs-when-there's-edition-info.svg +++ b/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx-shows-and-additional-2-inputs-when-there's-edition-info.svg @@ -16,14 +16,14 @@ -

Answer a few questions about the work

+

Answer a few questions about the work

-

Is this an edition?

+

Is this an edition?

@@ -33,7 +33,7 @@ -

NO

+

NO

@@ -81,7 +81,7 @@ -

Is this work signed?

+

Is this work signed?

@@ -92,7 +92,7 @@ -

YES

+

YES

@@ -110,7 +110,7 @@ -

Do you have a certificate of authenticity?

+

Do you have a certificate of authenticity?

@@ -121,7 +121,7 @@ -

YES

+

YES

diff --git a/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx.snap b/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx.snap index 5bbd3677c0..05aea3a80c 100644 --- a/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx.snap +++ b/src/lib/Components/Consignments/Screens/__tests__/__snapshots__/FinalSubmissionQuestions-tests.tsx.snap @@ -75,11 +75,14 @@ exports[`Sets up the right view hierarchy 1`] = ` > -

Sell works from your collection through our partner network

+

Sell works from your collection through our partner network

@@ -26,14 +26,14 @@ -

Sell work from your collection through our partner network.

+

Sell work from your collection through our partner network.

-

Get your work placed in an upcoming sale.

+

Get your work placed in an upcoming sale.

@@ -42,10 +42,10 @@ - + - -

GET STARTED

+ +

GET STARTED

diff --git a/src/lib/Components/Consignments/Typography/index.tsx b/src/lib/Components/Consignments/Typography/index.tsx index f858f271bf..fd40d5d8f8 100644 --- a/src/lib/Components/Consignments/Typography/index.tsx +++ b/src/lib/Components/Consignments/Typography/index.tsx @@ -4,17 +4,17 @@ import { StyleSheet, Text, TextProperties, TextStyle } from "react-native" import colors from "../../../../data/colors" import fonts from "../../../../data/fonts" -const LargeHeadline = (props: TextProperties) => { +const LargeHeadline: React.SFC = props => { const children: string = (props as any).children const style = [styles.largeDefault, props.style || {}, styles.largeRequired] return ( - {children} + {props.children} ) } -const SmallHeadline = (props: TextProperties) => { +const SmallHeadline: React.SFC = (props: TextProperties) => { const children: string = (props as any).children const style = [styles.smallDefault, props.style || {}, styles.smallRequired] return ( @@ -24,7 +24,7 @@ const SmallHeadline = (props: TextProperties) => { ) } -const Subtitle = (props: TextProperties) => { +const Subtitle: React.SFC = (props: TextProperties) => { const children: string = (props as any).children const style = [styles.subtitleDefault, props.style || {}, styles.subtitleRequired] return ( @@ -34,7 +34,7 @@ const Subtitle = (props: TextProperties) => { ) } -const BodyText = (props: TextProperties) => { +const BodyText: React.SFC = (props: TextProperties) => { const children: string = (props as any).children const style = [styles.bodyDefault, props.style || {}, styles.bodyRequired] return ( diff --git a/src/lib/Components/Gene/About.tsx b/src/lib/Components/Gene/About.tsx index c3e0dc5c01..9c63978128 100644 --- a/src/lib/Components/Gene/About.tsx +++ b/src/lib/Components/Gene/About.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { StyleSheet, View, ViewStyle } from "react-native" @@ -44,18 +44,17 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(About, { - fragments: { - gene: () => Relay.QL` - fragment on Gene { - ${Biography.getFragment("gene")} - trending_artists { - ${RelatedArtists.getFragment("artists")} - } +export default createFragmentContainer( + About, + graphql` + fragment About_gene on Gene { + ...Biography_gene + trending_artists { + ...RelatedArtists_artists } - `, - }, -}) + } + ` +) interface RelayProps { gene: { diff --git a/src/lib/Components/Gene/Biography.tsx b/src/lib/Components/Gene/Biography.tsx index fe30e0a93d..a62f318f1d 100644 --- a/src/lib/Components/Gene/Biography.tsx +++ b/src/lib/Components/Gene/Biography.tsx @@ -1,6 +1,6 @@ import * as React from "react" -import * as Relay from "react-relay" -import * as removeMarkdown from "remove-markdown" +import { createFragmentContainer, graphql } from "react-relay" +import removeMarkdown from "remove-markdown" import { Dimensions, StyleSheet, View, ViewProperties } from "react-native" @@ -48,15 +48,14 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(Biography, { - fragments: { - gene: () => Relay.QL` - fragment on Gene { - description - } - `, - }, -}) +export default createFragmentContainer( + Biography, + graphql` + fragment Biography_gene on Gene { + description + } + ` +) interface RelayProps { gene: { diff --git a/src/lib/Components/Gene/Header.tsx b/src/lib/Components/Gene/Header.tsx index 70933a0762..aa53fafc9c 100644 --- a/src/lib/Components/Gene/Header.tsx +++ b/src/lib/Components/Gene/Header.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { Dimensions, NativeModules, StyleSheet, TextStyle, View, ViewProperties, ViewStyle } from "react-native" const { ARTemporaryAPIModule } = NativeModules @@ -111,17 +111,16 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(Header, { - fragments: { - gene: () => Relay.QL` - fragment on Gene { - _id - id - name - } - `, - }, -}) +export default createFragmentContainer( + Header, + graphql` + fragment Header_gene on Gene { + _id + id + name + } + ` +) interface RelayProps { gene: { diff --git a/src/lib/Components/Gene/__tests__/__snapshots__/About-tests.tsx.snap b/src/lib/Components/Gene/__tests__/__snapshots__/About-tests.tsx.snap index 160e338a70..b1b686eee8 100644 --- a/src/lib/Components/Gene/__tests__/__snapshots__/About-tests.tsx.snap +++ b/src/lib/Components/Gene/__tests__/__snapshots__/About-tests.tsx.snap @@ -34,11 +34,11 @@ exports[`shows trending artists correctly 1`] = ` } > Deep time refers to the concept of an expansive time that stretches far beyond human history to - include the approximately 4.5 billion-year geological history of Earth and the estimated 13.8 - billion-year history of the universe. In art, deep time could be explored in works that deal with the - long-term processes of geological formation and the cosmos. Such concerns are important, for example, - to Hiroshi Sugimoto’s waterscapes and Darren Almond’s landscapes, both of - which use long-exposure photography to capture a sense of expanded time. + include the approximately 4.5 billion-year geological history of Earth and the estimated 13.8 + billion-year history of the universe. In art, deep time could be explored in works that deal with the + long-term processes of geological formation and the cosmos. Such concerns are important, for example, + to Hiroshi Sugimoto’s waterscapes and Darren Almond’s landscapes, both of + which use long-exposure photography to capture a sense of expanded time.
({ }, }) -const ArtistCardContainer = Relay.createContainer(ArtistCard, { - fragments: { - artist: () => Relay.QL` - fragment on Artist { - id - _id - href - name - formatted_artworks_count - formatted_nationality_and_birthday - image { - url(version: "large") - } +const ArtistCardContainer = createFragmentContainer( + ArtistCard, + graphql` + fragment ArtistCard_artist on Artist { + id + _id + href + name + formatted_artworks_count + formatted_nationality_and_birthday + image { + url(version: "large") } - `, - }, -}) + } + ` +) export interface ArtistCardResponse { id: string diff --git a/src/lib/Components/Home/ArtistRails/ArtistRail.tsx b/src/lib/Components/Home/ArtistRails/ArtistRail.tsx index b2b3e6ffeb..41cfb6b4cf 100644 --- a/src/lib/Components/Home/ArtistRails/ArtistRail.tsx +++ b/src/lib/Components/Home/ArtistRails/ArtistRail.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createRefetchContainer, graphql, RelayRefetchProp } from "react-relay" import { Animated, Easing, ScrollView, StyleSheet, View, ViewProperties, ViewStyle } from "react-native" @@ -20,7 +20,7 @@ const Animation = { } interface Props extends ViewProperties, RelayProps { - relay: Relay.RelayProp + relay?: RelayRefetchProp } interface State { @@ -39,8 +39,8 @@ class ArtistRail extends React.Component { componentDidMount() { if (this.props.relay) { - this.props.relay.setVariables({ fetchContent: true }, readyState => { - if (readyState.error) { + this.props.relay.refetch({ __id: this.props.rail.__id, fetchContent: true }, null, error => { + if (error) { this.setState({ loadFailed: true }) } }) @@ -49,13 +49,17 @@ class ArtistRail extends React.Component { componentWillReceiveProps(nextProps) { if (nextProps.rail.results) { - const artists = nextProps.rail.results - artists.forEach(artist => { - artist._animatedValues = { - opacity: new Animated.Value(1), - translateY: new Animated.Value(0), - } - }) + const artists = nextProps.rail.results.map(artist => + Object.assign( + { + _animatedValues: { + opacity: new Animated.Value(1), + translateY: new Animated.Value(0), + }, + }, + artist + ) + ) this.setState({ artists }) } } @@ -237,25 +241,28 @@ function suggestedArtistQuery(artistID: string): string { ` } -export default Relay.createContainer(ArtistRail, { - initialVariables: { - fetchContent: false, - }, - - fragments: { - rail: () => Relay.QL` - fragment on HomePageArtistModule { +export default createRefetchContainer( + ArtistRail, + graphql.experimental` + fragment ArtistRail_rail on HomePageArtistModule + @argumentDefinitions(fetchContent: { type: "Boolean!", defaultValue: false }) { + __id + key + results @include(if: $fetchContent) { + _id __id - key - results @include(if: $fetchContent) { - _id - __id - ${ArtistCard.getFragment("artist")} - } + ...ArtistCard_artist } - `, - }, -}) + } + `, + graphql.experimental` + query ArtistRailRefetchQuery($__id: ID!, $fetchContent: Boolean!) { + node(__id: $__id) { + ...ArtistRail_rail @arguments(fetchContent: $fetchContent) + } + } + ` +) interface RelayProps { rail: { diff --git a/src/lib/Components/Home/ArtworkRails/ArtworkRail.tsx b/src/lib/Components/Home/ArtworkRails/ArtworkRail.tsx index cb41808b40..4063b30fe7 100644 --- a/src/lib/Components/Home/ArtworkRails/ArtworkRail.tsx +++ b/src/lib/Components/Home/ArtworkRails/ArtworkRail.tsx @@ -1,6 +1,6 @@ import * as _ from "lodash" import * as React from "react" -import * as Relay from "react-relay" +import { createRefetchContainer, graphql, RelayRefetchProp } from "react-relay" import { Dimensions, @@ -18,11 +18,10 @@ import { import colors from "../../../../data/colors" import SwitchBoard from "../../../NativeModules/SwitchBoard" -import Grid from "../../ArtworkGrids/GenericGrid" +import GenericGrid from "../../ArtworkGrids/GenericGrid" import Separator from "../../Separator" import Spinner from "../../Spinner" -import Header from "./ArtworkRailHeader" -import fragments from "./RelayFragments" +import ArtworkRailHeader from "./ArtworkRailHeader" // tslint:disable-next-line:no-var-requires const chevron: ImageURISource = require("../../../../../images/chevron.png") @@ -41,7 +40,9 @@ const additionalContentRails = [ export const minRailHeight = 400 -interface Props extends ViewProperties, RelayProps {} +interface Props extends ViewProperties, RelayProps { + relay?: RelayRefetchProp +} interface State { expanded: boolean @@ -64,11 +65,10 @@ export class ArtworkRail extends React.Component { - const error = !!readyState.error + this.props.relay.refetch({ __id: this.props.rail.__id, fetchContent: true }, null, error => { this.setState({ - didPerformFetch: readyState.done || readyState.ready || error, - loadFailed: error, + didPerformFetch: true, + loadFailed: !!error, }) }) } @@ -171,7 +171,7 @@ export class ArtworkRail extends React.Component - + ) @@ -243,7 +243,7 @@ export class ArtworkRail extends React.Component -
+ {this.renderModuleResults()} @@ -295,38 +295,56 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(ArtworkRail, { - initialVariables: { - fetchContent: false, - }, - - fragments: { - rail: () => Relay.QL` - fragment on HomePageArtworkModule { - ${Header.getFragment("rail")} - key - params { - medium - price_range +export default createRefetchContainer( + ArtworkRail, + graphql.experimental` + fragment ArtworkRail_rail on HomePageArtworkModule + @argumentDefinitions(fetchContent: { type: "Boolean!", defaultValue: false }) { + ...ArtworkRailHeader_rail + __id + key + params { + medium + price_range + } + context { + ... on HomePageModuleContextFollowedArtist { + artist { + href + } + } + ... on HomePageModuleContextRelatedArtist { + artist { + href + } + } + ... on HomePageModuleContextFair { + href } - context { - ${fragments.relatedArtistFragment} - ${fragments.geneFragment} - ${fragments.auctionFragment} - ${fragments.fairFragment} - ${fragments.followedArtistFragment} + ... on HomePageModuleContextGene { + href } - results @include(if: $fetchContent) { - ${Grid.getFragment("artworks")} + ... on HomePageModuleContextSale { + href } } - `, - }, -}) + results @include(if: $fetchContent) { + ...GenericGrid_artworks + } + } + `, + graphql.experimental` + query ArtworkRailRefetchQuery($__id: ID!, $fetchContent: Boolean!) { + node(__id: $__id) { + ...ArtworkRail_rail @arguments(fetchContent: $fetchContent) + } + } + ` +) interface RelayProps { - relay?: any rail: { + __id: string key: string | null params: { medium: string | null diff --git a/src/lib/Components/Home/ArtworkRails/ArtworkRailHeader.tsx b/src/lib/Components/Home/ArtworkRails/ArtworkRailHeader.tsx index a8d4136141..67f7706f8a 100644 --- a/src/lib/Components/Home/ArtworkRails/ArtworkRailHeader.tsx +++ b/src/lib/Components/Home/ArtworkRails/ArtworkRailHeader.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { Dimensions, @@ -20,7 +20,6 @@ import colors from "../../../../data/colors" import Button from "../../Buttons/InvertedButton" import SerifText from "../../Text/Serif" import SectionTitle from "../SectionTitle" -import fragments from "./RelayFragments" const isPad = Dimensions.get("window").width > 700 @@ -158,23 +157,25 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(ArtworkRailHeader, { - fragments: { - rail: () => Relay.QL` - fragment on HomePageArtworkModule { - title - key - context { - ${fragments.relatedArtistFragment} - ${fragments.geneFragment} - ${fragments.auctionFragment} - ${fragments.fairFragment} - ${fragments.followedArtistFragment} +export default createFragmentContainer( + ArtworkRailHeader, + graphql` + fragment ArtworkRailHeader_rail on HomePageArtworkModule { + title + key + context { + ... on HomePageModuleContextRelatedArtist { + artist { + id + } + based_on { + name + } } } - `, - }, -}) + } + ` +) interface RelayProps { rail: { diff --git a/src/lib/Components/Home/ArtworkRails/RelayFragments.tsx b/src/lib/Components/Home/ArtworkRails/RelayFragments.tsx deleted file mode 100644 index ca38ed4813..0000000000 --- a/src/lib/Components/Home/ArtworkRails/RelayFragments.tsx +++ /dev/null @@ -1,60 +0,0 @@ -"use strict" - -import * as Relay from "react-relay" - -function relatedArtistFragment() { - return Relay.QL` - fragment related_artists_context on HomePageModuleContextRelatedArtist { - artist { - href - id - } - based_on { - name - } - } - ` -} - -function geneFragment() { - return Relay.QL` - fragment gene_context on HomePageModuleContextGene { - href - } - ` -} - -function auctionFragment() { - return Relay.QL` - fragment auction_context on HomePageModuleContextSale { - href - } - ` -} - -function fairFragment() { - return Relay.QL` - fragment fair_context on HomePageModuleContextFair { - href - } - ` -} - -function followedArtistFragment() { - return Relay.QL` - fragment followed_artist_context on HomePageModuleContextFollowedArtist { - artist { - href - id - } - } - ` -} - -export default { - relatedArtistFragment, - geneFragment, - auctionFragment, - fairFragment, - followedArtistFragment, -} diff --git a/src/lib/Components/Home/ArtworkRails/__tests__/ArtworkRail-tests.tsx b/src/lib/Components/Home/ArtworkRails/__tests__/ArtworkRail-tests.tsx index 8840b2e793..8b81e1b91c 100644 --- a/src/lib/Components/Home/ArtworkRails/__tests__/ArtworkRail-tests.tsx +++ b/src/lib/Components/Home/ArtworkRails/__tests__/ArtworkRail-tests.tsx @@ -72,6 +72,9 @@ const railProps = (startedFetching = true) => { variables: { fetchContent: startedFetching, }, + refetch: (a, b, c) => { + return c && c() + }, }, } } diff --git a/src/lib/Components/Home/ArtworkRails/__tests__/__snapshots__/ArtworkRail-tests.tsx.snap b/src/lib/Components/Home/ArtworkRails/__tests__/__snapshots__/ArtworkRail-tests.tsx.snap index e0dcc57081..f9a72b8ca8 100644 --- a/src/lib/Components/Home/ArtworkRails/__tests__/__snapshots__/ArtworkRail-tests.tsx.snap +++ b/src/lib/Components/Home/ArtworkRails/__tests__/__snapshots__/ArtworkRail-tests.tsx.snap @@ -1,88 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`renders correctly 1`] = ` - - - - - - VIEW ALL - - - - - - - -`; +exports[`renders correctly 1`] = `null`; diff --git a/src/lib/Components/Home/HeroUnits.tsx b/src/lib/Components/Home/HeroUnits.tsx index 5f26fff390..569c679494 100644 --- a/src/lib/Components/Home/HeroUnits.tsx +++ b/src/lib/Components/Home/HeroUnits.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { LayoutChangeEvent, ScrollView, TouchableHighlight, View, ViewProperties } from "react-native" @@ -92,20 +92,19 @@ class HeroUnits extends React.Component { } } -export default Relay.createContainer(HeroUnits, { - fragments: { - hero_units: () => Relay.QL` - fragment on HomePageHeroUnit @relay(plural: true) { - __id - href - title - heading - narrow_image_url: background_image_url(version: NARROW) - wide_image_url: background_image_url(version: WIDE) - } - `, - }, -}) +export default createFragmentContainer( + HeroUnits, + graphql` + fragment HeroUnits_hero_units on HomePageHeroUnit @relay(plural: true) { + __id + href + title + heading + narrow_image_url: background_image_url(version: NARROW) + wide_image_url: background_image_url(version: WIDE) + } + ` +) interface RelayProps { hero_units: Array<{ diff --git a/src/lib/Components/Inbox/Bids/ActiveBid.tsx b/src/lib/Components/Inbox/ActiveBids/ActiveBid.tsx similarity index 88% rename from src/lib/Components/Inbox/Bids/ActiveBid.tsx rename to src/lib/Components/Inbox/ActiveBids/ActiveBid.tsx index d54cc96c2d..969e801f98 100644 --- a/src/lib/Components/Inbox/Bids/ActiveBid.tsx +++ b/src/lib/Components/Inbox/ActiveBids/ActiveBid.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import styled from "styled-components/native" import { TouchableWithoutFeedback } from "react-native" @@ -135,31 +135,30 @@ class ActiveBid extends React.Component { } } -export default Relay.createContainer(ActiveBid, { - fragments: { - bid: () => Relay.QL` - fragment on LotStanding { - is_leading_bidder - active_bid { - max_bid { - display - } - sale_artwork { - lot_number - reserve_status - artwork { - href - image { - url - } - artist_names +export default createFragmentContainer( + ActiveBid, + graphql` + fragment ActiveBid_bid on LotStanding { + is_leading_bidder + active_bid { + max_bid { + display + } + sale_artwork { + lot_number + reserve_status + artwork { + href + image { + url } + artist_names } } } - `, - }, -}) + } + ` +) interface RelayProps { bid: { diff --git a/src/lib/Components/Inbox/Bids/__tests__/ActiveBid-tests.tsx b/src/lib/Components/Inbox/ActiveBids/__tests__/ActiveBid-tests.tsx similarity index 100% rename from src/lib/Components/Inbox/Bids/__tests__/ActiveBid-tests.tsx rename to src/lib/Components/Inbox/ActiveBids/__tests__/ActiveBid-tests.tsx diff --git a/src/lib/Components/Inbox/Bids/__tests__/__snapshots__/ActiveBid-tests.tsx.snap b/src/lib/Components/Inbox/ActiveBids/__tests__/__snapshots__/ActiveBid-tests.tsx.snap similarity index 100% rename from src/lib/Components/Inbox/Bids/__tests__/__snapshots__/ActiveBid-tests.tsx.snap rename to src/lib/Components/Inbox/ActiveBids/__tests__/__snapshots__/ActiveBid-tests.tsx.snap diff --git a/src/lib/Components/Inbox/Bids/index.tsx b/src/lib/Components/Inbox/ActiveBids/index.tsx similarity index 74% rename from src/lib/Components/Inbox/Bids/index.tsx rename to src/lib/Components/Inbox/ActiveBids/index.tsx index 58987f8a96..790a0b8dce 100644 --- a/src/lib/Components/Inbox/Bids/index.tsx +++ b/src/lib/Components/Inbox/ActiveBids/index.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import styled from "styled-components/native" import { View } from "react-native" @@ -30,20 +30,19 @@ class ActiveBids extends React.Component { } } -export default Relay.createContainer(ActiveBids, { - fragments: { - me: () => Relay.QL` - fragment on Me { - lot_standings(active_positions: true) { - active_bid { - __id - } - ${ActiveBid.getFragment("bid")} +export default createFragmentContainer( + ActiveBids, + graphql` + fragment ActiveBids_me on Me { + lot_standings(active_positions: true) { + active_bid { + __id } + ...ActiveBid_bid } - `, - }, -}) + } + ` +) interface RelayProps { me: { diff --git a/src/lib/Components/Inbox/Conversations/ConversationSnippet.tsx b/src/lib/Components/Inbox/Conversations/ConversationSnippet.tsx index 902dc5bad4..e57f1cda97 100644 --- a/src/lib/Components/Inbox/Conversations/ConversationSnippet.tsx +++ b/src/lib/Components/Inbox/Conversations/ConversationSnippet.tsx @@ -1,6 +1,6 @@ -import * as moment from "moment" +import moment from "moment" import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { MetadataText, PreviewText as P, SmallHeadline } from "../Typography" @@ -185,44 +185,43 @@ export class ConversationSnippet extends React.Component { } } -export default Relay.createContainer(ConversationSnippet, { - fragments: { - conversation: () => Relay.QL` - fragment on Conversation { - id - to { - name - } - last_message - last_message_at - is_last_message_to_user - last_message_open - items { - item { - __typename - ... on Artwork { - date - title - artist_names - image { - url - } +export default createFragmentContainer( + ConversationSnippet, + graphql` + fragment ConversationSnippet_conversation on Conversation { + id + to { + name + } + last_message + last_message_at + last_message_open + is_last_message_to_user + items { + item { + __typename + ... on Artwork { + date + title + artist_names + image { + url } - ... on Show { - fair { - name - } + } + ... on Show { + fair { name - cover_image { - url - } + } + name + cover_image { + url } } } } - `, - }, -}) + } + ` +) interface RelayProps { conversation: { diff --git a/src/lib/Components/Inbox/Conversations/Message.tsx b/src/lib/Components/Inbox/Conversations/Message.tsx index 9243dbffb9..844f23a958 100644 --- a/src/lib/Components/Inbox/Conversations/Message.tsx +++ b/src/lib/Components/Inbox/Conversations/Message.tsx @@ -1,6 +1,6 @@ -import * as moment from "moment" +import moment from "moment" import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { BodyText, FromSignatureText, MetadataText, SmallHeadline } from "../Typography" @@ -65,7 +65,6 @@ interface Props extends RelayProps { initials?: string artworkPreview?: JSX.Element showPreview?: JSX.Element - relay?: Relay.RelayProp } export class Message extends React.Component { @@ -97,7 +96,7 @@ export class Message extends React.Component { render() { const { artworkPreview, initials, message, senderName, showPreview } = this.props - const isSent = this.props.relay ? !this.props.relay.hasOptimisticUpdate(message) : true + const isSent = !!message.created_at const fromName = message.from.name const fromEmail = message.from.email @@ -147,32 +146,31 @@ export class Message extends React.Component { } } -export default Relay.createContainer(Message, { - fragments: { - message: () => Relay.QL` - fragment on Message { - body - created_at - is_from_user - from { - name - email - } - invoice { - ${InvoicePreview.getFragment("invoice")} - } - attachments { - id - content_type - download_url - file_name - ${ImagePreview.getFragment("attachment")} - ${PDFPreview.getFragment("attachment")} - } +export default createFragmentContainer( + Message, + graphql` + fragment Message_message on Message { + body + created_at + is_from_user + from { + name + email } - `, - }, -}) + invoice { + ...InvoicePreview_invoice + } + attachments { + id + content_type + download_url + file_name + ...ImagePreview_attachment + ...PDFPreview_attachment + } + } + ` +) interface RelayProps { message: { diff --git a/src/lib/Components/Inbox/Conversations/Preview/ArtworkPreview.tsx b/src/lib/Components/Inbox/Conversations/Preview/ArtworkPreview.tsx index 0a35cfa91b..5b5e0104c3 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/ArtworkPreview.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/ArtworkPreview.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { TouchableHighlight } from "react-native" @@ -82,20 +82,19 @@ export class ArtworkPreview extends React.Component { } } -export default Relay.createContainer(ArtworkPreview, { - fragments: { - artwork: () => Relay.QL` - fragment on Artwork { - title - artist_names - date - image { - url - } +export default createFragmentContainer( + ArtworkPreview, + graphql` + fragment ArtworkPreview_artwork on Artwork { + title + artist_names + date + image { + url } - `, - }, -}) + } + ` +) interface RelayProps { artwork: { diff --git a/src/lib/Components/Inbox/Conversations/Preview/Attachment/AttachmentPreview.tsx b/src/lib/Components/Inbox/Conversations/Preview/Attachment/AttachmentPreview.tsx index 901a7b010a..8c35feb20e 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/Attachment/AttachmentPreview.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/Attachment/AttachmentPreview.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { TouchableHighlight } from "react-native" import styled from "styled-components/native" @@ -35,15 +35,14 @@ export class AttachmentPreview extends React.Component { } } -export default Relay.createContainer(AttachmentPreview, { - fragments: { - attachment: () => Relay.QL` - fragment on Attachment { - id - } - `, - }, -}) +export default createFragmentContainer( + AttachmentPreview, + graphql` + fragment AttachmentPreview_attachment on Attachment { + id + } + ` +) interface RelayProps { attachment: { diff --git a/src/lib/Components/Inbox/Conversations/Preview/Attachment/ImagePreview.tsx b/src/lib/Components/Inbox/Conversations/Preview/Attachment/ImagePreview.tsx index 0f53d2f4a7..4bd7795aec 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/Attachment/ImagePreview.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/Attachment/ImagePreview.tsx @@ -1,6 +1,6 @@ import * as React from "react" import { TouchableHighlight } from "react-native" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import styled from "styled-components/native" import colors from "../../../../../../data/colors" @@ -21,16 +21,15 @@ export const ImagePreview: React.SFC = ({ attachment, onSelected }) => -export default Relay.createContainer(ImagePreview, { - fragments: { - attachment: () => Relay.QL` - fragment on Attachment { - download_url - ${AttachmentPreview.getFragment("attachment")} - } - `, - }, -}) +export default createFragmentContainer( + ImagePreview, + graphql` + fragment ImagePreview_attachment on Attachment { + download_url + ...AttachmentPreview_attachment + } + ` +) interface RelayProps { attachment: { diff --git a/src/lib/Components/Inbox/Conversations/Preview/Attachment/PDFPreview.tsx b/src/lib/Components/Inbox/Conversations/Preview/Attachment/PDFPreview.tsx index eee734b0a9..3a2d75dc17 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/Attachment/PDFPreview.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/Attachment/PDFPreview.tsx @@ -1,6 +1,6 @@ import * as React from "react" import { Image, Text, TouchableHighlight } from "react-native" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import styled from "styled-components/native" import colors from "../../../../../../data/colors" @@ -44,16 +44,15 @@ export const PDFPreview: React.SFC = ({ attachment, onSelected }) => -export default Relay.createContainer(PDFPreview, { - fragments: { - attachment: () => Relay.QL` - fragment on Attachment { - file_name - ${AttachmentPreview.getFragment("attachment")} - } - `, - }, -}) +export default createFragmentContainer( + PDFPreview, + graphql` + fragment PDFPreview_attachment on Attachment { + file_name + ...AttachmentPreview_attachment + } + ` +) interface RelayProps { attachment: { diff --git a/src/lib/Components/Inbox/Conversations/Preview/Attachment/__tests__/ImagePreview-tests.tsx b/src/lib/Components/Inbox/Conversations/Preview/Attachment/__tests__/ImagePreview-tests.tsx index 4bff23a975..61ac0b097b 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/Attachment/__tests__/ImagePreview-tests.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/Attachment/__tests__/ImagePreview-tests.tsx @@ -2,7 +2,7 @@ import * as React from "react" import "react-native" import * as renderer from "react-test-renderer" -import ImagePreview from "../ImagePreview" +import { ImagePreview } from "../ImagePreview" it("renders correctly", () => { const tree = renderer.create() diff --git a/src/lib/Components/Inbox/Conversations/Preview/InvoicePreview.tsx b/src/lib/Components/Inbox/Conversations/Preview/InvoicePreview.tsx index 80d411dcaf..a9d9522a0c 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/InvoicePreview.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/InvoicePreview.tsx @@ -1,6 +1,6 @@ import * as React from "react" import { Image, Text, TouchableHighlight } from "react-native" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import styled from "styled-components/native" import colors from "../../../../../data/colors" @@ -94,17 +94,16 @@ export const InvoicePreview: React.SFC = ({ invoice, onSelected }) => -export default Relay.createContainer(InvoicePreview, { - fragments: { - invoice: () => Relay.QL` - fragment on Invoice { - payment_url - state - total - } - `, - }, -}) +export default createFragmentContainer( + InvoicePreview, + graphql` + fragment InvoicePreview_invoice on Invoice { + payment_url + state + total + } + ` +) interface RelayProps { invoice: { diff --git a/src/lib/Components/Inbox/Conversations/Preview/ShowPreview.tsx b/src/lib/Components/Inbox/Conversations/Preview/ShowPreview.tsx index f6bccf5efe..64c2b50e3f 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/ShowPreview.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/ShowPreview.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { TouchableHighlight } from "react-native" @@ -71,26 +71,25 @@ export class ShowPreview extends React.Component { } } -export default Relay.createContainer(ShowPreview, { - fragments: { - show: () => Relay.QL` - fragment on Show { +export default createFragmentContainer( + ShowPreview, + graphql` + fragment ShowPreview_show on Show { + name + cover_image { + url + } + fair { name - cover_image { - url - } - fair { + } + partner { + ... on Partner { name } - partner { - ... on Partner { - name - } - } } - `, - }, -}) + } + ` +) interface RelayProps { show: { diff --git a/src/lib/Components/Inbox/Conversations/Preview/__tests__/InvoicePreview-tests.tsx b/src/lib/Components/Inbox/Conversations/Preview/__tests__/InvoicePreview-tests.tsx index bd2a1bca94..da41af78e3 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/__tests__/InvoicePreview-tests.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/__tests__/InvoicePreview-tests.tsx @@ -2,7 +2,7 @@ import * as React from "react" import "react-native" import * as renderer from "react-test-renderer" -import InvoicePreview from "../InvoicePreview" +import { InvoicePreview } from "../InvoicePreview" it("renders correctly", () => { const tree = renderer.create() diff --git a/src/lib/Components/Inbox/Conversations/__stories__/ArtworkPreview.story.tsx b/src/lib/Components/Inbox/Conversations/__stories__/ArtworkPreview.story.tsx index 83708f8b08..e3fedc7100 100644 --- a/src/lib/Components/Inbox/Conversations/__stories__/ArtworkPreview.story.tsx +++ b/src/lib/Components/Inbox/Conversations/__stories__/ArtworkPreview.story.tsx @@ -1,23 +1,25 @@ -import { storiesOf } from "@storybook/react-native" -import * as React from "react" -import "react-native" -import StubContainer from "react-storybooks-relay-container" +// TODO Move to metametaphysics after Relay Modern migration. -import ArtworkPreview from "../Preview/ArtworkPreview" +// import { storiesOf } from "@storybook/react-native" +// import * as React from "react" +// import "react-native" +// import StubContainer from "react-storybooks-relay-container" -const artwork = { - id: "kara-walker-canisters-1", - title: "Canisters", - date: "1997", - artist_names: "Kara Walker", - image: { - url: "https://d32dm0rphc51dk.cloudfront.net/bUR0QklqLHJ4_mfIzeioIQ/normalized.jpg", - }, -} +// import ArtworkPreview from "../Preview/ArtworkPreview" -storiesOf("Conversations/Artwork Preview") - .add("Basic", () => ) - .add("With a long title", () => { - artwork.title = "Canisters Canisters Canisters Canisters Canisters Canisters" - return - }) +// const artwork = { +// id: "kara-walker-canisters-1", +// title: "Canisters", +// date: "1997", +// artist_names: "Kara Walker", +// image: { +// url: "https://d32dm0rphc51dk.cloudfront.net/bUR0QklqLHJ4_mfIzeioIQ/normalized.jpg", +// }, +// } + +// storiesOf("Conversations/Artwork Preview") +// .add("Basic", () => ) +// .add("With a long title", () => { +// artwork.title = "Canisters Canisters Canisters Canisters Canisters Canisters" +// return +// }) diff --git a/src/lib/Components/Inbox/Conversations/__stories__/ConversationSnippet.story.tsx b/src/lib/Components/Inbox/Conversations/__stories__/ConversationSnippet.story.tsx index 212b0ffd24..661aec715d 100644 --- a/src/lib/Components/Inbox/Conversations/__stories__/ConversationSnippet.story.tsx +++ b/src/lib/Components/Inbox/Conversations/__stories__/ConversationSnippet.story.tsx @@ -1,5 +1,5 @@ import { storiesOf } from "@storybook/react-native" -import * as moment from "moment" +import moment from "moment" import * as React from "react" import "react-native" import { ScrollView } from "react-native" diff --git a/src/lib/Components/Inbox/Conversations/__stories__/Inbox.story.tsx b/src/lib/Components/Inbox/Conversations/__stories__/Inbox.story.tsx index d7427b7407..fdfe9ae1c5 100644 --- a/src/lib/Components/Inbox/Conversations/__stories__/Inbox.story.tsx +++ b/src/lib/Components/Inbox/Conversations/__stories__/Inbox.story.tsx @@ -1,16 +1,45 @@ import { storiesOf } from "@storybook/react-native" import * as React from "react" import "react-native" -import { RootContainer } from "react-relay" -import StubContainer from "react-storybooks-relay-container" +// import StubContainer from "react-storybooks-relay-container" -import Routes from "../../../../relay/routes" import Inbox from "../index" -storiesOf("Conversations/Overview") - .add("With live data", () => ) - .add("With dummy data", () => ) - .add("With no data", () => ) +// TODO Move to metametaphysics after Relay Modern migration +import { graphql, QueryRenderer } from "react-relay" +import createEnvironment from "../../../../relay/createEnvironment" +// TODO This fails due to Relay trying to request `id` for the Node interface. Probably because we need to switch from +// compat to modern? +// +// Question: Why do we need to define a `after` variable, but don’t need to specify anything for it? +const RootContainer: React.SFC = ({ Component }) => { + return ( + { + if (error) { + console.error(error) + } else if (props) { + return + } + return null + }} + /> + ) +} + +storiesOf("Conversations/Overview").add("With live data", () => ) +// TODO Move to metametaphysics after Relay Modern migration +// .add("With dummy data", () => ) +// .add("With no data", () => ) const meProps = { conversations: { diff --git a/src/lib/Components/Inbox/Conversations/__tests__/ConversationSnippet-tests.tsx b/src/lib/Components/Inbox/Conversations/__tests__/ConversationSnippet-tests.tsx index 5b47bf3d61..4d1d90cd71 100644 --- a/src/lib/Components/Inbox/Conversations/__tests__/ConversationSnippet-tests.tsx +++ b/src/lib/Components/Inbox/Conversations/__tests__/ConversationSnippet-tests.tsx @@ -1,4 +1,4 @@ -import * as moment from "moment" +import moment from "moment" import * as React from "react" import "react-native" import * as renderer from "react-test-renderer" diff --git a/src/lib/Components/Inbox/Conversations/__tests__/Conversations-tests.tsx b/src/lib/Components/Inbox/Conversations/__tests__/Conversations-tests.tsx index ba77851d24..ca9133cef6 100644 --- a/src/lib/Components/Inbox/Conversations/__tests__/Conversations-tests.tsx +++ b/src/lib/Components/Inbox/Conversations/__tests__/Conversations-tests.tsx @@ -1,18 +1,22 @@ -import * as moment from "moment" +import "jest-styled-components" +import moment from "moment" import * as React from "react" import "react-native" import * as renderer from "react-test-renderer" -import Inbox from "../" +import { Conversations } from "../" it("looks correct when rendered", () => { - const tree = renderer.create().toJSON() + const tree = renderer.create().toJSON() expect(tree).toMatchSnapshot() }) const meProps = { initials: "JC", conversations: { + pageInfo: { + hasNextPage: false, + }, edges: [ { node: { diff --git a/src/lib/Components/Inbox/Conversations/__tests__/Message-tests.tsx b/src/lib/Components/Inbox/Conversations/__tests__/Message-tests.tsx index ffa0f4b85d..ecdabc9ed6 100644 --- a/src/lib/Components/Inbox/Conversations/__tests__/Message-tests.tsx +++ b/src/lib/Components/Inbox/Conversations/__tests__/Message-tests.tsx @@ -1,4 +1,4 @@ -import * as moment from "moment" +import moment from "moment" import * as React from "react" import "react-native" import * as renderer from "react-test-renderer" diff --git a/src/lib/Components/Inbox/Conversations/__tests__/ZeroStateInbox-tests.tsx b/src/lib/Components/Inbox/Conversations/__tests__/ZeroStateInbox-tests.tsx index 6462ace750..ea2042013a 100644 --- a/src/lib/Components/Inbox/Conversations/__tests__/ZeroStateInbox-tests.tsx +++ b/src/lib/Components/Inbox/Conversations/__tests__/ZeroStateInbox-tests.tsx @@ -3,14 +3,18 @@ import * as React from "react" import "react-native" import * as renderer from "react-test-renderer" -import Inbox from "../" +import { Conversations } from "../" it("looks correct when the user has no conversations", () => { - const tree = renderer.create().toJSON() + const tree = renderer + .create() + .toJSON() expect(tree).toMatchSnapshot() }) it("renders correct when the user has no conversations", () => { - const tree = renderer.create().toJSON() + const tree = renderer + .create() + .toJSON() expect(tree).toMatchSVGSnapshot(480, 1024) }) diff --git a/src/lib/Components/Inbox/Conversations/index.tsx b/src/lib/Components/Inbox/Conversations/index.tsx index 65e213d869..402a198d67 100644 --- a/src/lib/Components/Inbox/Conversations/index.tsx +++ b/src/lib/Components/Inbox/Conversations/index.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createPaginationContainer, graphql, RelayPaginationProp } from "react-relay" import styled from "styled-components/native" import { ListView, ListViewDataSource, View } from "react-native" @@ -16,7 +16,7 @@ const Headline = styled(LargeHeadline)` ` interface Props extends RelayProps { - relay: Relay.RelayProp + relay?: RelayPaginationProp headerView?: JSX.Element onRefresh?: () => any } @@ -82,16 +82,13 @@ export class Conversations extends React.Component { if (this.state.fetchingNextPage) { return } - const totalSize = this.props.relay.variables.totalSize + PageSize - this.setState({ fetchingNextPage: true }) - this.props.relay.forceFetch({ totalSize }, readyState => { - if (readyState.done) { - this.setState({ - fetchingNextPage: false, - dataSource: this.state.dataSource.cloneWithRows(this.conversations), - }) - } + this.props.relay.loadMore(PageSize, error => { + // TODO Not performing any error handling here + this.setState({ + fetchingNextPage: false, + dataSource: this.state.dataSource.cloneWithRows(this.conversations), + }) }) } @@ -123,36 +120,64 @@ export class Conversations extends React.Component { } } -export default Relay.createContainer(Conversations, { - initialVariables: { - totalSize: PageSize, - }, - fragments: { - me: () => Relay.QL` - fragment on Me { - conversations(first: $totalSize) { +export default createPaginationContainer( + Conversations, + { + me: graphql.experimental` + fragment Conversations_me on Me + @argumentDefinitions(count: { type: "Int", defaultValue: 10 }, cursor: { type: "String", defaultValue: "" }) { + conversations(first: $count, after: $cursor) @connection(key: "Conversations_conversations") { pageInfo { + endCursor hasNextPage } edges { node { id last_message - ${ConversationSnippet.getFragment("conversation")} + ...ConversationSnippet_conversation } } } } `, }, -}) + { + direction: "forward", + getConnectionFromProps(props) { + return props.me && props.me.conversations + }, + getFragmentVariables(prevVars, totalCount) { + return { + ...prevVars, + count: totalCount, + } + }, + getVariables(props, { count, cursor }, fragmentVariables) { + return { + // in most cases, for variables other than connection filters like + // `first`, `after`, etc. you may want to use the previous values. + ...fragmentVariables, + count, + cursor, + } + }, + query: graphql.experimental` + query ConversationsQuery($count: Int!, $after: String) { + me { + ...Conversations_me @arguments(count: $count, after: $after) + } + } + `, + } +) interface RelayProps { me: { conversations: { pageInfo: { hasNextPage: boolean - } + } | null edges: Array<{ node: { id: string | null diff --git a/src/lib/Components/Inbox/Typography/index.tsx b/src/lib/Components/Inbox/Typography/index.tsx index 08a6353107..30906ab6bc 100644 --- a/src/lib/Components/Inbox/Typography/index.tsx +++ b/src/lib/Components/Inbox/Typography/index.tsx @@ -4,7 +4,7 @@ import { StyleSheet, Text, TextProperties, TextStyle } from "react-native" import colors from "../../../../data/colors" import fonts from "../../../../data/fonts" -const LargeHeadline = (props: TextProperties) => { +const LargeHeadline: React.SFC = props => { const children: string = (props as any).children const style = [styles.largeDefault, props.style || {}, styles.largeRequired] return ( @@ -14,7 +14,7 @@ const LargeHeadline = (props: TextProperties) => { ) } -const SmallHeadline = (props: TextProperties) => { +const SmallHeadline: React.SFC = props => { const children: string = (props as any).children const style = [styles.smallDefault, props.style || {}, styles.smallRequired] return ( @@ -24,7 +24,7 @@ const SmallHeadline = (props: TextProperties) => { ) } -const Subtitle = (props: TextProperties) => { +const Subtitle: React.SFC = props => { const children: string = (props as any).children const style = [styles.subtitleDefault, props.style || {}, styles.subtitleRequired] return ( @@ -34,7 +34,7 @@ const Subtitle = (props: TextProperties) => { ) } -const FromSignatureText = (props: TextProperties) => { +const FromSignatureText: React.SFC = props => { const children: string = (props as any).children const style = [styles.fromSignatureDefault, props.style || {}] return ( @@ -44,7 +44,7 @@ const FromSignatureText = (props: TextProperties) => { ) } -const MetadataText = (props: TextProperties) => { +const MetadataText: React.SFC = props => { const children: string = (props as any).children const style = [styles.metadataDefault, props.style || {}, styles.metadataRequired] return ( @@ -54,7 +54,7 @@ const MetadataText = (props: TextProperties) => { ) } -const PreviewText = (props: TextProperties) => { +const PreviewText: React.SFC = props => { const children: string = (props as any).children const style = [styles.bodyDefault, props.style || {}, styles.bodyRequired] return ( @@ -64,7 +64,7 @@ const PreviewText = (props: TextProperties) => { ) } -const BodyText = (props: TextProperties & { disabled?: boolean }) => { +const BodyText: React.SFC = props => { const children: string = (props as any).children const style = [styles.bodyDefault, props.disabled && styles.disabled, props.style || {}, styles.bodyRequired] return ( diff --git a/src/lib/Components/OpaqueImageView.tsx b/src/lib/Components/OpaqueImageView.tsx index c7203e321f..96466b5177 100644 --- a/src/lib/Components/OpaqueImageView.tsx +++ b/src/lib/Components/OpaqueImageView.tsx @@ -70,7 +70,7 @@ export default class OpaqueImageView extends React.Component { } if (__DEV__) { - const style = StyleSheet.flatten(props.style) + const style: React.CSSProperties = StyleSheet.flatten(props.style) if (style == null) { return } diff --git a/src/lib/Components/RelatedArtists/RelatedArtist.tsx b/src/lib/Components/RelatedArtists/RelatedArtist.tsx index 1a48d941c0..8a64a5ff62 100644 --- a/src/lib/Components/RelatedArtists/RelatedArtist.tsx +++ b/src/lib/Components/RelatedArtists/RelatedArtist.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { StyleSheet, Text, TextStyle, TouchableWithoutFeedback, View } from "react-native" @@ -69,23 +69,22 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(RelatedArtist, { - fragments: { - artist: () => Relay.QL` - fragment on Artist { - href - name - counts { - for_sale_artworks - artworks - } - image { - url(version: "large") - } +export default createFragmentContainer( + RelatedArtist, + graphql` + fragment RelatedArtist_artist on Artist { + href + name + counts { + for_sale_artworks + artworks } - `, - }, -}) + image { + url(version: "large") + } + } + ` +) interface RelayProps { artist: { diff --git a/src/lib/Components/RelatedArtists/index.tsx b/src/lib/Components/RelatedArtists/index.tsx index 2ed501a5c6..b79d7847f7 100644 --- a/src/lib/Components/RelatedArtists/index.tsx +++ b/src/lib/Components/RelatedArtists/index.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { LayoutChangeEvent, StyleSheet, TextStyle, View, ViewProperties, ViewStyle } from "react-native" @@ -109,16 +109,15 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(RelatedArtists, { - fragments: { - artists: () => Relay.QL` - fragment on Artist @relay(plural: true) { - __id - ${RelatedArtist.getFragment("artist")} - } - `, - }, -}) +export default createFragmentContainer( + RelatedArtists, + graphql` + fragment RelatedArtists_artists on Artist @relay(plural: true) { + __id + ...RelatedArtist_artist + } + ` +) interface RelayProps { artists: Array<{ diff --git a/src/lib/Components/Text/Headline.tsx b/src/lib/Components/Text/Headline.tsx index 9ccade2568..f929e1c460 100644 --- a/src/lib/Components/Text/Headline.tsx +++ b/src/lib/Components/Text/Headline.tsx @@ -4,8 +4,9 @@ import { StyleSheet, Text, TextProperties } from "react-native" export default class Headline extends React.Component { render() { const content = (this.props.children || "") as string + return ( - + {content.toUpperCase()} ) diff --git a/src/lib/Components/WorksForYou/Notification.tsx b/src/lib/Components/WorksForYou/Notification.tsx index a49eb0fca5..f932a915f2 100644 --- a/src/lib/Components/WorksForYou/Notification.tsx +++ b/src/lib/Components/WorksForYou/Notification.tsx @@ -1,9 +1,9 @@ import * as React from "react" import { Image, StyleSheet, TextStyle, TouchableWithoutFeedback, View, ViewStyle } from "react-native" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import SwitchBoard from "../../NativeModules/SwitchBoard" -import ArtworksGrid from "../ArtworkGrids/GenericGrid" +import GenericGrid from "../ArtworkGrids/GenericGrid" import Headline from "../Text/Headline" import SerifText from "../Text/Serif" @@ -47,7 +47,7 @@ export class Notification extends React.Component { - + ) @@ -111,29 +111,28 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(Notification, { - fragments: { - notification: () => Relay.QL` - fragment on NotificationsFeedItem { - date(format: "MMM D") - message - artists - artworks { - artists(shallow: true) { - href - } - ${ArtworksGrid.getFragment("artworks")} +export default createFragmentContainer( + Notification, + graphql` + fragment Notification_notification on NotificationsFeedItem { + date(format: "MMM D") + message + artists + artworks { + artists(shallow: true) { + href } - status - image { - resized(height: 80, width: 80) { - url - } + ...GenericGrid_artworks + } + status + image { + resized(height: 80, width: 80) { + url } } - `, - }, -}) + } + ` +) interface RelayProps { notification: { diff --git a/src/lib/Containers/Artist.tsx b/src/lib/Containers/Artist.tsx index 0bdac13626..e0c5d56a84 100644 --- a/src/lib/Containers/Artist.tsx +++ b/src/lib/Containers/Artist.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { Dimensions, ScrollView, StyleSheet, View, ViewProperties, ViewStyle } from "react-native" @@ -136,27 +136,26 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(Artist, { - fragments: { - artist: () => Relay.QL` - fragment on Artist { - _id - id - has_metadata - counts { - artworks, - partner_shows, - related_artists, - articles - } - ${Header.getFragment("artist")} - ${About.getFragment("artist")} - ${Shows.getFragment("artist")} - ${Artworks.getFragment("artist")} +export default createFragmentContainer( + Artist, + graphql` + fragment Artist_artist on Artist { + _id + id + has_metadata + counts { + artworks + partner_shows + related_artists + articles } - `, - }, -}) + ...Header_artist + ...About_artist + ...Shows_artist + ...Artworks_artist + } + ` +) interface RelayProps { artist: { diff --git a/src/lib/Containers/Conversation.tsx b/src/lib/Containers/Conversation.tsx index 27321d7f07..92ecb453d8 100644 --- a/src/lib/Containers/Conversation.tsx +++ b/src/lib/Containers/Conversation.tsx @@ -1,5 +1,14 @@ import * as React from "react" -import * as Relay from "react-relay" +import { + commitMutation, + createRefetchContainer, + Environment, + graphql, + MutationConfig, + RecordSourceSelectorProxy, + RelayRefetchProp, +} from "react-relay" +import { ConnectionHandler } from "relay-runtime" import { MetadataText, SmallHeadline } from "../Components/Inbox/Typography" @@ -62,7 +71,7 @@ const MessagesList = styled(FlatList)` const PAGE_SIZE = 100 interface Props extends RelayProps { - relay?: Relay.RelayProp + relay?: RelayRefetchProp } interface State { @@ -83,9 +92,8 @@ export class Conversation extends React.Component { } renderMessage({ item }) { - const me = this.props.me - const conversationItem = me.conversation.items[0].item - const conversation = me.conversation + const conversationItem = this.props.me.conversation.items[0].item + const conversation = this.props.me.conversation const partnerName = conversation.to.name const senderName = item.is_from_user ? conversation.from.name : partnerName const initials = item.is_from_user ? conversation.from.initials : conversation.to.initials @@ -114,19 +122,12 @@ export class Conversation extends React.Component { ) } - // FIXME This will perform a network request after initially rendering the component and thus always fetch the latest - // messages. However, with a cold Relay cache this leads to an initial double fetch, because Relay will also - // fetch the data before rendering the initial load. componentDidMount() { - if (this.props.relay) { - this.props.relay.forceFetch({}) - } - - NetInfo.isConnected.addEventListener("change", this.handleConnectivityChange) + NetInfo.isConnected.addEventListener("connectionChange", this.handleConnectivityChange) } componentWillUnmount() { - NetInfo.isConnected.removeEventListener("change", this.handleConnectivityChange) + NetInfo.isConnected.removeEventListener("connectionChange", this.handleConnectivityChange) } handleConnectivityChange(isConnected) { @@ -145,24 +146,19 @@ export class Conversation extends React.Component { { - this.props.relay.commitUpdate( - new SendConversationMessageMutation({ - body_text: text, - reply_to_message_id: lastMessage.impulse_id, - conversation: this.props.me.conversation as any, - }), - { - onFailure: transaction => { - // TODO Actually handle errors - console.warn(transaction.getError()) - this.setState({ sendingMessage: false }) - }, - onSuccess: () => { - this.setState({ sendingMessage: false }) - }, + this.setState({ sendingMessage: true }) + sendConversationMessage( + this.props.relay.environment, + conversation, + text, + response => { + this.setState({ sendingMessage: false }) + }, + error => { + console.warn(error) + this.setState({ sendingMessage: false }) } ) - this.setState({ sendingMessage: true }) }} > @@ -188,139 +184,159 @@ export class Conversation extends React.Component { } } -interface MutationProps { - body_text: string - reply_to_message_id: string - conversation: { - __id: string - id: string - from: { - email: string - } +function sendConversationMessage( + environment: Environment, + conversation: RelayProps["me"]["conversation"], + text: string, + onCompleted: MutationConfig["onCompleted"], + onError: MutationConfig["onError"] +) { + const lastMessage = conversation.messages.edges[conversation.messages.edges.length - 1].node + + const storeUpdater = (store: RecordSourceSelectorProxy) => { + const mutationPayload = store.getRootField("sendConversationMessage") + const newMessageEdge = mutationPayload.getLinkedRecord("messageEdge") + const connection = ConnectionHandler.getConnection(store.get(conversation.__id), "Conversation_messages") + ConnectionHandler.insertEdgeAfter(connection, newMessageEdge) } -} -class SendConversationMessageMutation extends Relay.Mutation { - static fragments = { - conversation: () => Relay.QL` - fragment on Conversation { - __id - id - from { - email + return commitMutation(environment, { + onCompleted, + onError, + + optimisticUpdater: storeUpdater, + updater: storeUpdater, + + // TODO See if we can extract the field selections into a fragment and share it with the normal pagination fragment. + // Also looks like we can get rid of the `body` selection. + mutation: graphql` + mutation ConversationSendMessageMutation($input: SendConversationMessageMutationInput!) { + sendConversationMessage(input: $input) { + messageEdge { + node { + impulse_id + is_from_user + body + __id + ...Message_message + } + } } } `, - } - - getMutation() { - return Relay.QL`mutation { sendConversationMessage }` - } - getVariables() { - return { - id: this.props.conversation.id, - from: this.props.conversation.from.email, - body_text: this.props.body_text, - reply_to_message_id: this.props.reply_to_message_id, - } - } - - getFatQuery() { - return Relay.QL` - fragment on SendConversationMessageMutationPayload { - messageEdge - conversation { - messages - } - } - ` - } + variables: { + input: { + id: conversation.id, + from: conversation.from.email, + body_text: text, + // Reply to the last message + reply_to_message_id: lastMessage.impulse_id, + }, + }, - getConfigs() { - return [ + // TODO Figure out which of these keys is *actually* required for Relay Modern and update the typings to reflect that. + // And if it’s really true that this config isn’t enough to update the connection and we really need the updater + // functions. + configs: [ { type: "RANGE_ADD", parentName: "conversation", - parentID: this.props.conversation.__id, + parentID: "__id", connectionName: "messages", edgeName: "messageEdge", rangeBehaviors: { "": "append", }, + connectionInfo: [ + { + key: "Conversation_messages", + rangeBehavior: "append", + }, + ], }, - ] - } + ], - getOptimisticResponse() { - return { - messageEdge: { - node: { - body: this.props.body_text, - is_from_user: true, - created_at: new Date().toISOString(), - attachments: [], + optimisticResponse: { + sendConversationMessage: { + messageEdge: { + node: { + body: text, + from: { + email: conversation.from.email, + name: null, + }, + is_from_user: true, + created_at: null, // Intentionally left blank so Message can recognize this as an optimistic response. + attachments: [], + }, }, }, - } - } + }, + }) } -export default Relay.createContainer(Conversation, { - initialVariables: { - pageSize: PAGE_SIZE, - conversationID: null, - }, - fragments: { - me: () => Relay.QL` - fragment on Me { - conversation(id: $conversationID) { - from { - name - email - initials - } - to { - name - initials +// TODO Make this a pagination container instead of fetching 100 messages +export default createRefetchContainer( + Conversation, + graphql` + fragment Conversation_me on Me { + conversation(id: $conversationID) { + __id + id + from { + name + email + initials + } + to { + name + initials + } + messages(first: 200) @connection(key: "Conversation_messages") { + pageInfo { + hasNextPage } - messages(first: $pageSize) { - pageInfo { - hasNextPage - } - edges { - node { - impulse_id - is_from_user - ${Message.getFragment("message")} - } + edges { + node { + impulse_id + is_from_user + body + ...Message_message } } - items { - item { - ... on Artwork { - __typename - href - ${ArtworkPreview.getFragment("artwork")} - } - ... on Show { - __typename - href - ${ShowPreview.getFragment("show")} - } + } + items { + item { + ... on Artwork { + __typename + href + ...ArtworkPreview_artwork + } + ... on Show { + __typename + href + ...ShowPreview_show } } - ${SendConversationMessageMutation.getFragment("conversation")} } } - `, - }, -}) + } + `, + graphql` + query ConversationRefetchQuery($conversationID: String!) { + me { + ...Conversation_me + } + } + ` +) interface RelayProps { me: { - initials: string conversation: { + __id: string + id: string from: { name: string email: string diff --git a/src/lib/Containers/Gene.tsx b/src/lib/Containers/Gene.tsx index f8b42288f2..3f480ede31 100644 --- a/src/lib/Containers/Gene.tsx +++ b/src/lib/Containers/Gene.tsx @@ -1,7 +1,7 @@ import * as _ from "lodash" import * as React from "react" -import * as ParallaxScrollView from "react-native-parallax-scroll-view" -import * as Relay from "react-relay" +import ParallaxScrollView from "react-native-parallax-scroll-view" +import { createRefetchContainer, graphql, RelayRefetchProp } from "react-relay" import { Dimensions, StyleSheet, View, ViewProperties, ViewStyle } from "react-native" @@ -12,7 +12,7 @@ import SerifText from "../Components/Text/Serif" import About from "../Components/Gene/About" import Header from "../Components/Gene/Header" -import Artworks from "../Components/ArtworkGrids/RelayConnections/GeneArtworksGrid" +import GeneArtworksGrid from "../Components/ArtworkGrids/RelayConnections/GeneArtworksGrid" import SwitchView, { SwitchEvent } from "../Components/SwitchView" @@ -33,7 +33,7 @@ interface Props extends ViewProperties { medium: string price_range: string gene: any - relay?: Relay.RelayProp + relay?: RelayRefetchProp } interface State { @@ -111,12 +111,12 @@ export class Gene extends React.Component { return case TABS.WORKS: return ( - ) } @@ -191,11 +191,16 @@ export class Gene extends React.Component { selectedPriceRange: newSettings.selectedPrice, sort: newSettings.sort, }) - this.props.relay.setVariables({ - medium: newSettings.medium, - price_range: newSettings.selectedPrice, - sort: newSettings.sort, - }) + + this.props.relay.refetch( + { + medium: newSettings.medium, + price_range: newSettings.selectedPrice, + sort: newSettings.sort, + }, + // TODO is this param really required? + null + ) } }) .catch(error => { @@ -337,38 +342,43 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(Gene, { - // fallbacks for when no medium/price_range is set - initialVariables: { - medium: "*", - price_range: "*-*", - sort: "-partner_updated_at", - }, - fragments: { - gene: () => Relay.QL` - fragment on Gene { - _id - id - ${Header.getFragment("gene")} - ${About.getFragment("gene")} - ${Artworks.getFragment("gene")} - filtered_artworks(medium: $medium, - price_range: $price_range, - sort: $sort, - aggregations: [MEDIUM, PRICE_RANGE, TOTAL], - page: 1, - for_sale: true) { - total - aggregations { - slice - counts { - id - name - count - } +export default createRefetchContainer( + Gene, + graphql.experimental` + fragment Gene_gene on Gene + @argumentDefinitions( + sort: { type: "String", defaultValue: "-partner_updated_at" } + medium: { type: "String", defaultValue: "*" } + price_range: { type: "String", defaultValue: "*-*" } + ) { + ...Header_gene + ...About_gene + ...GeneArtworksGrid_gene + filtered_artworks( + medium: $medium + price_range: $price_range + sort: $sort + aggregations: [MEDIUM, PRICE_RANGE, TOTAL] + page: 1 + for_sale: true + ) { + total + aggregations { + slice + counts { + id + name + count } } } - `, - }, -}) + } + `, + graphql.experimental` + query GeneRefetchQuery($geneID: String!, $sort: String, $medium: String, $price_range: String) { + gene(id: $geneID) { + ...Gene_gene @arguments(sort: $sort, medium: $medium, price_range: $price_range) + } + } + ` +) diff --git a/src/lib/Containers/Home.tsx b/src/lib/Containers/Home.tsx index f57d7c46bb..450a4d53b5 100644 --- a/src/lib/Containers/Home.tsx +++ b/src/lib/Containers/Home.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { ListView, ListViewDataSource, RefreshControl, ScrollView, ScrollViewProps, ViewProperties } from "react-native" @@ -118,37 +118,39 @@ export class Home extends React.Component { } } -export default Relay.createContainer(Home, { - fragments: { - home: () => Relay.QL` - fragment on HomePage { - hero_units(platform: MOBILE) { - ${HeroUnits.getFragment("hero_units")} - } - artwork_modules(max_rails: -1, - max_followed_gene_rails: -1, - order: [ - ACTIVE_BIDS, - RECOMMENDED_WORKS, - FOLLOWED_ARTISTS, - RELATED_ARTISTS, - FOLLOWED_GALLERIES, - SAVED_WORKS, - LIVE_AUCTIONS, - CURRENT_FAIRS, - FOLLOWED_GENES, - GENERIC_GENES]) { - __id - ${ArtworkRail.getFragment("rail")} - } - artist_modules { - __id - ${ArtistRail.getFragment("rail")} - } +export default createFragmentContainer( + Home, + graphql` + fragment Home_home on HomePage { + hero_units(platform: MOBILE) { + ...HeroUnits_hero_units } - `, - }, -}) + artwork_modules( + max_rails: -1 + max_followed_gene_rails: -1 + order: [ + ACTIVE_BIDS + RECOMMENDED_WORKS + FOLLOWED_ARTISTS + RELATED_ARTISTS + FOLLOWED_GALLERIES + SAVED_WORKS + LIVE_AUCTIONS + CURRENT_FAIRS + FOLLOWED_GENES + GENERIC_GENES + ] + ) { + __id + ...ArtworkRail_rail + } + artist_modules { + __id + ...ArtistRail_rail + } + } + ` +) interface RelayProps { home: { diff --git a/src/lib/Containers/Inbox.tsx b/src/lib/Containers/Inbox.tsx index 13b8decd95..c16629227c 100644 --- a/src/lib/Containers/Inbox.tsx +++ b/src/lib/Containers/Inbox.tsx @@ -1,14 +1,14 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createRefetchContainer, graphql, RelayRefetchProp } from "react-relay" import styled from "styled-components/native" import { RefreshControl, ScrollView, View } from "react-native" -import ActiveBids from "../Components/Inbox/Bids" +import ActiveBids from "../Components/Inbox/ActiveBids" import Conversations from "../Components/Inbox/Conversations" import ZeroStateInbox from "../Components/Inbox/Conversations/ZeroStateInbox" interface Props extends RelayProps { - relay?: Relay.RelayProp + relay?: RelayRefetchProp } interface State { @@ -34,16 +34,12 @@ export class Inbox extends React.Component { } this.setState({ fetchingData: true }) - this.props.relay.forceFetch({}, readyState => { - if (readyState.done) { - this.setState({ fetchingData: false }) - } - }) + this.props.relay.refetch({}, null, () => this.setState({ fetchingData: false }), { force: true }) } render() { const hasBids = this.props.me.lot_standings.length > 0 - const hasConversations = this.props.me.conversations.edges.length > 0 + const hasConversations = this.props.me.conversations_existence_check.edges.length > 0 return hasBids || hasConversations ? }> @@ -59,28 +55,41 @@ export class Inbox extends React.Component { // // The same applies to the `conversations` snippet. // -export default Relay.createContainer(Inbox, { - fragments: { - me: () => Relay.QL` - fragment on Me { +// TODO After switch to modern, we can use the following stopgap instead: +// +// ...Conversations_me @relay(mask: false) +// ...ActiveBids_me @relay(mask: false) +// +export default createRefetchContainer( + Inbox, + { + me: graphql` + fragment Inbox_me on Me { lot_standings(active_positions: true) { active_bid { __id } } - conversations(first: 10) { + conversations_existence_check: conversations(first: 1) { edges { node { id } } } - ${Conversations.getFragment("me")} - ${ActiveBids.getFragment("me")} + ...Conversations_me + ...ActiveBids_me } `, }, -}) + graphql` + query InboxRefetchQuery { + me { + ...Inbox_me + } + } + ` +) interface RelayProps { me: { @@ -89,7 +98,7 @@ interface RelayProps { __id: string } | null } | null> | null - conversations: { + conversations_existence_check: { edges: Array<{ node: { id: string | null diff --git a/src/lib/Containers/Inquiry.tsx b/src/lib/Containers/Inquiry.tsx index 2da78fdf1e..675722bc48 100644 --- a/src/lib/Containers/Inquiry.tsx +++ b/src/lib/Containers/Inquiry.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { MetadataText, SmallHeadline } from "../Components/Inbox/Typography" @@ -86,7 +86,7 @@ export class Inquiry extends React.Component { constructor(props) { super(props) this.state = { - text: this.props.inquiryArtwork.contact_message, + text: this.props.artwork.contact_message, sending: false, } } @@ -106,7 +106,7 @@ export class Inquiry extends React.Component { "X-ACCESS-TOKEN": Emission.authenticationToken, }, body: JSON.stringify({ - artwork: this.props.inquiryArtwork.id, + artwork: this.props.artwork.id, message: this.state.text, }), }) @@ -129,8 +129,8 @@ export class Inquiry extends React.Component { render() { const message = this.state.text const partnerResponseRate = "2 DAY RESPONSE TIME" // currently hardcoded - const inquiryArtwork = this.props.inquiryArtwork - const partnerName = this.props.inquiryArtwork.partner.name + const artwork = this.props.artwork + const partnerName = this.props.artwork.partner.name const buttonText = this.state.sending ? "SENDING..." : "SEND" const doneButtonStyles = { @@ -168,7 +168,7 @@ export class Inquiry extends React.Component {
- + { } } -export default Relay.createContainer(Inquiry, { - fragments: { - inquiryArtwork: () => Relay.QL` - fragment on Artwork { - id - contact_message - ${ArtworkPreview.getFragment("artwork")} - partner { - name - } +export default createFragmentContainer( + Inquiry, + graphql` + fragment Inquiry_artwork on Artwork { + id + contact_message + partner { + name } - `, - }, -}) + ...ArtworkPreview_artwork + } + ` +) interface RelayProps { - inquiryArtwork: { + artwork: { id: string contact_message: string partner: { diff --git a/src/lib/Containers/MyAccount.tsx b/src/lib/Containers/MyAccount.tsx index 42aff9f81f..289d2bc827 100644 --- a/src/lib/Containers/MyAccount.tsx +++ b/src/lib/Containers/MyAccount.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as Relay from "react-relay" +import { createFragmentContainer, graphql } from "react-relay" import { Dimensions, ScrollView, View, ViewProperties, ViewStyle } from "react-native" @@ -32,15 +32,14 @@ interface Styles { tabView: ViewStyle } -export default Relay.createContainer(MyAccount, { - fragments: { - me: () => Relay.QL` - fragment on Me { - name - } - `, - }, -}) +export default createFragmentContainer( + MyAccount, + graphql` + fragment MyAccount_me on Me { + name + } + ` +) interface RelayProps { me: { diff --git a/src/lib/Containers/WorksForYou.tsx b/src/lib/Containers/WorksForYou.tsx index a619042e00..b8c221e567 100644 --- a/src/lib/Containers/WorksForYou.tsx +++ b/src/lib/Containers/WorksForYou.tsx @@ -1,6 +1,6 @@ -import * as moment from "moment" +import moment from "moment" import * as React from "react" -import * as Relay from "react-relay" +import { createPaginationContainer, graphql } from "react-relay" import { LayoutChangeEvent, @@ -16,7 +16,10 @@ import { import Events from "../NativeModules/Events" -import ArtworksGrid from "../Components/ArtworkGrids/GenericGrid" +import GenericGrid from "../Components/ArtworkGrids/GenericGrid" +// tslint:disable-next-line:no-unused-expression +GenericGrid + import SerifText from "../Components/Text/Serif" import Notification from "../Components/WorksForYou/Notification" @@ -110,29 +113,22 @@ export class WorksForYou extends React.Component { return } this.setState({ fetchingNextPage: true }) - this.props.relay.setVariables( - { - totalSize: this.props.relay.variables.totalSize + PageSize, - }, - readyState => { - if (readyState.done) { - const notifications = this.props.viewer.me.notifications.edges.map(edge => edge.node) + this.props.relay.loadMore(PageSize, error => { + const notifications = this.props.viewer.me.notifications.edges.map(edge => edge.node) - // Make sure we maintain the special notification if it exists - if (this.props.viewer.selectedArtist) { - notifications.unshift(this.formattedSpecialNotification()) - } + // Make sure we maintain the special notification if it exists + if (this.props.viewer.selectedArtist) { + notifications.unshift(this.formattedSpecialNotification()) + } - this.setState({ - fetchingNextPage: false, - dataSource: this.state.dataSource.cloneWithRows(notifications), - }) - if (!this.props.viewer.me.notifications.pageInfo.hasNextPage) { - this.setState({ completed: true }) - } - } + this.setState({ + fetchingNextPage: false, + dataSource: this.state.dataSource.cloneWithRows(notifications), + }) + if (!this.props.viewer.me.notifications.pageInfo.hasNextPage) { + this.setState({ completed: true }) } - ) + }) } componentDidUpdate() { @@ -242,35 +238,32 @@ const styles = StyleSheet.create({ }, }) -export default Relay.createContainer(WorksForYou, { - initialVariables: { - totalSize: PageSize, - selectedArtist: null, - showSpecialNotification: false, - }, - prepareVariables: prevVariables => { - return { - ...prevVariables, - showSpecialNotification: !!prevVariables.selectedArtist, - } - }, - fragments: { - viewer: () => Relay.QL` - fragment on Viewer { +const WorksForYouContainer = createPaginationContainer( + WorksForYou, + { + viewer: graphql.experimental` + fragment WorksForYou_viewer on Viewer + @argumentDefinitions( + count: { type: "Int", defaultValue: 10 } + cursor: { type: "String" } + selectedArtist: { type: "String!", defaultValue: "" } + ) { me { - notifications: notifications_connection(first: $totalSize) { + notifications: notifications_connection(first: $count, after: $cursor) + @connection(key: "WorksForYou_notifications") { pageInfo { hasNextPage + endCursor } edges { node { - ${Notification.getFragment("notification")} + __id + ...Notification_notification } } } } - selectedArtist: artist(id: $selectedArtist) - @include(if: $showSpecialNotification) { + selectedArtist: artist(id: $selectedArtist) { href name image { @@ -278,13 +271,44 @@ export default Relay.createContainer(WorksForYou, { url } } - artworks(sort:published_at_desc, size: 6) { - ${ArtworksGrid.getFragment("artworks")} + artworks(sort: published_at_desc, size: 6) { + ...GenericGrid_artworks } } - }`, + } + `, }, -}) + { + direction: "forward", + getConnectionFromProps(props) { + return props.viewer.me.notifications + }, + getFragmentVariables(prevVars, totalCount) { + return { + ...prevVars, + count: totalCount, + } + }, + getVariables(props, { count, cursor }, fragmentVariables) { + return { + // in most cases, for variables other than connection filters like + // `first`, `after`, etc. you may want to use the previous values. + ...fragmentVariables, + count, + cursor, + } + }, + query: graphql.experimental` + query WorksForYouQuery($count: Int!, $cursor: String) { + viewer { + ...WorksForYou_viewer @arguments(count: $count, cursor: $cursor) + } + } + `, + } +) + +export default WorksForYouContainer interface RelayProps { viewer: { diff --git a/src/lib/Containers/__stories__/Artist.story.tsx b/src/lib/Containers/__stories__/Artist.story.tsx index b04d6339ce..d16950dfbb 100644 --- a/src/lib/Containers/__stories__/Artist.story.tsx +++ b/src/lib/Containers/__stories__/Artist.story.tsx @@ -1,24 +1,47 @@ import { storiesOf } from "@storybook/react-native" import * as React from "react" -import { RootContainer } from "react-relay" -import Routes from "../../relay/routes" import Artist from "../Artist" +// TODO Move to metametaphysics after Relay Modern migration +import { graphql, QueryRenderer } from "react-relay" +import createEnvironment from "../../relay/createEnvironment" +const RootContainer: React.SFC = ({ Component, artistID }) => { + return ( + { + if (error) { + console.error(error) + } else if (props) { + return + } + return null + }} + /> + ) +} + storiesOf("Artist/Relay") .add("Glenn Brown", () => { - const artistRoute = new Routes.Artist({ artistID: "glenn-brown" }) - return + return }) .add("Leda Catunda", () => { - const artistRoute = new Routes.Artist({ artistID: "leda-catunda" }) - return + return }) .add("Jorge Vigil", () => { - const artistRoute = new Routes.Artist({ artistID: "jorge-vigil" }) - return + return }) .add("Rita Maas", () => { - const artistRoute = new Routes.Artist({ artistID: "rita-maas" }) - return + return }) diff --git a/src/lib/Containers/__stories__/Gene.story.tsx b/src/lib/Containers/__stories__/Gene.story.tsx index 6077f93a69..b94441945f 100644 --- a/src/lib/Containers/__stories__/Gene.story.tsx +++ b/src/lib/Containers/__stories__/Gene.story.tsx @@ -1,29 +1,31 @@ -import { storiesOf } from "@storybook/react-native" -import * as React from "react" -import { RootContainer } from "react-relay" +// TODO Make this work again after Relay Modern migration -import Routes from "../../relay/routes" -import Gene from "../Gene" +// import { storiesOf } from "@storybook/react-native" +// import * as React from "react" +// import * as Relay from "react-relay/classic" -const defaultRefineSettings = { - medium: "*", - price_range: "*-*", -} +// import Routes from "../../relay/routes" +// import Gene from "../Gene" -storiesOf("Gene") - .add("Contemporary Pop", () => { - const geneRoute = new Routes.Gene({ geneID: "contemporary-pop", refineSettings: defaultRefineSettings }) - return - }) - .add("Kawaii", () => { - const geneRoute = new Routes.Gene({ geneID: "kawaii", refineSettings: defaultRefineSettings }) - return - }) - .add("Popular Culture", () => { - const geneRoute = new Routes.Gene({ geneID: "popular-culture", refineSettings: defaultRefineSettings }) - return - }) - .add("Related to Film", () => { - const geneRoute = new Routes.Gene({ geneID: "related-to-film", refineSettings: defaultRefineSettings }) - return - }) +// const defaultRefineSettings = { +// medium: "*", +// price_range: "*-*", +// } + +// storiesOf("Gene") +// .add("Contemporary Pop", () => { +// const geneRoute = new Routes.Gene({ geneID: "contemporary-pop", refineSettings: defaultRefineSettings }) +// return +// }) +// .add("Kawaii", () => { +// const geneRoute = new Routes.Gene({ geneID: "kawaii", refineSettings: defaultRefineSettings }) +// return +// }) +// .add("Popular Culture", () => { +// const geneRoute = new Routes.Gene({ geneID: "popular-culture", refineSettings: defaultRefineSettings }) +// return +// }) +// .add("Related to Film", () => { +// const geneRoute = new Routes.Gene({ geneID: "related-to-film", refineSettings: defaultRefineSettings }) +// return +// }) diff --git a/src/lib/Containers/__stories__/Inquiry.story.tsx b/src/lib/Containers/__stories__/Inquiry.story.tsx index d744756dd2..969b6d33a9 100644 --- a/src/lib/Containers/__stories__/Inquiry.story.tsx +++ b/src/lib/Containers/__stories__/Inquiry.story.tsx @@ -1,11 +1,13 @@ -import { storiesOf } from "@storybook/react-native" -import * as React from "react" -import { RootContainer } from "react-relay" +// TODO make this work again after Relay Modern migration -import Routes from "../../relay/routes" -import Inquiry from "../Inquiry" +// import { storiesOf } from "@storybook/react-native" +// import * as React from "react" +// import { RootContainer } from "react-relay/classic" -storiesOf("Inquiry").add("Yellow Pumpkin", () => { - const inquiryRoute = new Routes.Inquiry({ artworkID: "damien-hirst-for-the-love-of-god-lenticular-6" }) - return -}) +// import Routes from "../../relay/routes" +// import Inquiry from "../Inquiry" + +// storiesOf("Inquiry").add("Yellow Pumpkin", () => { +// const inquiryRoute = new Routes.Inquiry({ artworkID: "damien-hirst-for-the-love-of-god-lenticular-6" }) +// return +// }) diff --git a/src/lib/Containers/__stories__/MyAccount.story.tsx b/src/lib/Containers/__stories__/MyAccount.story.tsx index 75d5299dc5..cce44e9b75 100644 --- a/src/lib/Containers/__stories__/MyAccount.story.tsx +++ b/src/lib/Containers/__stories__/MyAccount.story.tsx @@ -1,11 +1,13 @@ -import { storiesOf } from "@storybook/react-native" -import * as React from "react" -import { RootContainer } from "react-relay" +// TODO Make this work again after Relay Modern migration -import Routes from "../../relay/routes" -import MyAccount from "../MyAccount" +// import { storiesOf } from "@storybook/react-native" +// import * as React from "react" +// import * as Relay from "react-relay/classic" -storiesOf("My Account").add("Root", () => { - const profileRoute = new Routes.MyAccount() - return -}) +// import Routes from "../../relay/routes" +// import MyAccount from "../MyAccount" + +// storiesOf("My Account").add("Root", () => { +// const profileRoute = new Routes.MyAccount() +// return +// }) diff --git a/src/lib/Containers/__tests__/Gene-tests.tsx b/src/lib/Containers/__tests__/Gene-tests.tsx index 80695e2628..678d9451fb 100644 --- a/src/lib/Containers/__tests__/Gene-tests.tsx +++ b/src/lib/Containers/__tests__/Gene-tests.tsx @@ -1,18 +1,15 @@ import * as React from "react" import * as renderer from "react-test-renderer" -let refineCallbackPromise = () => Promise.resolve({}) -jest.mock("../../NativeModules/triggerRefine", () => ({ default: { triggerRefine: () => refineCallbackPromise() } })) +let mockRefineCallbackPromise = () => Promise.resolve({}) +jest.mock("../../NativeModules/triggerRefine", () => ({ + triggerRefine: () => mockRefineCallbackPromise(), +})) // Stub out these views for simplicity sake jest.mock("../../Components/Gene/Header", () => "Header") jest.mock("../../Components/Gene/Artworks", () => "Artworks") -// Native view the Gene references -jest.mock("../../Components/OpaqueImageView", () => "AROpaqueImageView") -jest.mock("../../Components/Spinner", () => "ARSpinner") -jest.mock("../../Components/SwitchView", () => "ARSwitchView") - import { Gene } from "../Gene" describe("state", () => { @@ -54,14 +51,14 @@ describe("state", () => { const gene = new Gene({ medium: "glitch", price_range: "*-*", - relay: { setVariables: jest.fn(), variables: {} } as any, + relay: { variables: {}, refetch: jest.fn() } as any, gene: { filtered_artworks: { aggregations: [] } }, }) gene.setState = jest.fn() // The data we expect back from Eigen when you've hit the refine button, // this is a promise that Eigen would normally resolve (via the modal) - refineCallbackPromise = () => + mockRefineCallbackPromise = () => Promise.resolve({ medium: "porcupines", selectedPrice: "1000-80000", @@ -81,11 +78,14 @@ describe("state", () => { }) // As well as trigger new state for Relay ( triggering a new call to metaphysics ) - expect(gene.props.relay.setVariables).lastCalledWith({ - medium: "porcupines", - price_range: "1000-80000", - sort: "-desc", - }) + expect(gene.props.relay.refetch).lastCalledWith( + { + medium: "porcupines", + price_range: "1000-80000", + sort: "-desc", + }, + null + ) }) }) }) diff --git a/src/lib/Containers/__tests__/Inbox-tests.tsx b/src/lib/Containers/__tests__/Inbox-tests.tsx index 1ebda8d6a1..a7fb0d8ec6 100644 --- a/src/lib/Containers/__tests__/Inbox-tests.tsx +++ b/src/lib/Containers/__tests__/Inbox-tests.tsx @@ -85,6 +85,7 @@ const meProps = (withBids: boolean = true, withMessages: boolean = true) => { ? [ { active_bid: { + __id: "594934048b3b8174796e285a", id: "594934048b3b8174796e285a", display_max_bid_amount_dollars: "$1,100", max_bid: { @@ -114,6 +115,7 @@ const meProps = (withBids: boolean = true, withMessages: boolean = true) => { }, { active_bid: { + __id: "594933e6275b244305851e9c", id: "594933e6275b244305851e9c", display_max_bid_amount_dollars: "$10,000", max_bid: { @@ -143,6 +145,7 @@ const meProps = (withBids: boolean = true, withMessages: boolean = true) => { }, { active_bid: { + __id: "594932d0275b244305851e99", id: "594932d0275b244305851e99", display_max_bid_amount_dollars: "$5,000", max_bid: { @@ -175,6 +178,7 @@ const meProps = (withBids: boolean = true, withMessages: boolean = true) => { return { conversations, + conversations_existence_check: conversations, lot_standings: lotStandings, } } diff --git a/src/lib/Containers/__tests__/Inquiry-tests.tsx b/src/lib/Containers/__tests__/Inquiry-tests.tsx index 02a02229c3..be45af9ef7 100644 --- a/src/lib/Containers/__tests__/Inquiry-tests.tsx +++ b/src/lib/Containers/__tests__/Inquiry-tests.tsx @@ -4,7 +4,7 @@ import * as renderer from "react-test-renderer" import Inquiry from "../Inquiry" it("renders correctly", () => { - const tree = renderer.create().toJSON() + const tree = renderer.create().toJSON() expect(tree).toMatchSnapshot() }) diff --git a/src/lib/Containers/__tests__/WorksForYou-tests.tsx b/src/lib/Containers/__tests__/WorksForYou-tests.tsx index 63eb366669..18cde6f8b2 100644 --- a/src/lib/Containers/__tests__/WorksForYou-tests.tsx +++ b/src/lib/Containers/__tests__/WorksForYou-tests.tsx @@ -1,4 +1,4 @@ -import * as moment from "moment" +import moment from "moment" import * as React from "react" import { NativeModules } from "react-native" import * as renderer from "react-test-renderer" diff --git a/src/lib/Containers/__tests__/__snapshots__/Conversation-tests.tsx.snap b/src/lib/Containers/__tests__/__snapshots__/Conversation-tests.tsx.snap index 79be12794e..f3d2d803ac 100644 --- a/src/lib/Containers/__tests__/__snapshots__/Conversation-tests.tsx.snap +++ b/src/lib/Containers/__tests__/__snapshots__/Conversation-tests.tsx.snap @@ -128,14 +128,6 @@ exports[`displays a connectivity banner when network is down 1`] = `
KIMBERLY KLARK
- - A FEW SECONDS -
KIMBERLY KLARK - - A FEW SECONDS - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/lib/metaphysics.ts b/src/lib/metaphysics.ts index ff2298a3f5..9197c35c22 100644 --- a/src/lib/metaphysics.ts +++ b/src/lib/metaphysics.ts @@ -4,7 +4,10 @@ const Emission = NativeModules.Emission || {} import { metaphysicsURL } from "./relay/config" import { NetworkError } from "./system/errors" -export default function metaphysics(query: string): Promise { +export function metaphysics( + payload: { query: string; variables?: object }, + checkStatus: boolean = true +): Promise { return fetch(metaphysicsURL, { method: "POST", headers: { @@ -12,10 +15,10 @@ export default function metaphysics(query: string): Promise { "X-USER-ID": Emission.userID, "X-ACCESS-TOKEN": Emission.authenticationToken, }, - body: JSON.stringify({ query }), + body: JSON.stringify(payload), }) .then(response => { - if (response.status >= 200 && response.status < 300) { + if (!checkStatus || (response.status >= 200 && response.status < 300)) { return response } else { const error = new NetworkError(response.statusText) @@ -23,6 +26,9 @@ export default function metaphysics(query: string): Promise { throw error } }) - .then<{ data: T }>(response => response.json()) - .then(({ data }) => data) + .then(response => response.json()) +} + +export default function query(query: string): Promise { + return metaphysics<{ data: T }>({ query }).then(({ data }) => data) } diff --git a/src/lib/relay/QueryRenderers.tsx b/src/lib/relay/QueryRenderers.tsx new file mode 100644 index 0000000000..1596e5bea0 --- /dev/null +++ b/src/lib/relay/QueryRenderers.tsx @@ -0,0 +1,207 @@ +import * as React from "react" +import { graphql, QueryRenderer, QueryRendererProps } from "react-relay" + +// tslint:disable:no-unused-expression +import Artist from "../Containers/Artist" +Artist + +import Conversation from "../Containers/Conversation" +Conversation + +import Home from "../Containers/Home" +Home + +import Gene from "../Containers/Gene" +Gene + +import WorksForYou from "../Containers/WorksForYou" +WorksForYou + +import Inquiry from "../Containers/Inquiry" +Inquiry + +import MyAccount from "../Containers/MyAccount" +MyAccount + +import Inbox from "../Containers/Inbox" +Inbox +// tslint:enable:no-unused-expression + +import createEnvironment from "./createEnvironment" +const environment = createEnvironment() + +export type RenderCallback = QueryRendererProps["render"] + +interface RendererProps { + render: RenderCallback +} + +interface ArtistRendererProps extends RendererProps { + artistID: string +} + +export const ArtistRenderer: React.SFC = ({ render, artistID }) => { + return ( + + ) +} + +interface ConversationRendererProps extends RendererProps { + conversationID: string +} + +export const ConversationRenderer: React.SFC = ({ render, conversationID }) => { + return ( + + ) +} + +export const HomeRenderer: React.SFC = ({ render }) => { + return ( + + ) +} + +interface GeneRendererProps extends RendererProps { + geneID: string + medium?: string + price_range?: string +} + +export const GeneRenderer: React.SFC = ({ render, geneID, medium, price_range }) => { + return ( + + ) +} + +interface WorksForYouRendererProps extends RendererProps { + selectedArtist?: string +} + +export const WorksForYouRenderer: React.SFC = ({ render, selectedArtist }) => { + return ( + + ) +} + +interface InquiryRendererProps extends RendererProps { + artworkID: string +} + +export const InquiryRenderer: React.SFC = ({ render, artworkID }) => { + return ( + + ) +} + +export const InboxRenderer: React.SFC = ({ render }) => { + return ( + + ) +} + +export const MyAccountRenderer: React.SFC = ({ render }) => { + return ( + + ) +} diff --git a/src/lib/relay/config.tsx b/src/lib/relay/config.tsx index aebed2479a..9ac8f0db92 100644 --- a/src/lib/relay/config.tsx +++ b/src/lib/relay/config.tsx @@ -1,5 +1,4 @@ import { NativeModules } from "react-native" -import * as Relay from "react-relay" const { Emission } = NativeModules let metaphysicsURL @@ -15,22 +14,12 @@ if (Emission && Emission.gravityAPIHost && Emission.metaphysicsAPIHost) { export { metaphysicsURL, gravityURL } -if (Emission) { - Relay.injectNetworkLayer( - new Relay.DefaultNetworkLayer(metaphysicsURL, { - headers: { - "X-USER-ID": Emission.userID, - "X-ACCESS-TOKEN": Emission.authenticationToken, - }, - }) - ) -} - // Disable the native polyfill during development, which will make network requests show-up in the Chrome dev-tools. // Specifically, in our case, we get to see the Relay requests. // // It will be `undefined` unless running inside Chrome. // +declare var global: any if (__DEV__ && global.originalXMLHttpRequest !== undefined) { global.XMLHttpRequest = global.originalXMLHttpRequest // tslint:disable-next-line:no-var-requires diff --git a/src/lib/relay/createEnvironment.ts b/src/lib/relay/createEnvironment.ts new file mode 100644 index 0000000000..6e0caf179d --- /dev/null +++ b/src/lib/relay/createEnvironment.ts @@ -0,0 +1,18 @@ +import { Environment, Network, RecordSource, RelayInMemoryRecordSource, Store } from "relay-runtime" +import { metaphysics } from "../metaphysics" + +// Define a function that fetches the results of an operation (query/mutation/etc) +// and returns its results as a Promise: +function fetchQuery(operation, variables, cacheConfig, uploadables) { + return metaphysics({ query: operation.text, variables }) +} + +export default function createEnvironment() { + const network = Network.create(fetchQuery) + const source = new RecordSource() + const store = new Store(source) + return new Environment({ + network, + store, + }) +} diff --git a/src/lib/relay/routes.tsx b/src/lib/relay/routes.tsx deleted file mode 100644 index 0ec379eaa8..0000000000 --- a/src/lib/relay/routes.tsx +++ /dev/null @@ -1,131 +0,0 @@ -import * as Relay from "react-relay" - -class Artist extends Relay.Route { - static queries = { - artist: (component, params) => Relay.QL` - query { - artist(id: $artistID) { - ${component.getFragment("artist", params)} - } - } - `, - } - - static paramDefinitions = { - artistID: { required: true }, - } - - static routeName = "ArtistRoute" -} - -class Conversation extends Relay.Route { - static queries = { - me: (component, params) => Relay.QL` - query { - me { - ${component.getFragment("me", params)} - } - } - `, - } - - static paramDefinitions = { - conversationID: { required: true }, - } - - static routeName = "ConversationRoute" -} - -class Home extends Relay.Route { - static queries = { - home: (component, params) => Relay.QL` - query { - home_page { - ${component.getFragment("home", params)} - } - } - `, - } - - static routeName = "HomeRoute" -} - -class Gene extends Relay.Route { - static queries = { - gene: (component, params) => Relay.QL` - query { - gene(id: $geneID) { - ${component.getFragment("gene", params)} - } - } - `, - } - - static paramDefinitions = { - geneID: { required: true }, - medium: { required: false }, - price_range: { required: false }, - } - - static routeName = "GeneRoute" -} - -class WorksForYou extends Relay.Route { - static queries = { - viewer: (component, params) => Relay.QL` - query { - viewer { - ${component.getFragment("viewer", params)} - } - } - `, - } - - static paramDefinitions = { - selectedArtist: { required: false }, - } - - static routeName = "WorksForYouRoute" -} - -class MyAccount extends Relay.Route { - static queries = { - me: (component, params) => Relay.QL` - query { - me { - ${component.getFragment("me", params)} - } - } - `, - } - - static routeName = "MyAccountRoute" -} - -class Inquiry extends Relay.Route { - static queries = { - inquiryArtwork: (component, params) => Relay.QL` - query { - artwork(id: $artworkID) { - ${component.getFragment("inquiryArtwork", params)} - } - } - `, - } - - static paramDefinitions = { - artworkID: { required: true }, - } - - static routeName = "InquiryRoute" -} - -export default { - Artist, - Conversation, - Home, - Gene, - WorksForYou, - MyAccount, - Inquiry, -} diff --git a/src/setupJest.ts b/src/setupJest.ts index 41c16a0f6e..e12d520a84 100644 --- a/src/setupJest.ts +++ b/src/setupJest.ts @@ -13,8 +13,8 @@ console.error = (message?: any, ...optionalParams: any[]) => { } } -function mockedModule(path: string, moduleName: string) { - jest.mock(path, () => ({ default: moduleName })) +function mockedModule(path: string, mockModuleName: string) { + jest.mock(path, () => mockModuleName) } jest.mock("./lib/metaphysics.ts") diff --git a/transformer/index.js b/transformer/index.js index b3d5eb3263..3d5e9f1613 100644 --- a/transformer/index.js +++ b/transformer/index.js @@ -8,7 +8,7 @@ const { File } = require("babel-core/lib/transformation/file") const { SourceMapConsumer } = require("source-map") const upstream = require("./upstream") -const { compactMapping } = require("react-native/packager/src/Bundler/source-map") +const { compactMapping } = require("metro-bundler/src/Bundler/source-map") /** * This is a copy of upstream.transform, but modified to: @@ -21,7 +21,7 @@ function transformTypeScript(src, filename, options) { options = options || {}; const OLD_BABEL_ENV = process.env.BABEL_ENV; - process.env.BABEL_ENV = options.dev ? 'development' : 'production'; + process.env.BABEL_ENV = options.dev ? "development" : "production"; try { const compilerOptions = buildTSCompilerOptionsConfig() @@ -30,13 +30,17 @@ function transformTypeScript(src, filename, options) { const babelConfig = buildBabelConfig(filename, options); const transformResult = babel.transform(tsResult.outputText, babelConfig); - const generateResult = generate(transformResult.ast, { - comments: false, - compact: false, - filename, - sourceFileName: filename, - sourceMaps: true, - }, src); + const generateResult = generate( + transformResult.ast, + { + comments: false, + compact: false, + filename, + sourceFileName: filename, + sourceMaps: true, + }, + src + ); // Translate generated source-map back to transformed JS source-map, which maps back to original TS code. generateResult.map = mergeSourceMaps(transformResult.map, generateResult.map) @@ -103,17 +107,17 @@ function extractRawMappings(sourceMap) { return rawMappings } -function transform(sourceCode, fileName, options) { - try { - let src = sourceCode - if (path.extname(fileName) == ".tsx" || path.extname(fileName) == ".ts") { - src = transformTypeScript(src, fileName, options) - } else { - src = upstream.transform(src, fileName, options) - } - return src - } catch(e) { - console.error(e) +function transform({ filename, localPath, options, src }) { + try { + let sourceCode = src + if (filename && (path.extname(filename) == ".tsx" || path.extname(filename) == ".ts")) { + sourceCode = transformTypeScript(sourceCode, filename, options) + } else { + sourceCode = upstream.transform(sourceCode, filename, options) } + return sourceCode + } catch (e) { + console.error(e) + } } module.exports.transform = transform; diff --git a/transformer/upstream.js b/transformer/upstream.js index 3b53908a3b..60d7bc2315 100644 --- a/transformer/upstream.js +++ b/transformer/upstream.js @@ -10,26 +10,26 @@ * * @flow */ -'use strict'; +"use strict"; -const babel = require('babel-core'); -const crypto = require('crypto'); -const externalHelpersPlugin = require('babel-plugin-external-helpers'); -const fs = require('fs'); -const generate = require('babel-generator').default; -const inlineRequiresPlugin = require('babel-preset-fbjs/plugins/inline-requires'); -const json5 = require('json5'); -const makeHMRConfig = require('babel-preset-react-native/configs/hmr'); -const path = require('path'); -const resolvePlugins = require('babel-preset-react-native/lib/resolvePlugins'); +const babel = require("babel-core"); +const crypto = require("crypto"); +const externalHelpersPlugin = require("babel-plugin-external-helpers"); +const fs = require("fs"); +const generate = require("babel-generator").default; +const inlineRequiresPlugin = require("babel-preset-fbjs/plugins/inline-requires"); +const json5 = require("json5"); +const makeHMRConfig = require("babel-preset-react-native/configs/hmr"); +const path = require("path"); +const resolvePlugins = require("babel-preset-react-native/lib/resolvePlugins"); -const { compactMapping } = require("react-native/packager/src/Bundler/source-map") +const { compactMapping } = require("metro-bundler/src/Bundler/source-map"); const cacheKeyParts = [ fs.readFileSync(__filename), - require('babel-plugin-external-helpers/package.json').version, - require('babel-preset-fbjs/package.json').version, - require('babel-preset-react-native/package.json').version, + require("babel-plugin-external-helpers/package.json").version, + require("babel-preset-fbjs/package.json").version, + require("babel-preset-react-native/package.json").version, ]; /** @@ -37,7 +37,7 @@ const cacheKeyParts = [ * project level .babelrc file, and if it doesn't exist, reads the * default RN babelrc file and uses that. */ -const getBabelRC = (function() { +const getBabelRC = (function () { let babelRC = null; return function _getBabelRC(projectRoot) { @@ -45,36 +45,33 @@ const getBabelRC = (function() { return babelRC; } - babelRC = {plugins: []}; + babelRC = { plugins: [] }; // Let's look for the .babelrc in the project root. // In the future let's look into adding a command line option to specify // this location. let projectBabelRCPath; if (projectRoot) { - projectBabelRCPath = path.resolve(projectRoot, '.babelrc'); + projectBabelRCPath = path.resolve(__dirname, "..", ".babelrc"); } // If a .babelrc file doesn't exist in the project, // use the Babel config provided with react-native. if (!projectBabelRCPath || !fs.existsSync(projectBabelRCPath)) { - babelRC = json5.parse( - fs.readFileSync( - path.resolve(__dirname, 'rn-babelrc.json')) - ); - - // Require the babel-preset's listed in the default babel config - // $FlowFixMe: dynamic require can't be avoided - babelRC.presets = babelRC.presets.map(preset => require('babel-preset-' + preset)); - babelRC.plugins = resolvePlugins(babelRC.plugins); + babelRC = json5.parse(fs.readFileSync(path.resolve(__dirname, "..", "rn-babelrc.json"))) + + // // Require the babel-preset's listed in the default babel config + // // $FlowFixMe: dynamic require can't be avoided + babelRC.presets = babelRC.presets.map(preset => require("babel-preset-" + preset)) + babelRC.plugins = resolvePlugins(babelRC.plugins) } else { // if we find a .babelrc file we tell babel to use it babelRC.extends = projectBabelRCPath; } return babelRC; - }; -})(); + } +})() /** * Given a filename and options, build a Babel @@ -94,7 +91,7 @@ function buildBabelConfig(filename, options) { const extraPlugins = [externalHelpersPlugin]; var inlineRequires = options.inlineRequires; - var blacklist = typeof inlineRequires === 'object' ? inlineRequires.blacklist : null; + var blacklist = typeof inlineRequires === "object" ? inlineRequires.blacklist : null; if (inlineRequires && !(blacklist && filename in blacklist)) { extraPlugins.push(inlineRequiresPlugin); } @@ -113,27 +110,31 @@ function transform(src, filename, options) { options = options || {}; const OLD_BABEL_ENV = process.env.BABEL_ENV; - process.env.BABEL_ENV = options.dev ? 'development' : 'production'; + process.env.BABEL_ENV = options.dev ? "development" : "production"; try { const babelConfig = buildBabelConfig(filename, options); - const {ast, ignored} = babel.transform(src, babelConfig); + const { ast, ignored } = babel.transform(src, babelConfig); if (ignored) { return { ast: null, code: src, filename, - map: null + map: null, }; } else { - const result = generate(ast, { - comments: false, - compact: false, - filename, - sourceFileName: filename, - sourceMaps: true, - }, src); + const result = generate( + ast, + { + comments: false, + compact: false, + filename, + sourceFileName: filename, + sourceMaps: true, + }, + src + ); return { ast, @@ -148,13 +149,13 @@ function transform(src, filename, options) { } function getCacheKey(options) { - var key = crypto.createHash('md5'); + var key = crypto.createHash("md5"); cacheKeyParts.forEach(part => key.update(part)); - return key.digest('hex'); + return key.digest("hex"); } module.exports = ({ transform, getCacheKey, - buildBabelConfig + buildBabelConfig, }); diff --git a/tsconfig.json b/tsconfig.json index a3b50828c8..1da03928ab 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,29 +1,25 @@ { - "compilerOptions": { - "jsx": "react", - "target": "es6", - "module": "commonjs", - "rootDir": "src", - "outDir": "build", - "allowJs": true, - "pretty": true, - "moduleResolution": "node", - "strictNullChecks": false - }, - "include": [ - "typings/index.d.ts", - "src/**/*.ts", - "src/**/*.tsx", - "dangerfile.ts" - ], - "exclude": [ - "dangerfile.ts", - "node_modules", - "Pod/Assets", - "Example/Build", - "externals", - "build", - "index.ios.js", - "**/__mocks__" - ] + "compilerOptions": { + "jsx": "react", + "target": "es6", + "module": "es2015", + "moduleResolution": "node", + "rootDir": "src", + "outDir": "build", + "allowJs": true, + "pretty": true, + "strictNullChecks": false, + "allowSyntheticDefaultImports": true + }, + "include": ["typings/*.d.ts", "src/**/*.ts", "src/**/*.tsx", "dangerfile.ts"], + "exclude": [ + "dangerfile.ts", + "node_modules", + "Pod/Assets", + "Example/Build", + "externals", + "build", + "index.ios.js", + "**/__mocks__" + ] } diff --git a/typings/react-relay.d.ts b/typings/react-relay.d.ts new file mode 100644 index 0000000000..36bd826d20 --- /dev/null +++ b/typings/react-relay.d.ts @@ -0,0 +1,481 @@ +// Type definitions for react-relay 1.0.0 +// Project: https://github.com/facebook/relay +// Definitions by: Johannes Schickling +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +declare module "react-relay" { + import * as modern from "react-relay/modern" + export = modern +} + +declare module "react-relay/compat" { + import * as modern from "react-relay/modern" + export = modern +} + +declare module "react-relay/modern" { + import * as React from "react" + + interface QueryRendererProps { + cacheConfig?: any + environment: Environment | ClassicEnvironment + query: GraphQLTaggedNode + render: (readyState: ReadyState) => (React.ReactElement) | null + variables: Variables + } + + interface ReadyState { + error: Error | null + props: object | null + retry: () => void | null + } + + class QueryRenderer extends React.Component {} + + export type GraphQLTaggedNode = (() => ConcreteFragment | ConcreteBatch) + export interface GeneratedNodeMap { + [key: string]: GraphQLTaggedNode + } + + function graphql(strings: TemplateStringsArray): GraphQLTaggedNode + + namespace graphql { + var experimental: typeof graphql + } + + function createFragmentContainer( + Component: React.ComponentClass | React.StatelessComponent, + fragmentSpec: GraphQLTaggedNode | GeneratedNodeMap + ): React.ComponentClass + + function createRefetchContainer( + Component: React.ComponentClass | React.StatelessComponent, + fragmentSpec: GraphQLTaggedNode | GeneratedNodeMap, + taggedNode: GraphQLTaggedNode + ): React.ComponentClass + + function createPaginationContainer( + ComponentClass: React.ComponentClass | React.StatelessComponent, + fragmentSpec: GraphQLTaggedNode | GeneratedNodeMap, + connectionConfig: ConnectionConfig + ): React.ComponentClass + + function commitMutation(environment: CompatEnvironment, config: MutationConfig): Disposable + + // RelayNetworkTypes.js + + export namespace RelayNetworkTypes { + export interface PayloadError { + message: string + locations?: Array<{ + line: number + column: number + }> + } + } + + // TODO put these in sections of the files they come from too + + export type DataID = string + export type RelayConcreteNode = Object + + export type RangeBehaviors = any // TODO add proper typing + + export type RelayMutationConfig = + | { + type: "FIELDS_CHANGE" + fieldIDs: { [fieldName: string]: DataID | DataID[] } + } + | { + type: "RANGE_ADD" + parentName?: string + parentID?: string + connectionInfo?: Array<{ + key: string + filters?: Variables + rangeBehavior: "append" | "prepend" | "ignore" + }> + connectionName?: string + edgeName: string + rangeBehaviors?: RangeBehaviors + } + | { + type: "NODE_DELETE" + parentName?: string + parentID?: string + connectionName?: string + deletedIDFieldName: string + } + | { + type: "RANGE_DELETE" + parentName?: string + parentID?: string + connectionKeys?: Array<{ + key: string + filters?: Variables + }> + connectionName?: string + deletedIDFieldName: string | string[] + pathToConnection: string[] + } + | { + type: "REQUIRED_CHILDREN" + children: RelayConcreteNode[] + } + + export type CompatEnvironment = Environment | RelayClassicEnvironment + export type Environment = any // Todo: add proper types + export type RelayClassicEnvironment = any // Todo: add proper types + export type ClassicEnvironment = any // Todo: add proper types + + export interface MutationConfig { + mutation: GraphQLTaggedNode + variables: Variables + onCompleted?: ((response: T, errors: RelayNetworkTypes.PayloadError[] | null) => void) | null + onError?: ((error: Error) => void) | null + // FIXME This appears to be incorrect, because Relay complains about it being a function. + // optimisticResponse?: (() => Object) | null + optimisticResponse?: Object | null + optimisticUpdater?: ((store: RecordSourceSelectorProxy) => void) | null + updater?: ((store: RecordSourceSelectorProxy, data: T) => void) | null + configs?: RelayMutationConfig[] + } + export type RecordSourceSelectorProxy = any // Todo: add proper types + + export interface ConnectionConfig { + direction?: "backward" | "forward" + getConnectionFromProps?: (props: any) => ConnectionData | null + getFragmentVariables?: FragmentVariablesGetter + getVariables: ( + props: any, + paginationInfo: { count: number; cursor: string | null }, + fragmentVariables: Variables + ) => Variables + query: GraphQLTaggedNode + } + + type PageInfo = string + + export interface ConnectionData { + edges?: any[] | null + pageInfo?: PageInfo | null + } + + type FragmentVariablesGetter = (prevVars: Variables, totalCount: number) => Variables + + export interface ConcreteFragment { + argumentDefinitions: ConcreteArgumentDefinition[] + kind: "Fragment" + metadata: { [key: string]: any } + name: string + selections: ConcreteSelection[] + type: string + } + + export interface ConcreteCondition { + kind: "Condition" + passingValue: boolean + condition: string + selections: ConcreteSelection[] + } + + export type ConcreteArgument = ConcreteLiteral | ConcreteVariable + + export interface ConcreteLiteral { + kind: "Literal" + name: string + type: string | null + value: any + } + + export interface ConcreteVariable { + kind: "Variable" + name: string + type: string | null + variableName: string + } + + export type ConcreteArgumentDefinition = ConcreteLocalArgument | ConcreteRootArgument + + export interface ConcreteRootArgument { + kind: "RootArgument" + name: string + type: string | null + } + + export interface ConcreteFragmentSpread { + args: ConcreteArgument[] + kind: "FragmentSpread" + name: string + } + + export type ConcreteField = ConcreteScalarField | ConcreteLinkedField + + export interface ConcreteScalarField { + alias: string | null + args: ConcreteArgument[] | null + kind: "ScalarField" + name: string + storageKey: string | null + } + + export interface ConcreteLinkedField { + alias: string | null + args: ConcreteArgument[] | null + concreteType: string | null + kind: "LinkedField" + name: string + plural: boolean + selections: ConcreteSelection[] + storageKey: string | null + } + + export type ConcreteHandle = ConcreteScalarHandle | ConcreteLinkedHandle + + export interface ConcreteScalarHandle { + alias: string + args: ConcreteArgument[] + kind: "ScalarHandle" + name: string + handle: string + key: string + filters: string[] + } + + export interface ConcreteLinkedHandle { + alias: string + args: ConcreteArgument[] + kind: "LinkedHandle" + name: string + handle: string + key: string + filters: string[] + } + + export interface ConcreteInlineFragment { + kind: "InlineFragment" + selections: ConcreteSelection[] + type: string + } + + export type ConcreteSelection = + | ConcreteCondition + | ConcreteField + | ConcreteFragmentSpread + | ConcreteHandle + | ConcreteInlineFragment + + export interface ConcreteLocalArgument { + defaultValue: any + kind: "LocalArgument" + name: string + type: string + } + + export interface ConcreteRoot { + argumentDefinitions: ConcreteLocalArgument[] + kind: "Root" + name: string + operation: "mutation" | "query" | "subscription" + selections: ConcreteSelection[] + } + + export interface ConcreteBatch { + kind: "Batch" + fragment: ConcreteFragment + id: string + metadata: { [key: string]: any } + name: string + query: ConcreteRoot + text: string + } + + export interface RefetchOptions { + force?: boolean + } + + export type Variables = any + export interface Disposable { + dispose: () => void + } + + interface RelayProp { + environment: Environment + } + + interface RelayRefetchProp extends RelayProp { + refetch: ( + refetchVariables: Variables | ((fragmentVariables: Variables) => Variables), + renderVariables: Variables | null, + // The example code has this optional but in the flow type it's not + callback?: ((error: Error | null) => void) | null, + options?: RefetchOptions + ) => Disposable + } + + interface RelayPaginationProp extends RelayProp { + hasMore: () => boolean + isLoading: () => boolean + loadMore: (pageSize: number, callback: (error: Error | null) => void, options?: RefetchOptions) => Disposable | null + refetchConnection: (totalCount: number, callback: (error: Error | null) => void) => Disposable | null + } +} + +declare module "react-relay/classic" { + import * as React from "react" + + type ClientMutationID = string + + /** Fragments are a hash of functions */ + interface Fragments { + [query: string]: ((variables?: RelayVariables) => string) + } + + interface CreateContainerOpts { + initialVariables?: any + fragments: Fragments + prepareVariables?(prevVariables: RelayVariables): RelayVariables + } + + interface RelayVariables { + [name: string]: any + } + + /** add static getFragment method to the component constructor */ + interface RelayContainerClass extends React.ComponentClass { + getFragment: ((q: string, v?: RelayVariables) => string) + } + + interface RelayQueryRequestResolve { + response: any + } + + type RelayMutationStatus = + | "UNCOMMITTED" // Transaction hasn't yet been sent to the server. Transaction can be committed or rolled back. + | "COMMIT_QUEUED" // Transaction was committed but another transaction with the same collision key is pending, so the transaction has been queued to send to the server. + | "COLLISION_COMMIT_FAILED" //Transaction was queued for commit but another transaction with the same collision key failed. All transactions in the collision queue, including this one, have been failed. Transaction can be recommitted or rolled back. + | "COMMITTING" // Transaction is waiting for the server to respond. + | "COMMIT_FAILED" + + class RelayMutationTransaction { + applyOptimistic(): RelayMutationTransaction + commit(): RelayMutationTransaction | null + recommit(): void + rollback(): void + getError(): Error + getStatus(): RelayMutationStatus + getHash(): string + getID(): ClientMutationID + } + + interface RelayMutationRequest { + getQueryString(): string + getVariables(): RelayVariables + resolve(result: RelayQueryRequestResolve): any + reject(errors: any): any + } + + interface RelayQueryRequest { + resolve(result: RelayQueryRequestResolve): any + reject(errors: any): any + + getQueryString(): string + getVariables(): RelayVariables + getID(): string + getDebugName(): string + } + + interface RelayNetworkLayer { + supports(...options: string[]): boolean + } + + class DefaultNetworkLayer implements RelayNetworkLayer { + constructor(host: string, options?: any) + supports(...options: string[]): boolean + } + + function createContainer( + component: React.ComponentClass | React.StatelessComponent, + params?: CreateContainerOpts + ): RelayContainerClass + function injectNetworkLayer(networkLayer: RelayNetworkLayer): any + function isContainer(component: React.ComponentClass): boolean + function QL(...args: any[]): string + + class Route { + constructor(params?: RelayVariables) + } + + /** + * Relay Mutation class, where T are the props it takes and S is the returned payload from Relay.Store.update. + * S is typically dynamic as it depends on the data the app is currently using, but it's possible to always + * return some data in the payload using REQUIRED_CHILDREN which is where specifying S is the most useful. + */ + class Mutation { + props: T + + constructor(props: T) + static getFragment(q: string): string + } + + interface Transaction { + getError(): Error + Status(): number + } + + interface StoreUpdateCallbacks { + onFailure?(transaction: Transaction): any + onSuccess?(response: T): any + } + + interface Store { + commitUpdate(mutation: Mutation, callbacks?: StoreUpdateCallbacks): any + } + + var Store: Store + + class RootContainer extends React.Component {} + + interface RootContainerProps extends React.Props { + Component: RelayContainerClass + route: Route + renderLoading?(): JSX.Element + renderFetched?(data: any): JSX.Element + renderFailure?(error: Error, retry: Function): JSX.Element + } + + type ReadyStateEvent = + | "ABORT" + | "CACHE_RESTORED_REQUIRED" + | "CACHE_RESTORE_FAILED" + | "CACHE_RESTORE_START" + | "NETWORK_QUERY_ERROR" + | "NETWORK_QUERY_RECEIVED_ALL" + | "NETWORK_QUERY_RECEIVED_REQUIRED" + | "NETWORK_QUERY_START" + | "STORE_FOUND_ALL" + | "STORE_FOUND_REQUIRED" + + type OnReadyStateChange = ( + readyState: { + ready: boolean + done: boolean + stale: boolean + error?: Error + events: ReadyStateEvent[] + aborted: boolean + } + ) => void + + export interface RelayProp { + readonly route: { name: string } // incomplete, also has params and queries + readonly variables: any + readonly pendingVariables?: any | null + setVariables(variables: any, onReadyStateChange?: OnReadyStateChange): void + forceFetch(variables: any, onReadyStateChange?: OnReadyStateChange): void + hasOptimisticUpdate(record: any): boolean + getPendingTransactions(record: any): RelayMutationTransaction[] + commitUpdate: (mutation: Mutation, callbacks?: StoreUpdateCallbacks) => any + } +} diff --git a/yarn.lock b/yarn.lock index da54bc2fc9..b3bfdb32d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,29 @@ # yarn lockfile v1 +"@playlyfe/gql@^2.3.2": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@playlyfe/gql/-/gql-2.3.2.tgz#ca3d5b1681fb5070c5e2a0201e044f096d295c19" + dependencies: + apollo-codegen "0.10.13" + babel-runtime "6.23.0" + dentist "1.0.3" + fb-watchman "2.0.0" + find-config "1.0.0" + flow-runtime "0.14.0" + graphql "0.9.6" + graphql-language-service-interface "0.0.11" + graphql-language-service-parser "0.0.10" + invariant "2.2.2" + json5 "0.5.1" + keymirror "0.1.1" + leven "2.1.0" + lodash "4.17.4" + minimatch "3.0.4" + node-ipc "9.0.1" + parse-glob "3.0.4" + promise-retry "1.1.1" + "@storybook/addon-actions@^3.2.0": version "3.2.0" resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-3.2.0.tgz#e5d7f63fec89cae1b98bbc124694153b7409317f" @@ -115,39 +138,23 @@ react-treebeard "^2.0.3" redux "^3.6.0" -"@types/jest@^19.2.2": - version "19.2.2" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-19.2.2.tgz#71f428be2fa6eb9f15bb0abc3cade67905f94839" +"@types/jest@^20.0.8": + version "20.0.8" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-20.0.8.tgz#7f8c97f73d20d3bf5448fbe33661a342002b5954" "@types/lodash@^4.14.64": version "4.14.64" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.64.tgz#979cf3a3d4a368670840bf9b3e448dc33ffe84ee" -"@types/qs@^6.5.0": - version "6.5.0" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.5.0.tgz#14514e8ee24a4d0672c0c0da5e01a4f11da60d71" - -"@types/react-native@^0.44.0": - version "0.44.4" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.44.4.tgz#91ff838293f87f5b27827164fc1efe5e528b6f5a" - dependencies: - "@types/react" "*" - -"@types/react-relay@^0.9.10": - version "0.9.12" - resolved "https://registry.yarnpkg.com/@types/react-relay/-/react-relay-0.9.12.tgz#a5fba413a2aae3536adbd5c873ac77269972a8bc" - dependencies: - "@types/react" "*" - -"@types/react-test-renderer@^15.5.0": - version "15.5.0" - resolved "https://registry.yarnpkg.com/@types/react-test-renderer/-/react-test-renderer-15.5.0.tgz#2ef6052c483616b36c38b688a95a7f5da06223c3" +"@types/react-native@^0.48.0": + version "0.48.0" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.48.0.tgz#08b34b4f34ea6aa6379f77851e1d32aca8aa0c00" dependencies: "@types/react" "*" -"@types/react@*": - version "15.0.18" - resolved "https://registry.yarnpkg.com/@types/react/-/react-15.0.18.tgz#258b1cda9d9aa875d68d317238c31eefdaa1a557" +"@types/react@*", "@types/react@^16.0.5": + version "16.0.5" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.5.tgz#d713cf67cc211dea20463d2a0b66005c22070c4b" JSONStream@^0.8.4: version "0.8.4" @@ -249,10 +256,14 @@ amdefine@>=0.0.4: version "1.0.0" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.0.tgz#fd17474700cb5cc9c2b709f0be9d23ce3c198c33" -ansi-escapes@^1.0.0, ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: +ansi-escapes@^1.0.0, ansi-escapes@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" +ansi-escapes@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" + ansi-html@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" @@ -261,10 +272,14 @@ ansi-regex@^0.2.0, ansi-regex@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-0.2.1.tgz#0d8e946967a3d8143f93e24e298525fc1b2235f9" -ansi-regex@^2.0.0, ansi-regex@^2.1.1: +ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + ansi-styles@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.1.0.tgz#eaecbf66cd706882760b2f4691582b8f55d7a7de" @@ -273,12 +288,18 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@^3.0.0, ansi-styles@^3.1.0: +ansi-styles@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.1.0.tgz#09c202d5c917ec23188caa5c9cb9179cd9547750" dependencies: color-convert "^1.0.0" +ansi-styles@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + dependencies: + color-convert "^1.9.0" + ansi@^0.3.0, ansi@~0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/ansi/-/ansi-0.3.1.tgz#0c42d4fb17160d5a9af1e484bace1c66922c1b21" @@ -290,6 +311,20 @@ anymatch@^1.3.0: arrify "^1.0.0" micromatch "^2.1.5" +apollo-codegen@0.10.13: + version "0.10.13" + resolved "https://registry.yarnpkg.com/apollo-codegen/-/apollo-codegen-0.10.13.tgz#337c5ac58c588d3cf6f38a50a7ec6cf824f2dc98" + dependencies: + babel-runtime "^6.20.0" + change-case "^3.0.0" + glob "^7.0.5" + graphql "^0.9.5" + inflected "^1.1.7" + mkdirp "^0.5.1" + node-fetch "^1.5.3" + source-map-support "^0.4.2" + yargs "^7.0.1" + app-root-path@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" @@ -332,10 +367,22 @@ arr-diff@^2.0.0: dependencies: arr-flatten "^1.0.1" +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + arr-flatten@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" +arr-flatten@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + array-differ@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" @@ -382,6 +429,10 @@ array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -420,7 +471,7 @@ assert@^1.1.1: dependencies: util "0.10.3" -async-each@^1.0.0: +async-each@^1.0.0, async-each@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" @@ -442,6 +493,14 @@ asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" +atob@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.0.3.tgz#19c7a760473774468f20b2d2d03372ad7d4cbf5d" + +atob@~1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/atob/-/atob-1.1.3.tgz#95f13629b12c3a51a5d215abdce2aa9f32f80773" + autogypi@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/autogypi/-/autogypi-0.2.2.tgz#258bab5f7857755b09beac6a641fea130ff4622d" @@ -548,7 +607,7 @@ babel-core@^6.24.1: slash "^1.0.0" source-map "^0.5.0" -babel-generator@^6.18.0, babel-generator@^6.25.0: +babel-generator@6.25.0, babel-generator@^6.18.0, babel-generator@^6.24.1, babel-generator@^6.25.0: version "6.25.0" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.25.0.tgz#33a1af70d5f2890aeb465a4a7793c1df6a9ea9fc" dependencies: @@ -561,19 +620,6 @@ babel-generator@^6.18.0, babel-generator@^6.25.0: source-map "^0.5.0" trim-right "^1.0.1" -babel-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.1.tgz#e715f486c58ded25649d888944d52aa07c5d9497" - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.2.0" - source-map "^0.5.0" - trim-right "^1.0.1" - babel-helper-bindify-decorators@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330" @@ -590,15 +636,6 @@ babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-helper-builder-react-jsx@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.23.0.tgz#d53fc8c996e0bc56d0de0fc4cc55a7138395ea4b" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.23.0" - esutils "^2.0.0" - lodash "^4.2.0" - babel-helper-builder-react-jsx@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.24.1.tgz#0ad7917e33c8d751e646daca4e77cc19377d2cbc" @@ -607,15 +644,6 @@ babel-helper-builder-react-jsx@^6.24.1: babel-types "^6.24.1" esutils "^2.0.0" -babel-helper-call-delegate@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.22.0.tgz#119921b56120f17e9dae3f74b4f5cc7bcc1b37ef" - dependencies: - babel-helper-hoist-variables "^6.22.0" - babel-runtime "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" - babel-helper-call-delegate@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" @@ -651,7 +679,7 @@ babel-helper-explode-class@^6.24.1: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-helper-function-name@^6.22.0, babel-helper-function-name@^6.24.1: +babel-helper-function-name@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" dependencies: @@ -661,14 +689,14 @@ babel-helper-function-name@^6.22.0, babel-helper-function-name@^6.24.1: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-helper-get-function-arity@^6.22.0, babel-helper-get-function-arity@^6.24.1: +babel-helper-get-function-arity@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-helper-hoist-variables@^6.22.0, babel-helper-hoist-variables@^6.24.1: +babel-helper-hoist-variables@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" dependencies: @@ -726,13 +754,12 @@ babel-jest@^18.0.0: babel-plugin-istanbul "^3.0.0" babel-preset-jest "^18.0.0" -babel-jest@^20.0.0, babel-jest@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-20.0.3.tgz#e4a03b13dc10389e140fc645d09ffc4ced301671" +babel-jest@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-21.0.0.tgz#4f636a7dce105aa5753d5f3dde4422ff50c1d6c5" dependencies: - babel-core "^6.0.0" babel-plugin-istanbul "^4.0.0" - babel-preset-jest "^20.0.3" + babel-preset-jest "^21.0.0" babel-loader@^7.0.0: version "7.0.0" @@ -769,21 +796,21 @@ babel-plugin-istanbul@^3.0.0: object-assign "^4.1.0" test-exclude "^3.3.0" -babel-plugin-istanbul@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.1.tgz#c12de0fc6fe42adfb16be56f1ad11e4a9782eca9" +babel-plugin-istanbul@^4.0.0, babel-plugin-istanbul@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587" dependencies: find-up "^2.1.0" - istanbul-lib-instrument "^1.6.2" - test-exclude "^4.0.3" + istanbul-lib-instrument "^1.7.2" + test-exclude "^4.1.1" babel-plugin-jest-hoist@^18.0.0: version "18.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-18.0.0.tgz#4150e70ecab560e6e7344adc849498072d34e12a" -babel-plugin-jest-hoist@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz#afedc853bd3f8dc3548ea671fbe69d03cc2c1767" +babel-plugin-jest-hoist@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.0.0.tgz#aa2dbab7b0d58fa635640efd53aab730be7b3273" babel-plugin-react-transform@2.0.2: version "2.0.2" @@ -791,6 +818,14 @@ babel-plugin-react-transform@2.0.2: dependencies: lodash "^4.6.1" +"babel-plugin-relay@https://github.com/alloy/relay/releases/download/v1.3.0-artsy/babel-plugin-relay-1.3.0-artsy.1.tgz": + version "1.3.0" + resolved "https://github.com/alloy/relay/releases/download/v1.3.0-artsy/babel-plugin-relay-1.3.0-artsy.1.tgz#39b21a10303e80177f43b0e4b7d733d5f2b0ab26" + dependencies: + babel-runtime "^6.23.0" + babel-types "^6.23.0" + graphql "^0.10.5" + babel-plugin-syntax-async-functions@^6.13.0, babel-plugin-syntax-async-functions@^6.5.0, babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" @@ -879,7 +914,7 @@ babel-plugin-transform-class-constructor-call@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-class-properties@^6.24.1, babel-plugin-transform-class-properties@^6.5.0, babel-plugin-transform-class-properties@^6.6.0, babel-plugin-transform-class-properties@^6.8.0: +babel-plugin-transform-class-properties@^6.18.0, babel-plugin-transform-class-properties@^6.24.1, babel-plugin-transform-class-properties@^6.5.0, babel-plugin-transform-class-properties@^6.6.0, babel-plugin-transform-class-properties@^6.8.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" dependencies: @@ -917,7 +952,7 @@ babel-plugin-transform-es2015-block-scoped-functions@^6.22.0, babel-plugin-trans dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-block-scoping@^6.24.1, babel-plugin-transform-es2015-block-scoping@^6.7.1: +babel-plugin-transform-es2015-block-scoping@^6.24.1, babel-plugin-transform-es2015-block-scoping@^6.5.0, babel-plugin-transform-es2015-block-scoping@^6.7.1, babel-plugin-transform-es2015-block-scoping@^6.8.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" dependencies: @@ -927,16 +962,6 @@ babel-plugin-transform-es2015-block-scoping@^6.24.1, babel-plugin-transform-es20 babel-types "^6.24.1" lodash "^4.2.0" -babel-plugin-transform-es2015-block-scoping@^6.5.0, babel-plugin-transform-es2015-block-scoping@^6.8.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.23.0.tgz#e48895cf0b375be148cd7c8879b422707a053b51" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.23.0" - babel-traverse "^6.23.0" - babel-types "^6.23.0" - lodash "^4.2.0" - babel-plugin-transform-es2015-classes@^6.24.1, babel-plugin-transform-es2015-classes@^6.5.0, babel-plugin-transform-es2015-classes@^6.6.5, babel-plugin-transform-es2015-classes@^6.8.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" @@ -951,20 +976,13 @@ babel-plugin-transform-es2015-classes@^6.24.1, babel-plugin-transform-es2015-cla babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-computed-properties@^6.24.1, babel-plugin-transform-es2015-computed-properties@^6.6.5: +babel-plugin-transform-es2015-computed-properties@^6.24.1, babel-plugin-transform-es2015-computed-properties@^6.5.0, babel-plugin-transform-es2015-computed-properties@^6.6.5, babel-plugin-transform-es2015-computed-properties@^6.8.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-computed-properties@^6.5.0, babel-plugin-transform-es2015-computed-properties@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.22.0.tgz#7c383e9629bba4820c11b0425bdd6290f7f057e7" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-plugin-transform-es2015-destructuring@6.x, babel-plugin-transform-es2015-destructuring@^6.22.0, babel-plugin-transform-es2015-destructuring@^6.5.0, babel-plugin-transform-es2015-destructuring@^6.6.5, babel-plugin-transform-es2015-destructuring@^6.8.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" @@ -984,15 +1002,7 @@ babel-plugin-transform-es2015-for-of@^6.22.0, babel-plugin-transform-es2015-for- dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-function-name@6.x, babel-plugin-transform-es2015-function-name@^6.5.0, babel-plugin-transform-es2015-function-name@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.22.0.tgz#f5fcc8b09093f9a23c76ac3d9e392c3ec4b77104" - dependencies: - babel-helper-function-name "^6.22.0" - babel-runtime "^6.22.0" - babel-types "^6.22.0" - -babel-plugin-transform-es2015-function-name@^6.24.1: +babel-plugin-transform-es2015-function-name@6.x, babel-plugin-transform-es2015-function-name@^6.24.1, babel-plugin-transform-es2015-function-name@^6.5.0, babel-plugin-transform-es2015-function-name@^6.8.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" dependencies: @@ -1046,18 +1056,7 @@ babel-plugin-transform-es2015-object-super@^6.24.1, babel-plugin-transform-es201 babel-helper-replace-supers "^6.24.1" babel-runtime "^6.22.0" -babel-plugin-transform-es2015-parameters@6.x, babel-plugin-transform-es2015-parameters@^6.5.0, babel-plugin-transform-es2015-parameters@^6.8.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.23.0.tgz#3a2aabb70c8af945d5ce386f1a4250625a83ae3b" - dependencies: - babel-helper-call-delegate "^6.22.0" - babel-helper-get-function-arity "^6.22.0" - babel-runtime "^6.22.0" - babel-template "^6.23.0" - babel-traverse "^6.23.0" - babel-types "^6.23.0" - -babel-plugin-transform-es2015-parameters@^6.24.1, babel-plugin-transform-es2015-parameters@^6.7.0: +babel-plugin-transform-es2015-parameters@6.x, babel-plugin-transform-es2015-parameters@^6.24.1, babel-plugin-transform-es2015-parameters@^6.5.0, babel-plugin-transform-es2015-parameters@^6.7.0, babel-plugin-transform-es2015-parameters@^6.8.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" dependencies: @@ -1068,14 +1067,7 @@ babel-plugin-transform-es2015-parameters@^6.24.1, babel-plugin-transform-es2015- babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-shorthand-properties@6.x, babel-plugin-transform-es2015-shorthand-properties@^6.5.0, babel-plugin-transform-es2015-shorthand-properties@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.22.0.tgz#8ba776e0affaa60bff21e921403b8a652a2ff723" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.22.0" - -babel-plugin-transform-es2015-shorthand-properties@^6.24.1: +babel-plugin-transform-es2015-shorthand-properties@6.x, babel-plugin-transform-es2015-shorthand-properties@^6.24.1, babel-plugin-transform-es2015-shorthand-properties@^6.5.0, babel-plugin-transform-es2015-shorthand-properties@^6.8.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" dependencies: @@ -1196,7 +1188,7 @@ babel-plugin-transform-react-jsx-source@^6.22.0, babel-plugin-transform-react-js babel-plugin-syntax-jsx "^6.8.0" babel-runtime "^6.22.0" -babel-plugin-transform-react-jsx@^6.24.1: +babel-plugin-transform-react-jsx@^6.24.1, babel-plugin-transform-react-jsx@^6.5.0, babel-plugin-transform-react-jsx@^6.8.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" dependencies: @@ -1204,14 +1196,6 @@ babel-plugin-transform-react-jsx@^6.24.1: babel-plugin-syntax-jsx "^6.8.0" babel-runtime "^6.22.0" -babel-plugin-transform-react-jsx@^6.5.0, babel-plugin-transform-react-jsx@^6.8.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.23.0.tgz#23e892f7f2e759678eb5e4446a8f8e94e81b3470" - dependencies: - babel-helper-builder-react-jsx "^6.23.0" - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" - babel-plugin-transform-regenerator@^6.24.1, babel-plugin-transform-regenerator@^6.5.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" @@ -1324,9 +1308,9 @@ babel-preset-fbjs@^1.0.0: babel-plugin-transform-object-rest-spread "^6.6.5" object-assign "^4.0.1" -babel-preset-fbjs@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-2.1.2.tgz#f52b2df56b1da883ffb7798b3b3be42c4c647a77" +babel-preset-fbjs@^2.1.0, babel-preset-fbjs@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-2.1.4.tgz#22f358e6654073acf61e47a052a777d7bccf03af" dependencies: babel-plugin-check-es2015-constants "^6.8.0" babel-plugin-syntax-class-properties "^6.8.0" @@ -1369,11 +1353,11 @@ babel-preset-jest@^18.0.0: dependencies: babel-plugin-jest-hoist "^18.0.0" -babel-preset-jest@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz#cbacaadecb5d689ca1e1de1360ebfc66862c178a" +babel-preset-jest@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-21.0.0.tgz#13a8d82e999aa49f8b2dc14d0023d362f2e4ba23" dependencies: - babel-plugin-jest-hoist "^20.0.3" + babel-plugin-jest-hoist "^21.0.0" babel-preset-react-native@^1.9.1: version "1.9.2" @@ -1409,6 +1393,40 @@ babel-preset-react-native@^1.9.1: babel-plugin-transform-regenerator "^6.5.0" react-transform-hmr "^1.0.4" +babel-preset-react-native@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/babel-preset-react-native/-/babel-preset-react-native-2.1.0.tgz#9013ebd82da1c88102bf588810ff59e209ca2b8a" + dependencies: + babel-plugin-check-es2015-constants "^6.5.0" + babel-plugin-react-transform "2.0.2" + babel-plugin-syntax-async-functions "^6.5.0" + babel-plugin-syntax-class-properties "^6.5.0" + babel-plugin-syntax-flow "^6.5.0" + babel-plugin-syntax-jsx "^6.5.0" + babel-plugin-syntax-trailing-function-commas "^6.5.0" + babel-plugin-transform-class-properties "^6.5.0" + babel-plugin-transform-es2015-arrow-functions "^6.5.0" + babel-plugin-transform-es2015-block-scoping "^6.5.0" + babel-plugin-transform-es2015-classes "^6.5.0" + babel-plugin-transform-es2015-computed-properties "^6.5.0" + babel-plugin-transform-es2015-destructuring "^6.5.0" + babel-plugin-transform-es2015-for-of "^6.5.0" + babel-plugin-transform-es2015-function-name "^6.5.0" + babel-plugin-transform-es2015-literals "^6.5.0" + babel-plugin-transform-es2015-modules-commonjs "^6.5.0" + babel-plugin-transform-es2015-parameters "^6.5.0" + babel-plugin-transform-es2015-shorthand-properties "^6.5.0" + babel-plugin-transform-es2015-spread "^6.5.0" + babel-plugin-transform-es2015-template-literals "^6.5.0" + babel-plugin-transform-flow-strip-types "^6.5.0" + babel-plugin-transform-object-assign "^6.5.0" + babel-plugin-transform-object-rest-spread "^6.5.0" + babel-plugin-transform-react-display-name "^6.5.0" + babel-plugin-transform-react-jsx "^6.5.0" + babel-plugin-transform-react-jsx-source "^6.5.0" + babel-plugin-transform-regenerator "^6.5.0" + react-transform-hmr "^1.0.4" + babel-preset-react@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" @@ -1467,20 +1485,14 @@ babel-register@^6.24.1: mkdirp "^0.5.1" source-map-support "^0.4.2" -"babel-relay-plugin@https://github.com/alloy/relay/releases/download/v0.9.3/babel-relay-plugin-0.9.3.tgz": - version "0.9.3" - resolved "https://github.com/alloy/relay/releases/download/v0.9.3/babel-relay-plugin-0.9.3.tgz#65054ab034af4b4489104e2eaeb886661b3f127a" - dependencies: - graphql "^0.6.0" - -babel-runtime@6.x.x, babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.5.0, babel-runtime@^6.6.1: +babel-runtime@6.23.0, babel-runtime@6.x.x, babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.20.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.5.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" dependencies: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.23.0, babel-template@^6.25.0: +babel-template@^6.16.0, babel-template@^6.25.0: version "6.25.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.25.0.tgz#665241166b7c2aa4c619d71e192969552b10c071" dependencies: @@ -1500,21 +1512,7 @@ babel-template@^6.24.1: babylon "^6.11.0" lodash "^4.2.0" -babel-traverse@^6.16.0, babel-traverse@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.24.1.tgz#ab36673fd356f9a0948659e7b338d5feadb31695" - dependencies: - babel-code-frame "^6.22.0" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - babylon "^6.15.0" - debug "^2.2.0" - globals "^9.0.0" - invariant "^2.2.0" - lodash "^4.2.0" - -babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-traverse@^6.25.0: +babel-traverse@6.25.0, babel-traverse@^6.16.0, babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.25.0: version "6.25.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.25.0.tgz#2257497e2fcd19b89edc13c4c91381f9512496f1" dependencies: @@ -1528,7 +1526,7 @@ babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-tr invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23.0, babel-types@^6.25.0: +babel-types@6.25.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.25.0: version "6.25.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.25.0.tgz#70afb248d5660e5d18f811d91c8303b54134a18e" dependencies: @@ -1537,22 +1535,9 @@ babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23 lodash "^4.2.0" to-fast-properties "^1.0.1" -babel-types@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975" - dependencies: - babel-runtime "^6.22.0" - esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^1.0.1" - -babylon@^6.11.0, babylon@^6.12.0, babylon@^6.15.0, babylon@^6.17.0: - version "6.17.1" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.1.tgz#17f14fddf361b695981fe679385e4f1c01ebd86f" - -babylon@^6.13.0, babylon@^6.17.2: - version "6.17.4" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.4.tgz#3e8b7402b88d22c3423e137a1577883b15ff869a" +babylon@6.18.0, babylon@^6.11.0, babylon@^6.12.0, babylon@^6.13.0, babylon@^6.17.0, babylon@^6.17.2, babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" balanced-match@^0.4.0, balanced-match@^0.4.1, balanced-match@^0.4.2: version "0.4.2" @@ -1574,6 +1559,31 @@ base64-url@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/base64-url/-/base64-url-1.2.1.tgz#199fd661702a0e7b7dcae6e0698bb089c52f6d78" +base@^0.11.1: + version "0.11.1" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.1.tgz#b36a7f11113853a342a15691d98e2dcc8a6cc270" + dependencies: + arr-union "^3.1.0" + cache-base "^0.8.4" + class-utils "^0.3.4" + component-emitter "^1.2.1" + define-property "^0.2.5" + isobject "^2.1.0" + lazy-cache "^2.0.1" + mixin-deep "^1.1.3" + pascalcase "^0.1.1" + +bash-glob@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bash-glob/-/bash-glob-1.0.1.tgz#d1bce5d2fd6875a5a2b24bdaa707c190731bc26e" + dependencies: + async-each "^1.0.1" + component-emitter "^1.2.1" + cross-spawn "^5.1.0" + extend-shallow "^2.0.1" + is-extglob "^2.1.1" + is-glob "^3.1.0" + basic-auth-connect@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/basic-auth-connect/-/basic-auth-connect-1.0.0.tgz#fdb0b43962ca7b40456a7c2bb48fe173da2d2122" @@ -1663,13 +1673,6 @@ bplist-parser@0.1.1: dependencies: big-integer "^1.6.7" -brace-expansion@^1.0.0: - version "1.1.6" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" - dependencies: - balanced-match "^0.4.1" - concat-map "0.0.1" - brace-expansion@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" @@ -1685,6 +1688,22 @@ braces@^1.8.2: preserve "^0.2.0" repeat-element "^1.1.2" +braces@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.2.2.tgz#241f868c2b2690d9febeee5a7c83fbbf25d00b1b" + dependencies: + arr-flatten "^1.0.3" + array-unique "^0.3.2" + define-property "^1.0.0" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.0" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^2.1.0" + to-regex "^3.0.1" + brorand@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" @@ -1811,10 +1830,36 @@ bytes@2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339" +cache-base@^0.8.4: + version "0.8.5" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-0.8.5.tgz#60ceb3504021eceec7011fd3384b7f4e95729bfa" + dependencies: + collection-visit "^0.2.1" + component-emitter "^1.2.1" + get-value "^2.0.5" + has-value "^0.3.1" + isobject "^3.0.0" + lazy-cache "^2.0.1" + set-value "^0.4.2" + to-object-path "^0.3.0" + union-value "^0.2.3" + unset-value "^0.1.1" + +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" +camel-case@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + camelcase-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" @@ -1894,7 +1939,7 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0: +chalk@^2.0.0, chalk@^2.0.1: version "2.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" dependencies: @@ -1902,13 +1947,28 @@ chalk@^2.0.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" -chalk@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.0.1.tgz#dbec49436d2ae15f536114e76d14656cdbc0f44d" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" +change-case@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.1.tgz#ee5f5ad0415ad1ad9e8072cf49cd4cfa7660a554" + dependencies: + camel-case "^3.0.0" + constant-case "^2.0.0" + dot-case "^2.1.0" + header-case "^1.0.0" + is-lower-case "^1.1.0" + is-upper-case "^1.1.0" + lower-case "^1.1.1" + lower-case-first "^1.0.0" + no-case "^2.2.0" + param-case "^2.1.0" + pascal-case "^2.0.0" + path-case "^2.1.0" + sentence-case "^2.1.0" + snake-case "^2.1.0" + swap-case "^1.1.0" + title-case "^2.1.0" + upper-case "^1.1.1" + upper-case-first "^1.1.0" chokidar@^1.7.0: version "1.7.0" @@ -1945,11 +2005,21 @@ clap@^1.0.9: dependencies: chalk "^1.1.3" +class-utils@^0.3.4: + version "0.3.5" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.5.tgz#17e793103750f9627b2176ea34cfd1b565903c80" + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + lazy-cache "^2.0.2" + static-extend "^0.1.1" + classnames@^2.2.5: version "2.2.5" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d" -cli-cursor@^1.0.1, cli-cursor@^1.0.2: +cli-cursor@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" dependencies: @@ -2021,7 +2091,15 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -color-convert@^1.0.0, color-convert@^1.3.0: +collection-visit@^0.2.1: + version "0.2.3" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-0.2.3.tgz#2f62483caecc95f083b9a454a3ee9e6139ad7957" + dependencies: + lazy-cache "^2.0.1" + map-visit "^0.1.5" + object-visit "^0.3.4" + +color-convert@^1.0.0, color-convert@^1.3.0, color-convert@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" dependencies: @@ -2104,6 +2182,10 @@ commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" +component-emitter@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + compressible@~2.0.5: version "2.0.9" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.9.tgz#6daab4e2b599c2770dd9e21e7a891b1c5a755425" @@ -2200,6 +2282,13 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" +constant-case@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" + dependencies: + snake-case "^2.1.0" + upper-case "^1.1.1" + constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" @@ -2239,6 +2328,10 @@ cookie@0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" @@ -2335,7 +2428,7 @@ cross-spawn@^4.0.0: lru-cache "^4.0.1" which "^1.2.9" -cross-spawn@^5.0.1: +cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" dependencies: @@ -2441,6 +2534,15 @@ css-tokenize@^1.0.1: inherits "^2.0.1" readable-stream "^1.0.33" +css@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/css/-/css-2.2.1.tgz#73a4c81de85db664d4ee674f7d47085e3b2d55dc" + dependencies: + inherits "^2.0.1" + source-map "^0.1.38" + source-map-resolve "^0.3.0" + urix "^0.1.0" + cssesc@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" @@ -2564,7 +2666,7 @@ dateformat@^1.0.11: get-stdin "^4.0.1" meow "^3.3.0" -debug@2, debug@2.6.7, debug@^2.1.1, debug@^2.2.0, debug@^2.6.0, debug@^2.6.3: +debug@2, debug@2.6.7, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.3: version "2.6.7" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.7.tgz#92bad1f6d05bbb6bba22cca88bcd0ec894c2861e" dependencies: @@ -2610,6 +2712,18 @@ default-require-extensions@^1.0.0: dependencies: strip-bom "^2.0.0" +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + dependencies: + is-descriptor "^1.0.0" + defined@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" @@ -2638,6 +2752,10 @@ denodeify@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz#3a36287f5034e699e7577901052c2e6c94251631" +dentist@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/dentist/-/dentist-1.0.3.tgz#ef194a9753420a150c2423c7cb64cf9887d721b4" + depd@1.1.0, depd@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" @@ -2704,6 +2822,12 @@ domain-browser@^1.1.1: version "1.1.7" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" +dot-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.1.tgz#34dcf37f50a8e93c2b3bca8bb7fb9155c7da3bee" + dependencies: + no-case "^2.2.0" + dot@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/dot/-/dot-1.1.2.tgz#c7377019fc4e550798928b2b9afeb66abfa1f2f9" @@ -2718,6 +2842,10 @@ duplexer@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" +easy-stack@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/easy-stack/-/easy-stack-1.0.0.tgz#12c91b3085a37f0baa336e9486eac4bf94e3e788" + ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" @@ -2788,6 +2916,18 @@ enhanced-resolve@^3.4.0: object-assign "^4.0.1" tapable "^0.2.7" +envinfo@^3.0.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-3.4.1.tgz#8c80e9f2eec2cd4e2adb2c5d0127ce07a2aaa2ae" + dependencies: + minimist "^1.2.0" + os-name "^2.0.1" + which "^1.2.14" + +err-code@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" + "errno@>=0.1.1 <0.2.0-0", errno@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" @@ -2833,6 +2973,10 @@ es6-map@^0.1.3: es6-symbol "~3.1.1" event-emitter "~0.3.5" +es6-promise@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a" + es6-set@~0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" @@ -2937,6 +3081,10 @@ event-emitter@~0.3.5: d "1" es5-ext "~0.10.14" +event-pubsub@4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/event-pubsub/-/event-pubsub-4.2.4.tgz#634fb697fe4014dc5004722d859432baa2123257" + event-target-shim@^1.0.5: version "1.1.1" resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-1.1.1.tgz#a86e5ee6bdaa16054475da797ccddf0c55698491" @@ -3005,12 +3153,35 @@ expand-brackets@^0.1.4: dependencies: is-posix-bracket "^0.1.0" +expand-brackets@^2.0.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + expand-range@^1.8.1: version "1.8.2" resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" dependencies: fill-range "^2.1.0" +expect@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-21.0.0.tgz#55fbb07e989479863663975ae8e9ec51753c99ca" + dependencies: + ansi-styles "^3.2.0" + jest-diff "^21.0.0" + jest-get-type "^21.0.0" + jest-matcher-utils "^21.0.0" + jest-message-util "^21.0.0" + jest-regex-util "^21.0.0" + express-session@~1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/express-session/-/express-session-1.11.3.tgz#5cc98f3f5ff84ed835f91cbf0aabd0c7107400af" @@ -3058,14 +3229,22 @@ express@^4.15.3: utils-merge "1.0.0" vary "~1.1.1" +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + dependencies: + is-extendable "^0.1.0" + extend@3, extend@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" -external-editor@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.1.tgz#4c597c6c88fa6410e41dbbaa7b1be2336aa31095" +external-editor@^2.0.1, external-editor@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972" dependencies: + iconv-lite "^0.4.17" + jschardet "^1.4.2" tmp "^0.0.31" extglob@^0.3.1: @@ -3074,6 +3253,19 @@ extglob@^0.3.1: dependencies: is-extglob "^1.0.0" +extglob@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-1.1.0.tgz#0678b4e2ce45c0e4e50f5e5eafb1b0dab5b4e424" + dependencies: + array-unique "^0.3.2" + define-property "^0.2.5" + expand-brackets "^2.0.1" + extend-shallow "^2.0.1" + fragment-cache "^0.2.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^2.1.0" + extsprintf@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" @@ -3089,6 +3281,15 @@ fast-deep-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" +fast-glob@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-1.0.1.tgz#30f9b1120fd57a7f172364a6458fbdbd98187b3c" + dependencies: + bash-glob "^1.0.1" + glob-parent "^3.1.0" + micromatch "^3.0.3" + readdir-enhanced "^1.5.2" + fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" @@ -3097,18 +3298,18 @@ fastparse@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" +fb-watchman@2.0.0, fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + dependencies: + bser "^2.0.0" + fb-watchman@^1.8.0: version "1.9.2" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" dependencies: bser "1.0.2" -fb-watchman@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" - dependencies: - bser "^2.0.0" - fbjs-scripts@^0.7.0: version "0.7.1" resolved "https://registry.yarnpkg.com/fbjs-scripts/-/fbjs-scripts-0.7.1.tgz#4f115e218e243e3addbf0eddaac1e3c62f703fac" @@ -3122,7 +3323,7 @@ fbjs-scripts@^0.7.0: semver "^5.1.0" through2 "^2.0.0" -fbjs@0.8.12, fbjs@^0.8.1, fbjs@^0.8.5, fbjs@^0.8.9: +fbjs@0.8.12: version "0.8.12" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04" dependencies: @@ -3134,7 +3335,19 @@ fbjs@0.8.12, fbjs@^0.8.1, fbjs@^0.8.5, fbjs@^0.8.9: setimmediate "^1.0.5" ua-parser-js "^0.7.9" -figures@^1.3.5, figures@^1.7.0: +fbjs@^0.8.1, fbjs@^0.8.5, fbjs@^0.8.9: + version "0.8.14" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.14.tgz#d1dbe2be254c35a91e09f31f9cd50a40b2a0ed1c" + dependencies: + core-js "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.9" + +figures@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" dependencies: @@ -3181,6 +3394,15 @@ fill-range@^2.1.0: repeat-element "^1.1.2" repeat-string "^1.5.2" +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + finalhandler@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-0.4.0.tgz#965a52d9e8d05d2b857548541fb89b53a2497d9b" @@ -3218,6 +3440,12 @@ find-cache-dir@^1.0.0: make-dir "^1.0.0" pkg-dir "^2.0.0" +find-config@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-config/-/find-config-1.0.0.tgz#eafa2b9bc07fa9c90e9a0c3ef9cecf1cc800f530" + dependencies: + user-home "^2.0.0" + find-up@^1.0.0, find-up@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -3251,6 +3479,10 @@ flatten@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" +flow-runtime@0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/flow-runtime/-/flow-runtime-0.14.0.tgz#bbbcb700b19a0a299ab403e807d69912ef077c16" + follow-redirects@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-0.0.7.tgz#34b90bab2a911aa347571da90f22bd36ecd8a919" @@ -3258,7 +3490,7 @@ follow-redirects@0.0.7: debug "^2.2.0" stream-consume "^0.1.0" -for-in@^1.0.1: +for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -3284,6 +3516,12 @@ forwarded@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.0.tgz#19ef9874c4ae1c297bcf078fde63a09b66a84363" +fragment-cache@^0.2.0, fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + dependencies: + map-cache "^0.2.2" + fresh@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.3.0.tgz#651f838e22424e7566de161d8358caa199f83d4f" @@ -3300,9 +3538,9 @@ fs-extra@^1.0.0: jsonfile "^2.1.0" klaw "^1.0.0" -fs-extra@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" +fs-extra@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.1.tgz#7fc0c6c8957f983f57f306a24e5b9ddd8d0dd880" dependencies: graceful-fs "^4.1.2" jsonfile "^3.0.0" @@ -3312,12 +3550,12 @@ fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -fsevents@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.1.tgz#f19fd28f43eeaf761680e519a203c4d0b3d31aff" +fsevents@^1.0.0, fsevents@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" dependencies: nan "^2.3.0" - node-pre-gyp "^0.6.29" + node-pre-gyp "^0.6.36" fstream-ignore@^1.0.5: version "1.0.5" @@ -3398,6 +3636,10 @@ get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" +get-value@^2.0.3, get-value@^2.0.5, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + getpass@^0.1.1: version "0.1.6" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" @@ -3413,13 +3655,6 @@ github@^10.0.0: mime "^1.2.11" netrc "^0.1.4" -glob-all@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-all/-/glob-all-3.1.0.tgz#8913ddfb5ee1ac7812656241b03d5217c64b02ab" - dependencies: - glob "^7.0.5" - yargs "~1.2.6" - glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" @@ -3433,7 +3668,18 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@7.1.1, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-to-regexp@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + +glob@7.1.1, glob@^7.0.0, glob@^7.0.5, glob@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" dependencies: @@ -3444,6 +3690,17 @@ glob@7.1.1, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.0.3, glob@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global@^4.3.0, global@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" @@ -3502,17 +3759,52 @@ graphql-config-parser@^1.2.1: node-fetch "^1.6.3" valid-url "^1.0.9" -"graphql@0.7.1 - 1.0.0", "graphql@0.8.2 - 1.0.0": - version "0.9.1" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.9.1.tgz#f4d154cbec054d4a5d3b1be95f23435c09aa86c8" +graphql-language-service-config@0.0.11: + version "0.0.11" + resolved "https://registry.yarnpkg.com/graphql-language-service-config/-/graphql-language-service-config-0.0.11.tgz#edf593ee7d0b6d8f9cbc8fe5d958b8607c75cea4" dependencies: - iterall "1.0.3" + graphql-language-service-types "0.0.16" -graphql@^0.6.0: - version "0.6.2" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.6.2.tgz#19cdcb17e5862d64396a0684f92f7be64e90e7af" +graphql-language-service-interface@0.0.11: + version "0.0.11" + resolved "https://registry.yarnpkg.com/graphql-language-service-interface/-/graphql-language-service-interface-0.0.11.tgz#d84d9b5c6044049187e5fb351cfe1ebdcdf04520" + dependencies: + graphql "^0.9.6" + graphql-language-service-config "0.0.11" + graphql-language-service-parser "0.0.10" + graphql-language-service-types "0.0.16" + graphql-language-service-utils "0.0.10" + +graphql-language-service-parser@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/graphql-language-service-parser/-/graphql-language-service-parser-0.0.10.tgz#ed74f77ba0f135d06d7e767874f872c3f12cc71f" + dependencies: + graphql-language-service-types "0.0.16" + +graphql-language-service-types@0.0.16: + version "0.0.16" + resolved "https://registry.yarnpkg.com/graphql-language-service-types/-/graphql-language-service-types-0.0.16.tgz#8bf9061873cd7e9c6923d51536f418b966a91a85" + dependencies: + graphql "^0.9.6" + +graphql-language-service-utils@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/graphql-language-service-utils/-/graphql-language-service-utils-0.0.10.tgz#9cc1df69f8e4382088e790da96e45b07fda9a5f9" + dependencies: + graphql "^0.9.6" + graphql-language-service-types "0.0.16" + +"graphql@0.7.1 - 1.0.0", "graphql@0.8.2 - 1.0.0", graphql@^0.10.5: + version "0.10.5" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.10.5.tgz#c9be17ca2bdfdbd134077ffd9bbaa48b8becd298" + dependencies: + iterall "^1.1.0" + +graphql@0.9.6, graphql@^0.9.5, graphql@^0.9.6: + version "0.9.6" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.9.6.tgz#514421e9d225c29dfc8fd305459abae58815ef2c" dependencies: - iterall "1.0.2" + iterall "^1.0.0" growly@^1.3.0: version "1.3.0" @@ -3598,6 +3890,18 @@ has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + has@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" @@ -3625,6 +3929,13 @@ hawk@~3.1.3: hoek "2.x.x" sntp "1.x.x" +header-case@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.1.tgz#9535973197c144b09613cd65d317ef19963bd02d" + dependencies: + no-case "^2.2.0" + upper-case "^1.1.3" + hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -3718,9 +4029,9 @@ iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" -iconv-lite@~0.4.13: - version "0.4.15" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" +iconv-lite@^0.4.17, iconv-lite@~0.4.13: + version "0.4.18" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" icss-replace-symbols@^1.1.0: version "1.1.0" @@ -3740,9 +4051,9 @@ ignore@^3.2.0: version "3.3.3" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" -image-size@^0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.3.5.tgz#83240eab2fb5b00b04aab8c74b0471e9cba7ad8c" +image-size@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.6.1.tgz#98122a562d59dcc097ef1b2c8191866eb8f5d663" immutable@^3.8.1: version "3.8.1" @@ -3770,6 +4081,10 @@ indexof@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" +inflected@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/inflected/-/inflected-1.1.7.tgz#c393df6e28472d0d77b3082ec3aa2091f4bc96f9" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -3821,29 +4136,30 @@ inquirer@3.0.6: strip-ansi "^3.0.0" through "^2.3.6" -inquirer@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" +inquirer@^3.0.6: + version "3.2.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.3.tgz#1c7b1731cf77b934ec47d22c9ac5aa8fe7fbe095" dependencies: - ansi-escapes "^1.1.0" - ansi-regex "^2.0.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" + ansi-escapes "^2.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" cli-width "^2.0.0" - figures "^1.3.5" + external-editor "^2.0.4" + figures "^2.0.0" lodash "^4.3.0" - readline2 "^1.0.1" - run-async "^0.1.0" - rx-lite "^3.1.2" - string-width "^1.0.1" - strip-ansi "^3.0.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" through "^2.3.6" interpret@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" -invariant@2.x.x, invariant@^2.2.0: +invariant@2.2.2, invariant@2.x.x, invariant@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" dependencies: @@ -3865,6 +4181,12 @@ is-absolute-url@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + dependencies: + kind-of "^3.0.2" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -3875,7 +4197,7 @@ is-binary-path@^1.0.0: dependencies: binary-extensions "^1.0.0" -is-buffer@^1.0.2: +is-buffer@^1.0.2, is-buffer@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" @@ -3891,6 +4213,28 @@ is-ci@^1.0.10: dependencies: ci-info "^1.0.0" +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + dependencies: + kind-of "^3.0.2" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.1.tgz#2c6023599bde2de9d5d2c8b9a9d94082036b6ef2" + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + is-directory@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" @@ -3909,7 +4253,7 @@ is-equal-shallow@^0.1.3: dependencies: is-primitive "^2.0.0" -is-extendable@^0.1.1: +is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -3917,6 +4261,10 @@ is-extglob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + is-finite@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" @@ -3943,12 +4291,36 @@ is-glob@^2.0.0, is-glob@^2.0.1: dependencies: is-extglob "^1.0.0" +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + dependencies: + is-extglob "^2.1.0" + +is-lower-case@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393" + dependencies: + lower-case "^1.1.0" + is-number@^2.0.2, is-number@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" dependencies: kind-of "^3.0.2" +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-odd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-1.0.0.tgz#3b8a932eb028b3775c39bb09e91767accdb69088" + dependencies: + is-number "^3.0.0" + is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" @@ -4009,6 +4381,12 @@ is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" +is-upper-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" + dependencies: + upper-case "^1.1.0" + is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" @@ -4021,10 +4399,6 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" -isemail@1.x.x: - version "1.2.0" - resolved "https://registry.yarnpkg.com/isemail/-/isemail-1.2.0.tgz#be03df8cc3e29de4d2c5df6501263f1fa4595e9a" - isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -4033,12 +4407,16 @@ isobject@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/isobject/-/isobject-1.0.2.tgz#f0f9b8ce92dd540fa0740882e3835a2e022ec78a" -isobject@^2.0.0: +isobject@^2.0.0, isobject@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" dependencies: isarray "1.0.0" +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + isomorphic-fetch@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" @@ -4070,13 +4448,17 @@ istanbul-lib-coverage@^1.0.0, istanbul-lib-coverage@^1.0.0-alpha.0, istanbul-lib version "1.1.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.0.tgz#caca19decaef3525b5d6331d701f3f3b7ad48528" +istanbul-lib-coverage@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" + istanbul-lib-hook@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.6.tgz#c0866d1e81cf2d5319249510131fc16dee49231f" dependencies: append-transform "^0.4.0" -istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.6.2: +istanbul-lib-instrument@^1.4.2: version "1.6.2" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.6.2.tgz#dac644f358f51efd6113536d7070959a0111f73b" dependencies: @@ -4088,16 +4470,16 @@ istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.6.2: istanbul-lib-coverage "^1.0.0" semver "^5.3.0" -istanbul-lib-instrument@^1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.1.tgz#169e31bc62c778851a99439dd99c3cc12184d360" +istanbul-lib-instrument@^1.7.1, istanbul-lib-instrument@^1.7.2: + version "1.8.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.8.0.tgz#66f6c9421cc9ec4704f76f2db084ba9078a2b532" dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" babel-traverse "^6.18.0" babel-types "^6.18.0" - babylon "^6.13.0" - istanbul-lib-coverage "^1.1.0" + babylon "^6.18.0" + istanbul-lib-coverage "^1.1.1" semver "^5.3.0" istanbul-lib-report@^1.1.0: @@ -4134,258 +4516,282 @@ istanbul-reports@^1.1.0: dependencies: handlebars "^4.0.3" -iterall@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.0.2.tgz#41a2e96ce9eda5e61c767ee5dc312373bb046e91" - -iterall@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.0.3.tgz#e0b31958f835013c323ff0b10943829ac69aa4b7" +iterall@^1.0.0, iterall@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.1.1.tgz#f7f0af11e9a04ec6426260f5019d9fcca4d50214" -jest-changed-files@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" +jest-changed-files@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-21.0.0.tgz#fa7cfc353187e2fb852dd5830e8d09068dde78d1" + dependencies: + throat "^4.0.0" -jest-cli@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-20.0.4.tgz#e532b19d88ae5bc6c417e8b0593a6fe954b1dc93" +jest-cli@^21.0.1: + version "21.0.1" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-21.0.1.tgz#b3e9ef6d0ae0e43870932d2ed3d10de0515e9d34" dependencies: - ansi-escapes "^1.4.0" - callsites "^2.0.0" - chalk "^1.1.3" + ansi-escapes "^2.0.0" + chalk "^2.0.1" + glob "^7.1.2" graceful-fs "^4.1.11" is-ci "^1.0.10" istanbul-api "^1.1.1" istanbul-lib-coverage "^1.0.1" istanbul-lib-instrument "^1.4.2" istanbul-lib-source-maps "^1.1.0" - jest-changed-files "^20.0.3" - jest-config "^20.0.4" - jest-docblock "^20.0.3" - jest-environment-jsdom "^20.0.3" - jest-haste-map "^20.0.4" - jest-jasmine2 "^20.0.4" - jest-message-util "^20.0.3" - jest-regex-util "^20.0.3" - jest-resolve-dependencies "^20.0.3" - jest-runtime "^20.0.4" - jest-snapshot "^20.0.3" - jest-util "^20.0.3" + jest-changed-files "^21.0.0" + jest-config "^21.0.0" + jest-environment-jsdom "^21.0.0" + jest-haste-map "^21.0.0" + jest-message-util "^21.0.0" + jest-regex-util "^21.0.0" + jest-resolve-dependencies "^21.0.0" + jest-runner "^21.0.0" + jest-runtime "^21.0.0" + jest-snapshot "^21.0.0" + jest-util "^21.0.0" micromatch "^2.3.11" node-notifier "^5.0.2" pify "^2.3.0" slash "^1.0.0" string-length "^1.0.1" - throat "^3.0.0" + strip-ansi "^4.0.0" which "^1.2.12" worker-farm "^1.3.1" yargs "^7.0.2" -jest-config@^20.0.0: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.3.tgz#a934f27eea764915801cdda26f6f8eec2ac79266" +jest-config@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-21.0.0.tgz#81dcb20d15971f31bf44a82c6fe85b4423d98d95" dependencies: - chalk "^1.1.3" - glob "^7.1.1" - jest-environment-jsdom "^20.0.3" - jest-environment-node "^20.0.3" - jest-jasmine2 "^20.0.3" - jest-matcher-utils "^20.0.3" - jest-regex-util "^20.0.3" - jest-resolve "^20.0.3" - jest-validate "^20.0.3" - pretty-format "^20.0.3" - -jest-config@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.4.tgz#e37930ab2217c913605eff13e7bd763ec48faeea" - dependencies: - chalk "^1.1.3" + chalk "^2.0.1" glob "^7.1.1" - jest-environment-jsdom "^20.0.3" - jest-environment-node "^20.0.3" - jest-jasmine2 "^20.0.4" - jest-matcher-utils "^20.0.3" - jest-regex-util "^20.0.3" - jest-resolve "^20.0.4" - jest-validate "^20.0.3" - pretty-format "^20.0.3" - -jest-diff@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-20.0.3.tgz#81f288fd9e675f0fb23c75f1c2b19445fe586617" + jest-environment-jsdom "^21.0.0" + jest-environment-node "^21.0.0" + jest-get-type "^21.0.0" + jest-jasmine2 "^21.0.0" + jest-regex-util "^21.0.0" + jest-resolve "^21.0.0" + jest-util "^21.0.0" + jest-validate "^21.0.0" + pretty-format "^21.0.0" + +jest-diff@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-21.0.0.tgz#b996ba2963a783125e6bc59fd5623bce67df7f17" dependencies: - chalk "^1.1.3" + chalk "^2.0.1" diff "^3.2.0" - jest-matcher-utils "^20.0.3" - pretty-format "^20.0.3" + jest-get-type "^21.0.0" + pretty-format "^21.0.0" + +jest-docblock@20.1.0-chi.1: + version "20.1.0-chi.1" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.1.0-chi.1.tgz#06981ab0e59498a2492333b0c5502a82e4603207" -jest-docblock@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712" +jest-docblock@20.1.0-delta.4, jest-docblock@^20.1.0-chi.1: + version "20.1.0-delta.4" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.1.0-delta.4.tgz#360d4f5fb702730c4136c4e71e5706188a694682" -jest-environment-jsdom@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz#048a8ac12ee225f7190417713834bb999787de99" +jest-docblock@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.0.0.tgz#7dd57568543aec98910f749540afc15fab53a27f" + +jest-environment-jsdom@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-21.0.0.tgz#1d53e34b1656254b8c539700e35360d8f8ebb579" dependencies: - jest-mock "^20.0.3" - jest-util "^20.0.3" + jest-mock "^21.0.0" + jest-util "^21.0.0" jsdom "^9.12.0" -jest-environment-node@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-20.0.3.tgz#d488bc4612af2c246e986e8ae7671a099163d403" +jest-environment-node@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-21.0.0.tgz#ffc781b82569f3f4bc2d8fb8f1ea7373cb11f043" dependencies: - jest-mock "^20.0.3" - jest-util "^20.0.3" + jest-mock "^21.0.0" + jest-util "^21.0.0" + +jest-get-type@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.0.0.tgz#ed8667533c0a24a4feebbf492661f23abac3620b" -jest-haste-map@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.4.tgz#653eb55c889ce3c021f7b94693f20a4159badf03" +jest-haste-map@20.1.0-chi.1: + version "20.1.0-chi.1" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.1.0-chi.1.tgz#db5f5f31362c76e242b40ea9a3ccfa364719cee3" dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" - jest-docblock "^20.0.3" + jest-docblock "^20.1.0-chi.1" micromatch "^2.3.11" - sane "~1.6.0" + sane "^2.0.0" worker-farm "^1.3.1" -jest-jasmine2@^20.0.3, jest-jasmine2@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz#fcc5b1411780d911d042902ef1859e852e60d5e1" +jest-haste-map@20.1.0-delta.4: + version "20.1.0-delta.4" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.1.0-delta.4.tgz#12e32b297a6dd49705cacde938029fc158834006" dependencies: - chalk "^1.1.3" + fb-watchman "^2.0.0" graceful-fs "^4.1.11" - jest-diff "^20.0.3" - jest-matcher-utils "^20.0.3" - jest-matchers "^20.0.3" - jest-message-util "^20.0.3" - jest-snapshot "^20.0.3" - once "^1.4.0" - p-map "^1.1.1" + jest-docblock "20.1.0-delta.4" + micromatch "^2.3.11" + sane "^2.0.0" + worker-farm "^1.3.1" -jest-matcher-utils@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612" +jest-haste-map@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-21.0.0.tgz#1f099ff6aedb52ec55fa9773ce26e4bbb00b0580" dependencies: - chalk "^1.1.3" - pretty-format "^20.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.1.11" + jest-docblock "^21.0.0" + micromatch "^2.3.11" + sane "^2.0.0" + worker-farm "^1.3.1" -jest-matchers@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-20.0.3.tgz#ca69db1c32db5a6f707fa5e0401abb55700dfd60" +jest-jasmine2@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-21.0.0.tgz#539725989e45ab0b00029fcf37bc679aa39c2941" dependencies: - jest-diff "^20.0.3" - jest-matcher-utils "^20.0.3" - jest-message-util "^20.0.3" - jest-regex-util "^20.0.3" + chalk "^2.0.1" + expect "^21.0.0" + graceful-fs "^4.1.11" + jest-diff "^21.0.0" + jest-matcher-utils "^21.0.0" + jest-message-util "^21.0.0" + jest-snapshot "^21.0.0" + p-cancelable "^0.3.0" -jest-message-util@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-20.0.3.tgz#6aec2844306fcb0e6e74d5796c1006d96fdd831c" +jest-matcher-utils@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-21.0.0.tgz#493dc25b9ed6a23a61802ca20656f0f1c16f15b1" dependencies: - chalk "^1.1.3" + chalk "^2.0.1" + jest-get-type "^21.0.0" + pretty-format "^21.0.0" + +jest-message-util@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-21.0.0.tgz#cd49c2e91d7a227e622884c418185a1a7cbe1fd6" + dependencies: + chalk "^2.0.1" micromatch "^2.3.11" slash "^1.0.0" -jest-mock@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-20.0.3.tgz#8bc070e90414aa155c11a8d64c869a0d5c71da59" +jest-mock@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-21.0.0.tgz#948fdbb44ef702ca998e078ca62b4968780e102e" jest-react-native@18.0.0: version "18.0.0" resolved "https://registry.yarnpkg.com/jest-react-native/-/jest-react-native-18.0.0.tgz#77dd909f069324599f227c58c61c2e62168726ba" -jest-regex-util@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-20.0.3.tgz#85bbab5d133e44625b19faf8c6aa5122d085d762" +jest-regex-util@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-21.0.0.tgz#f13c382a1c55515c20471390ab38e5d71cbd320e" -jest-resolve-dependencies@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz#6e14a7b717af0f2cb3667c549de40af017b1723a" +jest-resolve-dependencies@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-21.0.0.tgz#09dfd9654a8af92880a2f66076871d48810bd48d" dependencies: - jest-regex-util "^20.0.3" + jest-regex-util "^21.0.0" -jest-resolve@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-20.0.3.tgz#375307aa40f78532d40ff8b17d5300b1519f8dd4" +jest-resolve@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-21.0.0.tgz#04d3939203633cc57ae8219b34ad42687dd8d111" dependencies: browser-resolve "^1.11.2" + chalk "^2.0.1" is-builtin-module "^1.0.0" - resolve "^1.3.2" -jest-resolve@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-20.0.4.tgz#9448b3e8b6bafc15479444c6499045b7ffe597a5" - dependencies: - browser-resolve "^1.11.2" - is-builtin-module "^1.0.0" - resolve "^1.3.2" +jest-runner@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-21.0.0.tgz#8969dd22ff73911c84043cf16b6cfadf609f3d1f" + dependencies: + jest-config "^21.0.0" + jest-docblock "^21.0.0" + jest-haste-map "^21.0.0" + jest-jasmine2 "^21.0.0" + jest-message-util "^21.0.0" + jest-runtime "^21.0.0" + jest-util "^21.0.0" + pify "^2.3.0" + throat "^3.0.0" + worker-farm "^1.3.1" -jest-runtime@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-20.0.4.tgz#a2c802219c4203f754df1404e490186169d124d8" +jest-runtime@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-21.0.0.tgz#54af290dc664a49ddc251c7d7ce1a5661afc1ead" dependencies: babel-core "^6.0.0" - babel-jest "^20.0.3" + babel-jest "^21.0.0" babel-plugin-istanbul "^4.0.0" - chalk "^1.1.3" + chalk "^2.0.1" convert-source-map "^1.4.0" graceful-fs "^4.1.11" - jest-config "^20.0.4" - jest-haste-map "^20.0.4" - jest-regex-util "^20.0.3" - jest-resolve "^20.0.4" - jest-util "^20.0.3" + jest-config "^21.0.0" + jest-haste-map "^21.0.0" + jest-regex-util "^21.0.0" + jest-resolve "^21.0.0" + jest-util "^21.0.0" json-stable-stringify "^1.0.1" micromatch "^2.3.11" + slash "^1.0.0" strip-bom "3.0.0" + write-file-atomic "^2.1.0" yargs "^7.0.2" -jest-snapshot@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-20.0.3.tgz#5b847e1adb1a4d90852a7f9f125086e187c76566" +jest-snapshot@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-21.0.0.tgz#00b582b13ef42112bd431b498e37f7829b30cd66" dependencies: - chalk "^1.1.3" - jest-diff "^20.0.3" - jest-matcher-utils "^20.0.3" - jest-util "^20.0.3" + chalk "^2.0.1" + jest-diff "^21.0.0" + jest-matcher-utils "^21.0.0" + mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^20.0.3" + pretty-format "^21.0.0" -jest-snapshots-svg@^0.0.18: - version "0.0.18" - resolved "https://registry.yarnpkg.com/jest-snapshots-svg/-/jest-snapshots-svg-0.0.18.tgz#7c72bbb4ca754f0da431f984383313a47b9e2713" +jest-snapshots-svg@^0.0.21: + version "0.0.21" + resolved "https://registry.yarnpkg.com/jest-snapshots-svg/-/jest-snapshots-svg-0.0.21.tgz#c997d9973f1deb67c448db8f3fdb8136fcb1a0a4" dependencies: nbind "^0.3.12" + string-pixel-width "^1.1.1" yoga-layout "^1.5.0" -jest-util@^20.0.0, jest-util@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-20.0.3.tgz#0c07f7d80d82f4e5a67c6f8b9c3fe7f65cfd32ad" +jest-styled-components@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/jest-styled-components/-/jest-styled-components-4.5.0.tgz#dca25e4e4dc1b7ed6d1f69b49b41e4ff8fe197e8" dependencies: - chalk "^1.1.3" + css "^2.2.1" + +jest-util@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-21.0.0.tgz#62b3a3ec3ff91022ef7e1ffbcf3293424715919f" + dependencies: + callsites "^2.0.0" + chalk "^2.0.1" graceful-fs "^4.1.11" - jest-message-util "^20.0.3" - jest-mock "^20.0.3" - jest-validate "^20.0.3" - leven "^2.1.0" + jest-message-util "^21.0.0" + jest-mock "^21.0.0" + jest-validate "^21.0.0" mkdirp "^0.5.1" -jest-validate@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab" +jest-validate@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.0.0.tgz#f906d54eca2a485ffbfb2d8a7d58831c026e6dd5" dependencies: - chalk "^1.1.3" - jest-matcher-utils "^20.0.3" + chalk "^2.0.1" + jest-get-type "^21.0.0" leven "^2.1.0" - pretty-format "^20.0.3" + pretty-format "^21.0.0" -jest@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.4.tgz#3dd260c2989d6dad678b1e9cc4d91944f6d602ac" +jest@^21.0.1: + version "21.0.1" + resolved "https://registry.yarnpkg.com/jest/-/jest-21.0.1.tgz#746cddc89477beaea5b208e7017ca26652bfdb38" dependencies: - jest-cli "^20.0.4" + jest-cli "^21.0.1" jodid25519@^1.0.0: version "1.0.2" @@ -4393,19 +4799,20 @@ jodid25519@^1.0.0: dependencies: jsbn "~0.1.0" -joi@^6.6.1: - version "6.10.1" - resolved "https://registry.yarnpkg.com/joi/-/joi-6.10.1.tgz#4d50c318079122000fe5f16af1ff8e1917b77e06" - dependencies: - hoek "2.x.x" - isemail "1.x.x" - moment "2.x.x" - topo "1.x.x" - js-base64@^2.1.9: version "2.1.9" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" +js-message@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/js-message/-/js-message-1.0.5.tgz#2300d24b1af08e89dd095bc1a4c9c9cfcb892d15" + +js-queue@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/js-queue/-/js-queue-2.0.0.tgz#362213cf860f468f0125fc6c96abc1742531f948" + dependencies: + easy-stack "^1.0.0" + js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" @@ -4428,6 +4835,10 @@ jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" +jschardet@^1.4.2: + version "1.5.1" + resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.1.tgz#c519f629f86b3a5bedba58a88d311309eec097f9" + jsdom@^9.12.0: version "9.12.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" @@ -4490,14 +4901,14 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" +json5@0.5.1, json5@^0.5.0, json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + json5@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/json5/-/json5-0.4.0.tgz#054352e4c4c80c86c0923877d449de176a732c8d" -json5@^0.5.0, json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -4544,12 +4955,32 @@ keycode@^2.1.8: version "2.1.9" resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.1.9.tgz#964a23c54e4889405b4861a5c9f0480d45141dfa" +keymirror@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/keymirror/-/keymirror-0.1.1.tgz#918889ea13f8d0a42e7c557250eee713adc95c35" + kind-of@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" dependencies: is-buffer "^1.0.2" +kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.0.2.tgz#f57bec933d9a2209ffa96c5c08343607b7035fda" + klaw@^1.0.0: version "1.3.1" resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" @@ -4564,6 +4995,12 @@ lazy-cache@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" +lazy-cache@^2.0.1, lazy-cache@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264" + dependencies: + set-getter "^0.1.0" + lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" @@ -4581,7 +5018,7 @@ left-pad@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a" -leven@^2.1.0: +leven@2.1.0, leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" @@ -4741,6 +5178,10 @@ lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" +lodash.deburr@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/lodash.deburr/-/lodash.deburr-4.1.0.tgz#ddb1bbb3ef07458c0177ba07de14422cb033ff9b" + lodash.escape@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" @@ -4838,14 +5279,14 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" +lodash@4.17.4, lodash@^4.0.0, lodash@^4.1.0, lodash@^4.14.0, lodash@^4.16.6, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.1, lodash@^4.6.1: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + lodash@^3.10.1, lodash@^3.5.0: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" -lodash@^4.0.0, lodash@^4.1.0, lodash@^4.14.0, lodash@^4.16.6, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.1, lodash@^4.6.1: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" - log-symbols@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" @@ -4876,6 +5317,16 @@ loud-rejection@^1.0.0: currently-unhandled "^0.4.1" signal-exit "^3.0.0" +lower-case-first@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-1.0.2.tgz#e5da7c26f29a7073be02d52bac9980e5922adfa1" + dependencies: + lower-case "^1.1.2" + +lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + lru-cache@^2.5.0: version "2.7.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" @@ -4891,6 +5342,10 @@ macaddress@^0.2.8: version "0.2.8" resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" +macos-release@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-1.1.0.tgz#831945e29365b470aa8724b0ab36c8f8959d10fb" + make-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978" @@ -4911,10 +5366,21 @@ mantra-core@^1.7.0: react-komposer "^1.9.0" react-simple-di "^1.2.0" +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" +map-visit@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-0.1.5.tgz#dbe43927ce5525b80dfc1573a44d68c51f26816b" + dependencies: + lazy-cache "^2.0.1" + object-visit "^0.3.4" + math-expression-evaluator@^1.2.14: version "1.2.17" resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" @@ -4982,6 +5448,46 @@ methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" +metro-bundler@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/metro-bundler/-/metro-bundler-0.11.0.tgz#ba5d2ae34943da28a37c2098047ad265c16fddf4" + dependencies: + absolute-path "^0.0.0" + async "^2.4.0" + babel-core "^6.24.1" + babel-generator "^6.24.1" + babel-plugin-external-helpers "^6.18.0" + babel-preset-es2015-node "^6.1.1" + babel-preset-fbjs "^2.1.4" + babel-preset-react-native "^2.0.0" + babel-register "^6.24.1" + babylon "^6.17.0" + chalk "^1.1.1" + concat-stream "^1.6.0" + core-js "^2.2.2" + debug "^2.2.0" + denodeify "^1.2.1" + fbjs "0.8.12" + graceful-fs "^4.1.3" + image-size "^0.6.0" + jest-docblock "20.1.0-chi.1" + jest-haste-map "20.1.0-chi.1" + json-stable-stringify "^1.0.1" + json5 "^0.4.0" + left-pad "^1.1.3" + lodash "^4.16.6" + merge-stream "^1.0.1" + mime-types "2.1.11" + mkdirp "^0.5.1" + request "^2.79.0" + rimraf "^2.5.4" + source-map "^0.5.6" + temp "0.8.3" + throat "^4.1.0" + uglify-js "2.7.5" + write-file-atomic "^1.2.0" + xpipe "^1.0.5" + micromatch@^2.1.5, micromatch@^2.3.11: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" @@ -5000,6 +5506,24 @@ micromatch@^2.1.5, micromatch@^2.3.11: parse-glob "^3.0.4" regex-cache "^0.4.2" +micromatch@^3.0.3: + version "3.0.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.0.4.tgz#1543f1d04813447ac852001c5f5a933401786d1d" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.2.2" + define-property "^1.0.0" + extend-shallow "^2.0.1" + extglob "^1.1.0" + fragment-cache "^0.2.1" + kind-of "^4.0.0" + nanomatch "^1.2.0" + object.pick "^1.2.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + miller-rabin@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.0.tgz#4a62fb1d42933c05583982f4c716f6fb9e6c6d3d" @@ -5049,13 +5573,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -minimatch@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - dependencies: - brace-expansion "^1.0.0" - -minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: +minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: @@ -5073,6 +5591,13 @@ minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" +mixin-deep@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.2.0.tgz#d02b8c6f8b6d4b8f5982d3fd009c4919851c3fe2" + dependencies: + for-in "^1.0.2" + is-extendable "^0.1.1" + "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -5083,7 +5608,7 @@ mobx@^2.3.4: version "2.7.0" resolved "https://registry.yarnpkg.com/mobx/-/mobx-2.7.0.tgz#cf3d82d18c0ca7f458d8f2a240817b3dc7e54a01" -moment@2.x.x, moment@^2.11.2, moment@latest: +moment@^2.11.2, moment@latest: version "2.18.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f" @@ -5131,10 +5656,6 @@ multipipe@^0.1.2: dependencies: duplexer2 "0.0.2" -mute-stream@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" - mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" @@ -5143,6 +5664,23 @@ nan@^2.3.0, nan@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" +nanomatch@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.0.tgz#76fdb3d4ae7617e37719e7a4047b840857c0cb1c" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^1.0.0" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + is-extglob "^2.1.1" + is-odd "^1.0.0" + kind-of "^4.0.0" + object.pick "^1.2.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -5167,14 +5705,13 @@ netrc@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/netrc/-/netrc-0.1.4.tgz#6be94fcaca8d77ade0a9670dc460914c94472444" -node-fetch@^1.0.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.1.tgz#899cb3d0a3c92f952c47f1b876f4c8aeabd400d5" +no-case@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.1.tgz#7aeba1c73a52184265554b7dc03baf720df80081" dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" + lower-case "^1.1.1" -node-fetch@^1.3.3, node-fetch@^1.6.3: +node-fetch@^1.0.1, node-fetch@^1.3.3, node-fetch@^1.5.3, node-fetch@^1.6.3: version "1.6.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.6.3.tgz#dc234edd6489982d58e8f0db4f695029abcd8c04" dependencies: @@ -5203,6 +5740,14 @@ node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" +node-ipc@9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/node-ipc/-/node-ipc-9.0.1.tgz#6af4700b8430502f28850bb1026414450688c575" + dependencies: + event-pubsub "4.2.4" + js-message "1.0.5" + js-queue "2.0.0" + node-libs-browser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646" @@ -5240,7 +5785,7 @@ node-notifier@^5.0.2: shellwords "^0.1.0" which "^1.2.12" -node-pre-gyp@^0.6.29: +node-pre-gyp@^0.6.36: version "0.6.36" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz#db604112cb74e0d477554e9b505b17abddfab786" dependencies: @@ -5362,6 +5907,20 @@ object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-visit@^0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-0.3.4.tgz#ae15cf86f0b2fdd551771636448452c54c3da829" + dependencies: + isobject "^2.0.0" + object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" @@ -5369,6 +5928,12 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" +object.pick@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + dependencies: + isobject "^3.0.1" + on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -5458,6 +6023,13 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" +os-name@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/os-name/-/os-name-2.0.1.tgz#b9a386361c17ae3a21736ef0599405c9a8c5dc5e" + dependencies: + macos-release "^1.0.0" + win-release "^1.0.0" + os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -5469,6 +6041,10 @@ osenv@0, osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" +p-cancelable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -5491,6 +6067,12 @@ pako@~0.2.0: version "0.2.9" resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" +param-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + dependencies: + no-case "^2.2.0" + parse-asn1@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" @@ -5505,7 +6087,7 @@ parse-diff@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/parse-diff/-/parse-diff-0.4.0.tgz#9ce35bcce8fc0b7c58f46d71113394fc0b4982dd" -parse-glob@^3.0.4: +parse-glob@3.0.4, parse-glob@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" dependencies: @@ -5534,10 +6116,31 @@ parseurl@~1.3.0, parseurl@~1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" +pascal-case@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-2.0.1.tgz#2d578d3455f660da65eca18ef95b4e0de912761e" + dependencies: + camel-case "^3.0.0" + upper-case-first "^1.1.0" + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + path-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" +path-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/path-case/-/path-case-2.1.1.tgz#94b8037c372d3fe2906e465bb45e25d226e8eea5" + dependencies: + no-case "^2.2.0" + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" @@ -5671,6 +6274,10 @@ podda@^1.2.2: babel-runtime "^6.11.6" immutable "^3.8.1" +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + postcss-calc@^5.2.0: version "5.3.1" resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" @@ -6003,12 +6610,12 @@ prettier@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.5.2.tgz#7ea0751da27b93bfb6cecfcec509994f52d83bb3" -pretty-format@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-20.0.3.tgz#020e350a560a1fe1a98dc3beb6ccffb386de8b14" +pretty-format@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.0.0.tgz#bea1522c4c47e49b44db5b6fbf83e7737251f305" dependencies: - ansi-regex "^2.1.1" - ansi-styles "^3.0.0" + ansi-regex "^3.0.0" + ansi-styles "^3.2.0" pretty-format@^4.2.1: version "4.3.1" @@ -6034,6 +6641,13 @@ progress@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" +promise-retry@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d" + dependencies: + err-code "^1.0.0" + retry "^0.10.0" + promise@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/promise/-/promise-7.1.1.tgz#489654c692616b8aa55b0724fa809bb7db49c5bf" @@ -6090,10 +6704,6 @@ q@^1.1.2: version "1.5.0" resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" -qs@*: - version "6.5.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.0.tgz#8d04954d364def3efc55b5a0793e1e2c8b1e6e49" - qs@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/qs/-/qs-4.0.0.tgz#c31d9b74ec27df75e543a86c78728ed8d4623607" @@ -6178,9 +6788,9 @@ react-deep-force-update@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.0.1.tgz#f911b5be1d2a6fe387507dd6e9a767aa2924b4c7" -react-devtools-core@^2.1.8: - version "2.1.9" - resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-2.1.9.tgz#825e0582b7f8587cbf56bb5ef1ea94d8b158543e" +react-devtools-core@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-2.5.0.tgz#5ad179f88f22d205940721e38e4ecc3a2d35bf03" dependencies: shell-quote "^1.6.1" ws "^2.0.3" @@ -6277,9 +6887,9 @@ react-native-storybook-loader@^1.5.0: glob "^7.1.1" yargs "^8.0.2" -react-native@next: - version "0.45.0-rc.2" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.45.0-rc.2.tgz#e28c048403f6c13cb0d201ce0577549181558367" +react-native@0.48.0: + version "0.48.0" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.48.0.tgz#b2f06ee969c3145a0ad19700fb5ee90125bc0d25" dependencies: absolute-path "^0.0.0" art "^0.10.0" @@ -6289,12 +6899,13 @@ react-native@next: babel-plugin-external-helpers "^6.18.0" babel-plugin-syntax-trailing-function-commas "^6.20.0" babel-plugin-transform-async-to-generator "6.16.0" + babel-plugin-transform-class-properties "^6.18.0" babel-plugin-transform-flow-strip-types "^6.21.0" babel-plugin-transform-object-rest-spread "^6.20.2" babel-polyfill "^6.20.0" babel-preset-es2015-node "^6.1.1" - babel-preset-fbjs "^2.1.2" - babel-preset-react-native "^1.9.1" + babel-preset-fbjs "^2.1.4" + babel-preset-react-native "^2.0.0" babel-register "^6.24.1" babel-runtime "^6.23.0" babel-traverse "^6.24.1" @@ -6310,6 +6921,7 @@ react-native@next: create-react-class "^15.5.2" debug "^2.2.0" denodeify "^1.2.1" + envinfo "^3.0.0" errno ">=0.1.1 <0.2.0-0" event-target-shim "^1.0.5" fbjs "0.8.12" @@ -6318,15 +6930,14 @@ react-native@next: fs-extra "^1.0.0" glob "^7.1.1" graceful-fs "^4.1.3" - image-size "^0.3.5" - inquirer "^0.12.0" - jest-haste-map "^20.0.4" - joi "^6.6.1" + inquirer "^3.0.6" + jest-haste-map "20.1.0-delta.4" json-stable-stringify "^1.0.1" json5 "^0.4.0" left-pad "^1.1.3" lodash "^4.16.6" merge-stream "^1.0.1" + metro-bundler "^0.11.0" mime "^1.3.4" mime-types "2.1.11" minimist "^1.2.0" @@ -6340,7 +6951,7 @@ react-native@next: promise "^7.1.1" prop-types "^15.5.8" react-clone-referenced-element "^1.0.1" - react-devtools-core "^2.1.8" + react-devtools-core "^2.5.0" react-timer-mixin "^0.13.2" react-transform-hmr "^1.0.4" rebound "^0.0.13" @@ -6353,8 +6964,7 @@ react-native@next: source-map "^0.5.6" stacktrace-parser "^0.1.3" temp "0.8.3" - throat "^3.0.0" - uglify-js "2.7.5" + throat "^4.1.0" whatwg-fetch "^1.0.0" wordwrap "^1.0.0" write-file-atomic "^1.2.0" @@ -6372,13 +6982,15 @@ react-proxy@^1.1.7: lodash "^4.6.1" react-deep-force-update "^1.0.0" -"react-relay@https://github.com/alloy/relay/releases/download/react-relay-0.9.3%2Breact-native-0.45-fix-2/react-relay-0.9.3.react-native-0.45-fix-2.tgz": - version "0.9.3" - resolved "https://github.com/alloy/relay/releases/download/react-relay-0.9.3%2Breact-native-0.45-fix-2/react-relay-0.9.3.react-native-0.45-fix-2.tgz#0d6a763042abb12e541b5bd797069623063065b1" +"react-relay@https://github.com/alloy/relay/releases/download/v1.3.0-artsy/react-relay-1.3.0-artsy.1.tgz": + version "1.3.0" + resolved "https://github.com/alloy/relay/releases/download/v1.3.0-artsy/react-relay-1.3.0-artsy.1.tgz#24e2f9a27950e71350cd9639a1df66c5ef522f1f" dependencies: - babel-runtime "^6.6.1" + babel-runtime "^6.23.0" fbjs "^0.8.1" + prop-types "^15.5.8" react-static-container "^1.0.1" + relay-runtime "1.3.0" react-simple-di@^1.2.0: version "1.2.0" @@ -6541,6 +7153,14 @@ readable-stream@~2.0.0: string_decoder "~0.10.x" util-deprecate "~1.0.1" +readdir-enhanced@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/readdir-enhanced/-/readdir-enhanced-1.5.2.tgz#61463048690ac6a455b75b62fa78a88f8dc85e53" + dependencies: + call-me-maybe "^1.0.1" + es6-promise "^4.1.0" + glob-to-regexp "^0.3.0" + readdirp@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" @@ -6550,14 +7170,6 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" -readline2@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - mute-stream "0.0.5" - rebound@^0.0.13: version "0.0.13" resolved "https://registry.yarnpkg.com/rebound/-/rebound-0.0.13.tgz#4a225254caf7da756797b19c5817bf7a7941fac1" @@ -6629,6 +7241,16 @@ regex-cache@^0.4.2: is-equal-shallow "^0.1.3" is-primitive "^2.0.0" +regex-not@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-0.1.2.tgz#bc7f1c4944b1188353d07deeb912b94e0ade25db" + +regex-not@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.0.tgz#42f83e39771622df826b02af176525d6a5f157f9" + dependencies: + extend-shallow "^2.0.1" + regexpu-core@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" @@ -6655,6 +7277,40 @@ regjsparser@^0.1.4: dependencies: jsesc "~0.5.0" +"relay-compiler@https://github.com/alloy/relay/releases/download/v1.3.0-artsy/relay-compiler-1.3.0-artsy.1.tgz": + version "1.3.0" + resolved "https://github.com/alloy/relay/releases/download/v1.3.0-artsy/relay-compiler-1.3.0-artsy.1.tgz#90c5e84300eac1728c66298b1cd40fedee82ef1d" + dependencies: + babel-generator "6.25.0" + babel-polyfill "^6.23.0" + babel-preset-fbjs "^2.1.0" + babel-runtime "^6.23.0" + babel-traverse "6.25.0" + babel-types "6.25.0" + babylon "6.18.0" + chalk "^1.1.3" + fast-glob "^1.0.1" + fb-watchman "^2.0.0" + fbjs "^0.8.1" + graphql "^0.10.5" + immutable "^3.8.1" + relay-runtime "1.3.0" + signedsource "^1.0.0" + typescript "^2.3.2" + yargs "^7.0.2" + +relay-debugger-react-native-runtime@^0.0.9: + version "0.0.9" + resolved "https://registry.yarnpkg.com/relay-debugger-react-native-runtime/-/relay-debugger-react-native-runtime-0.0.9.tgz#f9da4bb1f4f4a62189775d3850a18df1d528a4f1" + +relay-runtime@1.3.0, "relay-runtime@https://github.com/alloy/relay/releases/download/v1.3.0-artsy/relay-runtime-artsy.1.tgz": + version "1.3.0" + resolved "https://github.com/alloy/relay/releases/download/v1.3.0-artsy/relay-runtime-artsy.1.tgz#edf42a4ddfce3a0edbf79ff41a416aa4f4fc079d" + dependencies: + babel-runtime "^6.23.0" + fbjs "^0.8.1" + relay-debugger-react-native-runtime "^0.0.9" + relay2ts@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/relay2ts/-/relay2ts-0.2.0.tgz#964f903c0a943a7aa8fa0b8a0ccdfd63f826e669" @@ -6672,7 +7328,7 @@ repeat-element@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" -repeat-string@^1.5.2: +repeat-string@^1.5.2, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" @@ -6729,6 +7385,10 @@ resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" +resolve-url@^0.2.1, resolve-url@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + resolve@1.1.7, resolve@~1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" @@ -6760,6 +7420,10 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" +retry@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" + rfc6902@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/rfc6902/-/rfc6902-1.3.0.tgz#85b2c69c42dcf116082437b9829a962446b4c4a5" @@ -6791,21 +7455,21 @@ rndm@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/rndm/-/rndm-1.2.0.tgz#f33fe9cfb52bbfd520aa18323bc65db110a1b76c" -run-async@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" - dependencies: - once "^1.3.0" - run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" dependencies: is-promise "^2.1.0" -rx-lite@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" rx@2.3.24: version "2.3.24" @@ -6825,22 +7489,24 @@ safe-buffer@^5.0.1, safe-buffer@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" -sane@~1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/sane/-/sane-1.4.1.tgz#88f763d74040f5f0c256b6163db399bf110ac715" +sane@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-2.0.0.tgz#99cb79f21f4a53a69d4d0cd957c2db04024b8eb2" dependencies: + anymatch "^1.3.0" exec-sh "^0.2.0" - fb-watchman "^1.8.0" + fb-watchman "^2.0.0" minimatch "^3.0.2" minimist "^1.1.1" walker "~1.0.5" watch "~0.10.0" + optionalDependencies: + fsevents "^1.1.1" -sane@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/sane/-/sane-1.6.0.tgz#9610c452307a135d29c1fdfe2547034180c46775" +sane@~1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/sane/-/sane-1.4.1.tgz#88f763d74040f5f0c256b6163db399bf110ac715" dependencies: - anymatch "^1.3.0" exec-sh "^0.2.0" fb-watchman "^1.8.0" minimatch "^3.0.2" @@ -6862,7 +7528,7 @@ schema-utils@^0.3.0: dependencies: ajv "^5.0.0" -"semver@2 || 3 || 4 || 5", semver@5.3.0, semver@5.x, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@~5.3.0: +"semver@2 || 3 || 4 || 5", semver@5.3.0, semver@5.x, semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -6905,6 +7571,13 @@ send@0.15.3: range-parser "~1.2.0" statuses "~1.3.1" +sentence-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.1.tgz#1f6e2dda39c168bf92d13f86d4a918933f667ed4" + dependencies: + no-case "^2.2.0" + upper-case-first "^1.1.2" + sentry-cli-binary@^1.16.0: version "1.16.0" resolved "https://registry.yarnpkg.com/sentry-cli-binary/-/sentry-cli-binary-1.16.0.tgz#10fbdde9e6e86d8a864c96f8adeb97b0064ea427" @@ -6953,10 +7626,25 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" +set-getter@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376" + dependencies: + to-object-path "^0.3.0" + set-immediate-shim@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" +set-value@^0.4.2, set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + setimmediate@^1.0.4, setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -7012,6 +7700,10 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" +signedsource@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/signedsource/-/signedsource-1.0.0.tgz#1ddace4981798f93bd833973803d80d52e93ad6a" + simple-plist@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-0.2.1.tgz#71766db352326928cf3a807242ba762322636723" @@ -7032,6 +7724,39 @@ slide@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" +snake-case@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f" + dependencies: + no-case "^2.2.0" + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.1.tgz#e12b5487faded3e3dea0ac91e9400bf75b401370" + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^2.0.0" + sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" @@ -7052,12 +7777,44 @@ source-list-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" +source-map-resolve@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.3.1.tgz#610f6122a445b8dd51535a2a71b783dfc1248761" + dependencies: + atob "~1.1.0" + resolve-url "~0.2.1" + source-map-url "~0.3.0" + urix "~0.1.0" + +source-map-resolve@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.0.tgz#fcad0b64b70afb27699e425950cb5ebcd410bc20" + dependencies: + atob "^2.0.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + source-map-support@^0.4.15, source-map-support@^0.4.2, source-map-support@^0.4.4: version "0.4.15" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" dependencies: source-map "^0.5.6" +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + +source-map-url@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9" + +source-map@^0.1.38: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + source-map@^0.4.2, source-map@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" @@ -7096,6 +7853,12 @@ specificity@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/specificity/-/specificity-0.3.1.tgz#f1b068424ce317ae07478d95de3c21cf85e8d567" +split-string@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-2.1.1.tgz#af4b06d821560426446c3cd931cda618940d37d0" + dependencies: + extend-shallow "^2.0.1" + split2@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/split2/-/split2-0.2.1.tgz#02ddac9adc03ec0bb78c1282ec079ca6e85ae900" @@ -7129,6 +7892,13 @@ staged-git-files@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-0.0.4.tgz#d797e1b551ca7a639dec0237dc6eb4bb9be17d35" +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + statuses@1, "statuses@>= 1.3.1 < 2", statuses@~1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" @@ -7189,6 +7959,12 @@ string-length@^1.0.1: dependencies: strip-ansi "^3.0.0" +string-pixel-width@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string-pixel-width/-/string-pixel-width-1.1.1.tgz#c9d243f79849b4e6d75214de8702fc88db9ee508" + dependencies: + lodash.deburr "^4.1.0" + string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -7204,6 +7980,13 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^3.0.0" +string-width@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + string_decoder@^0.10.25, string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" @@ -7230,6 +8013,12 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + strip-bom@3.0.0, strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -7250,7 +8039,7 @@ strip-indent@^1.0.1: dependencies: get-stdin "^4.0.1" -strip-json-comments@^2.0.0, strip-json-comments@~2.0.1: +strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -7398,6 +8187,13 @@ svgo@^0.7.0: sax "~1.2.1" whet.extend "~0.9.9" +swap-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz#c39203a4587385fad3c850a0bd1bcafa081974e3" + dependencies: + lower-case "^1.1.1" + upper-case "^1.1.1" + symbol-observable@^1.0.1, symbol-observable@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" @@ -7465,9 +8261,9 @@ test-exclude@^3.3.0: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" -test-exclude@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.0.3.tgz#86a13ce3effcc60e6c90403cf31a27a60ac6c4e7" +test-exclude@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" dependencies: arrify "^1.0.1" micromatch "^2.3.11" @@ -7483,6 +8279,10 @@ throat@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6" +throat@^4.0.0, throat@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" + through2@^0.6.1, through2@^0.6.3, through2@~0.6.1: version "0.6.5" resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" @@ -7515,6 +8315,13 @@ timers-browserify@^2.0.2: dependencies: setimmediate "^1.0.4" +title-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa" + dependencies: + no-case "^2.2.0" + upper-case "^1.0.3" + tmp@^0.0.31: version "0.0.31" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" @@ -7533,11 +8340,34 @@ to-fast-properties@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" -topo@1.x.x: - version "1.1.0" - resolved "https://registry.yarnpkg.com/topo/-/topo-1.1.0.tgz#e9d751615d1bb87dc865db182fa1ca0a5ef536d5" +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" dependencies: - hoek "2.x.x" + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-2.1.0.tgz#e3ad3a40cfe119559a05aea43e4caefacc5e901d" + dependencies: + define-property "^0.2.5" + extend-shallow "^2.0.1" + regex-not "^0.1.1" + +to-regex@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.1.tgz#15358bee4a2c83bd76377ba1dc049d0f18837aae" + dependencies: + define-property "^0.2.5" + extend-shallow "^2.0.1" + regex-not "^1.0.0" tough-cookie@^2.3.2, tough-cookie@~2.3.0: version "2.3.2" @@ -7557,28 +8387,21 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" -ts-jest@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-20.0.3.tgz#31d62afb59ecb6af14cb6bd0bcbd541a745d8f7a" +ts-jest@^21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-21.0.0.tgz#261c0b90270bfaa57c8d9ef2a0b5f3a41efc38e9" dependencies: - babel-jest "^20.0.0" + babel-core "^6.24.1" + babel-plugin-istanbul "^4.1.4" babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - fs-extra "^3.0.0" - glob-all "^3.1.0" - jest-config "^20.0.0" - jest-util "^20.0.0" + babel-preset-jest "^21.0.0" + fs-extra "^4.0.0" + jest-config "^21.0.0" + jest-util "^21.0.0" pkg-dir "^2.0.0" source-map-support "^0.4.4" - tsconfig "^6.0.0" yargs "^8.0.1" -tsconfig@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/tsconfig/-/tsconfig-6.0.0.tgz#6b0e8376003d7af1864f8df8f89dd0059ffcd032" - dependencies: - strip-bom "^3.0.0" - strip-json-comments "^2.0.0" - tslib@^1.7.1: version "1.7.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec" @@ -7710,6 +8533,15 @@ ultron@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.0.tgz#b07a2e6a541a815fc6a34ccd4533baec307ca864" +union-value@^0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-0.2.4.tgz#7375152786679057e7b37aa676e83468fc0274f0" + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" + uniq@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" @@ -7732,6 +8564,27 @@ unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" +unset-value@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-0.1.2.tgz#506810b867f27c2a5a6e9b04833631f6de58d310" + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +upper-case-first@^1.1.0, upper-case-first@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" + dependencies: + upper-case "^1.1.1" + +upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + +urix@^0.1.0, urix@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + url-loader@^0.5.8: version "0.5.8" resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.5.8.tgz#b9183b1801e0f847718673673040bc9dc1c715c5" @@ -7746,6 +8599,20 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" +use@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/use/-/use-2.0.2.tgz#ae28a0d72f93bf22422a18a2e379993112dec8e8" + dependencies: + define-property "^0.2.5" + isobject "^3.0.0" + lazy-cache "^2.0.2" + +user-home@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" + dependencies: + os-homedir "^1.0.0" + util-deprecate@1.0.2, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -7950,9 +8817,9 @@ which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -which@1, which@^1.2.10, which@^1.2.12, which@^1.2.9: - version "1.2.14" - resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" +which@1, which@^1.2.10, which@^1.2.12, which@^1.2.14, which@^1.2.9: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" dependencies: isexe "^2.0.0" @@ -7962,6 +8829,12 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.2" +win-release@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/win-release/-/win-release-1.1.1.tgz#5fa55e02be7ca934edfc12665632e849b72e5209" + dependencies: + semver "^5.0.1" + window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" @@ -8012,6 +8885,14 @@ write-file-atomic@^1.2.0: imurmurhash "^0.1.4" slide "^1.1.5" +write-file-atomic@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + write-file-stdout@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/write-file-stdout/-/write-file-stdout-0.0.2.tgz#c252d7c7c5b1b402897630e3453c7bfe690d9ca1" @@ -8116,7 +8997,7 @@ yargs-parser@^7.0.0: dependencies: camelcase "^4.1.0" -yargs@^1.2.6, yargs@~1.2.6: +yargs@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/yargs/-/yargs-1.2.6.tgz#9c7b4a82fd5d595b2bf17ab6dcc43135432fe34b" dependencies: @@ -8171,7 +9052,7 @@ yargs@^6.4.0: y18n "^3.2.1" yargs-parser "^4.2.0" -yargs@^7.0.2: +yargs@^7.0.1, yargs@^7.0.2: version "7.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" dependencies: @@ -8189,25 +9070,7 @@ yargs@^7.0.2: y18n "^3.2.1" yargs-parser "^5.0.0" -yargs@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.1.tgz#420ef75e840c1457a80adcca9bc6fa3849de51aa" - dependencies: - camelcase "^4.1.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - read-pkg-up "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^7.0.0" - -yargs@^8.0.2: +yargs@^8.0.1, yargs@^8.0.2: version "8.0.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" dependencies: