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

Commit

Permalink
Merge pull request #484 from apollographql/greenkeeper-update-all
Browse files Browse the repository at this point in the history
Update all dependencies 🌴
  • Loading branch information
helfer authored Feb 25, 2017
2 parents 3f8e7b9 + 530674e commit ee90601
Show file tree
Hide file tree
Showing 11 changed files with 820 additions and 1,769 deletions.
50 changes: 25 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,58 +76,58 @@
"@types/enzyme": "^2.4.32",
"@types/graphql": "^0.8.5",
"@types/invariant": "^2.2.27",
"@types/isomorphic-fetch": "0.0.30",
"@types/jest": "^15.1.32",
"@types/isomorphic-fetch": "0.0.33",
"@types/jest": "^18.1.1",
"@types/lodash": "^4.14.36",
"@types/node": "^6.0.38",
"@types/node": "^7.0.5",
"@types/object-assign": "^4.0.28",
"@types/react": "^0.14.34",
"@types/react": "^15.0.12",
"@types/react-addons-test-utils": "^0.14.14",
"@types/react-dom": "^0.14.16",
"@types/react-redux": "^4.4.31",
"@types/redux-form": "^4.0.29",
"@types/redux-form": "^6.3.2",
"@types/redux-immutable": "^3.0.30",
"@types/sinon": "^1.16.29",
"apollo-client": "^0.8.0",
"babel-jest": "^14.1.0",
"apollo-client": "^0.9.0",
"babel-jest": "^19.0.0",
"babel-preset-react-native": "^1.9.0",
"browserify": "^13.0.0",
"cheerio": "^0.20.0",
"browserify": "^14.1.0",
"cheerio": "^0.22.0",
"colors": "^1.1.2",
"enzyme": "^2.2.0",
"enzyme-to-json": "^1.1.5",
"flow-bin": "^0.32.0",
"flow-bin": "^0.40.0",
"graphql": "^0.9.1",
"graphql-tag": "^0.1.7",
"graphql-tag": "^1.2.4",
"gzip-size": "^3.0.0",
"immutable": "^3.8.1",
"isomorphic-fetch": "^2.2.1",
"jest": "^18.1.0",
"jest": "^19.0.2",
"jest-react-native": "^18.0.0",
"jsdom": "^8.3.1",
"jsdom": "^9.11.0",
"lodash": "^4.16.6",
"minimist": "^1.2.0",
"mobx": "^2.4.2",
"mobx-react": "^3.5.4",
"pretty-bytes": "^3.0.1",
"react": "15.4.0-rc.2",
"react-addons-test-utils": "15.4.0-rc.2",
"react-dom": "15.4.0-rc.2",
"react-native": "^0.38.0",
"react-redux": "^4.4.5",
"react-test-renderer": "15.4.0-rc.4",
"recompose": "^0.21.2",
"pretty-bytes": "^4.0.2",
"react": "15.4.2",
"react-addons-test-utils": "15.4.2",
"react-dom": "15.4.2",
"react-native": "^0.41.2",
"react-redux": "^5.0.3",
"react-test-renderer": "15.4.2",
"recompose": "^0.22.0",
"redux": "^3.5.2",
"redux-form": "^6.0.5",
"redux-immutable": "^3.0.7",
"redux-loop": "^2.2.2",
"source-map-support": "^0.4.0",
"swapi-graphql": "0.0.4",
"swapi-graphql": "0.0.6",
"travis-weigh-in": "^1.0.2",
"tslint": "^3.6.0",
"typescript": "^2.0.3",
"tslint": "^4.4.2",
"typescript": "^2.2.0",
"typescript-require": "^0.2.9-1",
"typings": "^0.7.9",
"typings": "^2.1.0",
"uglify-js": "^2.6.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/ApolloProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class ApolloProvider extends Component<ProviderProps, any> {
invariant(
props.client,
'ApolloClient was not passed a client instance. Make ' +
'sure you pass in your client via the "client" prop.'
'sure you pass in your client via the "client" prop.',
);

this.client = props.client;
Expand Down
16 changes: 8 additions & 8 deletions src/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ let nextVersion = 0;

export function withApollo(
WrappedComponent,
operationOptions: OperationOption = {}
operationOptions: OperationOption = {},
) {

const withDisplayName = `withApollo(${getDisplayName(WrappedComponent)})`;
Expand All @@ -125,15 +125,15 @@ export function withApollo(
invariant(!!this.client,
`Could not find "client" in the context of ` +
`"${withDisplayName}". ` +
`Wrap the root component in an <ApolloProvider>`
`Wrap the root component in an <ApolloProvider>`,
);

}

getWrappedInstance() {
invariant(operationOptions.withRef,
`To access the wrapped instance, you need to specify ` +
`{ withRef: true } in the options`
`{ withRef: true } in the options`,
);

return (this.refs as any).wrappedInstance;
Expand Down Expand Up @@ -167,7 +167,7 @@ export interface WrapWithApollo {

export default function graphql(
document: DocumentNode,
operationOptions: OperationOption = {}
operationOptions: OperationOption = {},
) {

// extract options
Expand Down Expand Up @@ -239,7 +239,7 @@ export default function graphql(
invariant(!!this.client,
`Could not find "client" in the context of ` +
`"${graphQLDisplayName}". ` +
`Wrap the root component in an <ApolloProvider>`
`Wrap the root component in an <ApolloProvider>`,
);

this.store = this.client.store;
Expand Down Expand Up @@ -337,7 +337,7 @@ export default function graphql(
invariant(typeof props[variable.name.value] !== 'undefined',
`The operation '${operation.name}' wrapping '${getDisplayName(WrappedComponent)}' ` +
`is expecting a variable: '${variable.name.value}' but it was not found in the props ` +
`passed to '${graphQLDisplayName}'`
`passed to '${graphQLDisplayName}'`,
);
}
opts.variables = variables;
Expand Down Expand Up @@ -455,7 +455,7 @@ export default function graphql(
invariant(clashingKeys.length === 0,
`the result of the '${graphQLDisplayName}' operation contains keys that ` +
`conflict with the return object.` +
clashingKeys.map(k => `'${k}'`).join(', ') + ` not allowed.`
clashingKeys.map(k => `'${k}'`).join(', ') + ` not allowed.`,
);

this.forceRenderChildren();
Expand Down Expand Up @@ -498,7 +498,7 @@ export default function graphql(
getWrappedInstance() {
invariant(operationOptions.withRef,
`To access the wrapped instance, you need to specify ` +
`{ withRef: true } in the options`
`{ withRef: true } in the options`,
);

return (this.refs as any).wrappedInstance;
Expand Down
16 changes: 8 additions & 8 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,33 @@ export function parser(document: DocumentNode): IDocumentDefinition {
*/
invariant((!!document && !!document.kind),
// tslint:disable-line
`Argument of ${document} passed to parser was not a valid GraphQL DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document`
`Argument of ${document} passed to parser was not a valid GraphQL DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document`,
);

const fragments = document.definitions.filter(
(x: DefinitionNode) => x.kind === 'FragmentDefinition'
(x: DefinitionNode) => x.kind === 'FragmentDefinition',
);

const queries = document.definitions.filter(
(x: DefinitionNode) => x.kind === 'OperationDefinition' && x.operation === 'query'
(x: DefinitionNode) => x.kind === 'OperationDefinition' && x.operation === 'query',
);

const mutations = document.definitions.filter(
(x: DefinitionNode) => x.kind === 'OperationDefinition' && x.operation === 'mutation'
(x: DefinitionNode) => x.kind === 'OperationDefinition' && x.operation === 'mutation',
);

const subscriptions = document.definitions.filter(
(x: DefinitionNode) => x.kind === 'OperationDefinition' && x.operation === 'subscription'
(x: DefinitionNode) => x.kind === 'OperationDefinition' && x.operation === 'subscription',
);

invariant(!fragments.length || (queries.length || mutations.length || subscriptions.length),
`Passing only a fragment to 'graphql' is not yet supported. You must include a query, subscription or mutation as well`
`Passing only a fragment to 'graphql' is not yet supported. You must include a query, subscription or mutation as well`,
);


invariant(((queries.length + mutations.length + subscriptions.length) <= 1),
// tslint:disable-line
`react-apollo only supports a query, subscription, or a mutation per HOC. ${document} had ${queries.length} queries, ${subscriptions.length} subscriptions and ${mutations.length} muations. You can use 'compose' to join multiple operation types to a component`
`react-apollo only supports a query, subscription, or a mutation per HOC. ${document} had ${queries.length} queries, ${subscriptions.length} subscriptions and ${mutations.length} muations. You can use 'compose' to join multiple operation types to a component`,
);


Expand All @@ -69,7 +69,7 @@ export function parser(document: DocumentNode): IDocumentDefinition {

invariant(definitions.length === 1,
// tslint:disable-line
`react-apollo only supports one defintion per HOC. ${document} had ${definitions.length} definitions. You can use 'compose' to join multiple operation types to a component`
`react-apollo only supports one defintion per HOC. ${document} had ${definitions.length} definitions. You can use 'compose' to join multiple operation types to a component`,
);

const definition = definitions[0] as OperationDefinitionNode;
Expand Down
4 changes: 2 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ declare interface QueryResult {
export function walkTree(
element: any,
context: any,
visitor: (element: any, instance: any, context: any) => boolean | void
visitor: (element: any, instance: any, context: any) => boolean | void,
) {
const Component = element.type;
// a stateless functional component or a class
Expand Down Expand Up @@ -95,7 +95,7 @@ export function walkTree(
}

function getQueriesFromTree(
{ rootElement, rootContext = {} }: QueryTreeArgument, fetchRoot: boolean = true
{ rootElement, rootContext = {} }: QueryTreeArgument, fetchRoot: boolean = true,
): QueryResult[] {
const queries = [];

Expand Down
6 changes: 3 additions & 3 deletions src/test-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class MockedSubscriptionProvider extends React.Component<any, any> {
super(props, context);

const networkInterface = mockSubscriptionNetworkInterface(
this.props.subscriptions, ...this.props.responses
this.props.subscriptions, ...this.props.responses,
);

this.client = new ApolloClient({ networkInterface });
Expand All @@ -61,13 +61,13 @@ export class MockedSubscriptionProvider extends React.Component<any, any> {
// Pass in multiple mocked responses, so that you can test flows that end up
// making multiple queries to the server
export function mockNetworkInterface(
...mockedResponses: MockedResponse[]
...mockedResponses: MockedResponse[],
): NetworkInterface {
return new MockNetworkInterface(...mockedResponses);
}

export function mockSubscriptionNetworkInterface(
mockedSubscriptions: MockedSubscription[], ...mockedResponses: MockedResponse[]
mockedSubscriptions: MockedSubscription[], ...mockedResponses: MockedResponse[],
): MockSubscriptionNetworkInterface {
return new MockSubscriptionNetworkInterface(mockedSubscriptions, ...mockedResponses);
}
Expand Down
5 changes: 4 additions & 1 deletion test/react-native/__snapshots__/component.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`App renders correctly 1`] = `
<Text
accessible={true}
allowFontScaling={true}
ellipsizeMode="tail">
ellipsizeMode="tail"
>
Loading...
</Text>
`;
32 changes: 16 additions & 16 deletions test/shallowEqual.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,66 +10,66 @@ it('should return true if arguments fields are equal', () => {
expect(
shallowEqual(
{ a: 1, b: 2, c: undefined },
{ a: 1, b: 2, c: undefined }
)
{ a: 1, b: 2, c: undefined },
),
).toBe(true);

expect(
shallowEqual(
{ a: 1, b: 2, c: 3 },
{ a: 1, b: 2, c: 3 }
)
{ a: 1, b: 2, c: 3 },
),
).toBe(true);

const o = {};
expect(
shallowEqual(
{ a: 1, b: 2, c: o },
{ a: 1, b: 2, c: o }
)
{ a: 1, b: 2, c: o },
),
).toBe(true);

const d = () => 1;
expect(
shallowEqual(
{ a: 1, b: 2, c: o, d },
{ a: 1, b: 2, c: o, d }
)
{ a: 1, b: 2, c: o, d },
),
).toBe(true);
});

it('should return false if arguments fields are different function identities', () => {
expect(
shallowEqual(
{ a: 1, b: 2, d: () => 1 },
{ a: 1, b: 2, d: () => 1 }
)
{ a: 1, b: 2, d: () => 1 },
),
).toBe(false);
});

it('should return false if first argument has too many keys', () => {
expect(
shallowEqual(
{ a: 1, b: 2, c: 3 },
{ a: 1, b: 2 }
)
{ a: 1, b: 2 },
),
).toBe(false);
});

it('should return false if second argument has too many keys', () => {
expect(
shallowEqual(
{ a: 1, b: 2 },
{ a: 1, b: 2, c: 3 }
)
{ a: 1, b: 2, c: 3 },
),
).toBe(false);
});

it('should return false if arguments have different keys', () => {
expect(
shallowEqual(
{ a: 1, b: 2, c: undefined },
{ a: 1, bb: 2, c: undefined }
)
{ a: 1, bb: 2, c: undefined },
),
).toBe(false);
});
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"experimentalDecorators": true,
"pretty": true,
"removeComments": true,
"jsx": "react"
"jsx": "react",
"skipLibCheck": true
},
"include": [
"./typings.d.ts",
Expand Down
Loading

0 comments on commit ee90601

Please sign in to comment.