diff --git a/package.json b/package.json index 4fb7f82..d3e0ffc 100644 --- a/package.json +++ b/package.json @@ -28,30 +28,30 @@ "graphql-compose": ">=1.0.0" }, "devDependencies": { - "babel-cli": "6.14.0", - "babel-core": "6.14.0", - "babel-eslint": "6.1.2", + "babel-cli": "6.16.0", + "babel-core": "6.17.0", + "babel-eslint": "7.0.0", "babel-plugin-syntax-async-functions": "6.13.0", - "babel-plugin-transform-class-properties": "6.11.5", + "babel-plugin-transform-class-properties": "6.16.0", "babel-plugin-transform-flow-strip-types": "6.14.0", - "babel-plugin-transform-object-rest-spread": "6.8.0", - "babel-plugin-transform-regenerator": "6.14.0", + "babel-plugin-transform-object-rest-spread": "6.16.0", + "babel-plugin-transform-regenerator": "6.16.1", "babel-plugin-transform-runtime": "6.15.0", - "babel-preset-es2015": "6.14.0", + "babel-preset-es2015": "6.16.0", "chai": "3.5.0", - "chai-as-promised": "5.3.0", + "chai-as-promised": "6.0.0", "chai-spies": "0.7.1", "cz-conventional-changelog": "1.2.0", - "eslint": "3.4.0", - "eslint-config-airbnb": "10.0.1", - "eslint-plugin-flowtype": "2.15.0", - "eslint-plugin-import": "1.14.0", - "eslint-plugin-jsx-a11y": "2.2.1", - "eslint-plugin-react": "6.2.0", - "flow-bin": "0.32.0", + "eslint": "3.7.1", + "eslint-config-airbnb": "11.0.0", + "eslint-plugin-flowtype": "2.20.0", + "eslint-plugin-import": "1.16.0", + "eslint-plugin-jsx-a11y": "2.2.3", + "eslint-plugin-react": "6.4.1", + "flow-bin": "0.33.0", "ghooks": "1.3.2", - "mocha": "3.0.2", - "nyc": "8.1.0", + "mocha": "3.1.2", + "nyc": "8.3.1", "rimraf": "2.5.4", "sane": "1.4.1", "semantic-release": "4.3.5" @@ -86,6 +86,7 @@ "test": "babel-node ./node_modules/.bin/_mocha --compilers js:babel-core/register --reporter dot --require ./resources/mocha-bootload src/**/__tests__/**/*-test.js", "watch": "babel-node ./resources/watch.js", "link": "npm link graphql && npm link graphql-compose && npm link", + "unlink": "npm unlink graphql && npm unlink graphql-compose && npm install graphql graphql-compose", "semantic-release": "semantic-release pre && npm publish && semantic-release post" } } diff --git a/src/__mocks__/userTypeComposer.js b/src/__mocks__/userTypeComposer.js index 3feeb86..41d9dc5 100644 --- a/src/__mocks__/userTypeComposer.js +++ b/src/__mocks__/userTypeComposer.js @@ -55,6 +55,9 @@ const filterArgConfig = { gender: { type: GraphQLString, }, + age: { + type: GraphQLInt, + }, _operators: { type: new GraphQLInputObjectType({ name: 'OperatorsFilterUserInput', diff --git a/src/__tests__/composeWithConnection-test.js b/src/__tests__/composeWithConnection-test.js index b6df0ce..ce7c0d8 100644 --- a/src/__tests__/composeWithConnection-test.js +++ b/src/__tests__/composeWithConnection-test.js @@ -8,7 +8,7 @@ import { import { TypeComposer } from 'graphql-compose'; import { composeWithConnection } from '../composeWithConnection'; import { userTypeComposer, sortOptions } from '../__mocks__/userTypeComposer'; -import { rootQueryTypeComposer } from '../__mocks__/rootQueryTypeComposer'; +import { rootQueryTypeComposer as rootQueryTC } from '../__mocks__/rootQueryTypeComposer'; describe('composeWithRelay', () => { @@ -34,11 +34,11 @@ describe('composeWithRelay', () => { }); it('should apply first sort ID_ASC by default', async () => { - rootQueryTypeComposer.addField('userConnection', + rootQueryTC.addField('userConnection', userTypeComposer.getResolver('connection').getFieldConfig() ); const schema = new GraphQLSchema({ - query: rootQueryTypeComposer.getType(), + query: rootQueryTC.getType(), }); const query = `{ userConnection(last: 3) { @@ -86,11 +86,11 @@ describe('composeWithRelay', () => { }); it('should able to change `sort` on AGE_ID_DESC', async () => { - rootQueryTypeComposer.addField('userConnection', + rootQueryTC.addField('userConnection', userTypeComposer.getResolver('connection').getFieldConfig() ); const schema = new GraphQLSchema({ - query: rootQueryTypeComposer.getType(), + query: rootQueryTC.getType(), }); const query = `{ userConnection(first: 3, sort: AGE_ID_DESC) { @@ -140,11 +140,11 @@ describe('composeWithRelay', () => { describe('fragments fields projection of graphql-compose', () => { it('should return object', async () => { - rootQueryTypeComposer.addField('userConnection', + rootQueryTC.addField('userConnection', userTypeComposer.getResolver('connection').getFieldConfig() ); const schema = new GraphQLSchema({ - query: rootQueryTypeComposer.getType(), + query: rootQueryTC.getType(), }); const query = `{ userConnection(first: 1) { @@ -201,4 +201,63 @@ describe('composeWithRelay', () => { }); }); }); + + it('should pass `countResolveParams` to top resolverParams', async () => { + let topResolveParams; + + rootQueryTC.addField('userConnection', + userTypeComposer + .getResolver('connection') + .wrapResolve((next) => (rp) => { + const result = next(rp); + topResolveParams = rp; + return result; + }) + .getFieldConfig() + ); + const schema = new GraphQLSchema({ + query: rootQueryTC.getType(), + }); + const query = `{ + userConnection(first: 1, filter: { age: 45 }) { + count + } + }`; + const result = await graphql(schema, query); + expect(topResolveParams).has.property('countResolveParams'); + expect(topResolveParams.countResolveParams) + .to.contain.all.keys(['source', 'args', 'context', 'info', 'projection']); + expect(topResolveParams.countResolveParams.args) + .deep.equal({ filter: { age: 45 } }); + }); + + + it('should pass `findManyResolveParams` to top resolverParams', async () => { + let topResolveParams; + + rootQueryTC.addField('userConnection', + userTypeComposer + .getResolver('connection') + .wrapResolve((next) => (rp) => { + const result = next(rp); + topResolveParams = rp; + return result; + }) + .getFieldConfig() + ); + const schema = new GraphQLSchema({ + query: rootQueryTC.getType(), + }); + const query = `{ + userConnection(first: 1, filter: { age: 45 }) { + count + } + }`; + const result = await graphql(schema, query); + expect(topResolveParams).has.property('findManyResolveParams'); + expect(topResolveParams.findManyResolveParams) + .to.contain.all.keys(['source', 'args', 'context', 'info', 'projection']); + expect(topResolveParams.findManyResolveParams.args) + .deep.equal({ filter: { age: 45 }, limit: 2, sort: { id: 1 } }); + }); }); diff --git a/src/connectionResolver.js b/src/connectionResolver.js index 1246d0d..8a5ea89 100644 --- a/src/connectionResolver.js +++ b/src/connectionResolver.js @@ -115,12 +115,21 @@ export function prepareConnectionResolver( throw new Error('Argument `last` should be non-negative number.'); } + // pass count ResolveParams to top resolver + resolveParams.countResolveParams = { + ...findManyParams, + args: { + filter: Object.assign({}, findManyParams.args.filter), + }, + }; if (projection.count) { - countPromise = countResolve(findManyParams); + countPromise = countResolve(resolveParams.countResolveParams); } else if (!first && last) { - countPromise = countResolve(findManyParams); + countPromise = countResolve(resolveParams.countResolveParams); } else { countPromise = Promise.resolve(0); + // count resolver not called, so remove it from top params + delete resolveParams.countResolveParams; } if (!first && last) { @@ -136,6 +145,9 @@ export function prepareConnectionResolver( findManyParams.args.skip = skip; } + // pass findMany ResolveParams to top resolver + resolveParams.findManyResolveParams = Object.assign({}, findManyParams); + const filterDataForCursor = (record) => { const result = {}; sortOptions.uniqueFields.forEach(fieldName => { @@ -144,7 +156,7 @@ export function prepareConnectionResolver( return result; }; - return Promise.all([findManyResolve(findManyParams), countPromise]) + return Promise.all([findManyResolve(resolveParams.findManyResolveParams), countPromise]) .then(([recordList, count]) => { const edges = []; // transform record to object { cursor, node } diff --git a/yarn.lock b/yarn.lock index e3c1ac2..b4cb1a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -104,6 +104,10 @@ aproba@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.0.4.tgz#2713680775e7614c8ba186c065d4e2e52d1072c0" +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + are-we-there-yet@~1.0.0: version "1.0.6" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.0.6.tgz#a2d28c93102aa6cc96245a26cb954de06ec53f0c" @@ -200,13 +204,13 @@ aws4@^1.2.1: version "1.5.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" -babel-cli@6.14.0: - version "6.14.0" - resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.14.0.tgz#cbc778ad1ff4e58c87b87d7e08993993c2d3b75f" +babel-cli@6.16.0: + version "6.16.0" + resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.16.0.tgz#4e0d1cf40442ef78330f7fef88eb3a0a1b16bd37" dependencies: - babel-core "^6.14.0" - babel-polyfill "^6.9.0" - babel-register "^6.14.0" + babel-core "^6.16.0" + babel-polyfill "^6.16.0" + babel-register "^6.16.0" babel-runtime "^6.9.0" bin-version-check "^2.1.0" chalk "1.1.1" @@ -226,7 +230,7 @@ babel-cli@6.14.0: optionalDependencies: chokidar "^1.0.0" -babel-code-frame@^6.16.0, babel-code-frame@^6.8.0: +babel-code-frame@^6.16.0: version "6.16.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.16.0.tgz#f90e60da0862909d3ce098733b5d3987c97cb8de" dependencies: @@ -234,7 +238,7 @@ babel-code-frame@^6.16.0, babel-code-frame@^6.8.0: esutils "^2.0.2" js-tokens "^2.0.0" -babel-core@^6.14.0, babel-core@^6.16.0: +babel-core@^6.16.0, babel-core@6.17.0: version "6.17.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.17.0.tgz#6c4576447df479e241e58c807e4bc7da4db7f425" dependencies: @@ -260,43 +264,16 @@ babel-core@^6.14.0, babel-core@^6.16.0: slash "^1.0.0" source-map "^0.5.0" -babel-core@6.14.0: - version "6.14.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.14.0.tgz#c9e13ed4e2f97329215496fd9fb48f2b3bcb9b42" +babel-eslint@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.0.0.tgz#54e51b4033f54ac81326ecea4c646a779935196d" dependencies: - babel-code-frame "^6.8.0" - babel-generator "^6.14.0" - babel-helpers "^6.8.0" - babel-messages "^6.8.0" - babel-register "^6.14.0" - babel-runtime "^6.9.1" - babel-template "^6.14.0" - babel-traverse "^6.14.0" - babel-types "^6.14.0" - babylon "^6.9.0" - convert-source-map "^1.1.0" - debug "^2.1.1" - json5 "^0.4.0" - lodash "^4.2.0" - minimatch "^3.0.2" - path-exists "^1.0.0" - path-is-absolute "^1.0.0" - private "^0.1.6" - shebang-regex "^1.0.0" - slash "^1.0.0" - source-map "^0.5.0" - -babel-eslint@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-6.1.2.tgz#5293419fe3672d66598d327da9694567ba6a5f2f" - dependencies: - babel-traverse "^6.0.20" - babel-types "^6.0.19" - babylon "^6.0.18" - lodash.assign "^4.0.0" - lodash.pickby "^4.0.0" + babel-traverse "^6.15.0" + babel-types "^6.15.0" + babylon "^6.11.2" + lodash.pickby "^4.6.0" -babel-generator@^6.11.3, babel-generator@^6.14.0, babel-generator@^6.17.0: +babel-generator@^6.11.3, babel-generator@^6.17.0: version "6.17.0" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.17.0.tgz#b894e3808beef7800f2550635bfe024b6226cf33" dependencies: @@ -376,7 +353,7 @@ babel-helper-replace-supers@^6.14.0, babel-helper-replace-supers@^6.8.0: babel-traverse "^6.16.0" babel-types "^6.16.0" -babel-helpers@^6.16.0, babel-helpers@^6.8.0: +babel-helpers@^6.16.0: version "6.16.0" resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.16.0.tgz#1095ec10d99279460553e67eb3eee9973d3867e3" dependencies: @@ -395,7 +372,7 @@ babel-plugin-check-es2015-constants@^6.3.13: dependencies: babel-runtime "^6.0.0" -babel-plugin-syntax-async-functions@^6.8.0, babel-plugin-syntax-async-functions@6.13.0: +babel-plugin-syntax-async-functions@6.13.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" @@ -411,9 +388,9 @@ babel-plugin-syntax-object-rest-spread@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" -babel-plugin-transform-class-properties@6.11.5: - version "6.11.5" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.11.5.tgz#429c7a4e7d8ac500448eb14ec502604bc568c91c" +babel-plugin-transform-class-properties@6.16.0: + version "6.16.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.16.0.tgz#969bca24d34e401d214f36b8af5c1346859bc904" dependencies: babel-helper-function-name "^6.8.0" babel-plugin-syntax-class-properties "^6.8.0" @@ -463,7 +440,7 @@ babel-plugin-transform-es2015-computed-properties@^6.3.13: babel-runtime "^6.0.0" babel-template "^6.8.0" -babel-plugin-transform-es2015-destructuring@^6.9.0: +babel-plugin-transform-es2015-destructuring@^6.16.0: version "6.16.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.16.0.tgz#050fe0866f5d53b36062ee10cdf5bfe64f929627" dependencies: @@ -476,7 +453,7 @@ babel-plugin-transform-es2015-duplicate-keys@^6.6.0: babel-runtime "^6.0.0" babel-types "^6.8.0" -babel-plugin-transform-es2015-for-of@^6.6.0, babel-plugin-transform-es2015-for-of@^6.8.0: +babel-plugin-transform-es2015-for-of@^6.6.0: version "6.8.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.8.0.tgz#82eda139ba4270dda135c3ec1b1f2813fa62f23c" dependencies: @@ -504,7 +481,7 @@ babel-plugin-transform-es2015-modules-amd@^6.8.0: babel-runtime "^6.0.0" babel-template "^6.8.0" -babel-plugin-transform-es2015-modules-commonjs@^6.14.0, babel-plugin-transform-es2015-modules-commonjs@^6.8.0: +babel-plugin-transform-es2015-modules-commonjs@^6.16.0, babel-plugin-transform-es2015-modules-commonjs@^6.8.0: version "6.16.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.16.0.tgz#0a34b447bc88ad1a70988b6d199cca6d0b96c892" dependencies: @@ -536,7 +513,7 @@ babel-plugin-transform-es2015-object-super@^6.3.13: babel-helper-replace-supers "^6.8.0" babel-runtime "^6.0.0" -babel-plugin-transform-es2015-parameters@^6.9.0: +babel-plugin-transform-es2015-parameters@^6.16.0: version "6.17.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.17.0.tgz#e06d30cef897f46adb4734707bbe128a0d427d58" dependencies: @@ -595,14 +572,14 @@ babel-plugin-transform-flow-strip-types@6.14.0: babel-plugin-syntax-flow "^6.8.0" babel-runtime "^6.0.0" -babel-plugin-transform-object-rest-spread@6.8.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.8.0.tgz#03d1308e257a9d8e1a815ae1fd3db21bdebf08d9" +babel-plugin-transform-object-rest-spread@6.16.0: + version "6.16.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.16.0.tgz#db441d56fffc1999052fdebe2e2f25ebd28e36a9" dependencies: babel-plugin-syntax-object-rest-spread "^6.8.0" babel-runtime "^6.0.0" -babel-plugin-transform-regenerator@^6.14.0: +babel-plugin-transform-regenerator@^6.16.0, babel-plugin-transform-regenerator@6.16.1: version "6.16.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.16.1.tgz#a75de6b048a14154aae14b0122756c5bed392f59" dependencies: @@ -610,20 +587,6 @@ babel-plugin-transform-regenerator@^6.14.0: babel-types "^6.16.0" private "~0.1.5" -babel-plugin-transform-regenerator@6.14.0: - version "6.14.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.14.0.tgz#119119b20c8b4283f6c77f0170d404c3c654bec8" - dependencies: - babel-core "^6.14.0" - babel-plugin-syntax-async-functions "^6.8.0" - babel-plugin-transform-es2015-block-scoping "^6.14.0" - babel-plugin-transform-es2015-for-of "^6.8.0" - babel-runtime "^6.9.0" - babel-traverse "^6.14.0" - babel-types "^6.14.0" - babylon "^6.9.0" - private "~0.1.5" - babel-plugin-transform-runtime@6.15.0: version "6.15.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.15.0.tgz#3d75b4d949ad81af157570273846fb59aeb0d57c" @@ -637,7 +600,7 @@ babel-plugin-transform-strict-mode@^6.8.0: babel-runtime "^6.0.0" babel-types "^6.8.0" -babel-polyfill@^6.9.0: +babel-polyfill@^6.16.0: version "6.16.0" resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.16.0.tgz#2d45021df87e26a374b6d4d1a9c65964d17f2422" dependencies: @@ -645,9 +608,9 @@ babel-polyfill@^6.9.0: core-js "^2.4.0" regenerator-runtime "^0.9.5" -babel-preset-es2015@6.14.0: - version "6.14.0" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.14.0.tgz#cd2437a96f02a4d19bb87e87980bf0b0288d13eb" +babel-preset-es2015@6.16.0: + version "6.16.0" + resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.16.0.tgz#59acecd1efbebaf48f89404840f2fe78c4d2ad5c" dependencies: babel-plugin-check-es2015-constants "^6.3.13" babel-plugin-transform-es2015-arrow-functions "^6.3.13" @@ -655,26 +618,26 @@ babel-preset-es2015@6.14.0: babel-plugin-transform-es2015-block-scoping "^6.14.0" babel-plugin-transform-es2015-classes "^6.14.0" babel-plugin-transform-es2015-computed-properties "^6.3.13" - babel-plugin-transform-es2015-destructuring "^6.9.0" + babel-plugin-transform-es2015-destructuring "^6.16.0" babel-plugin-transform-es2015-duplicate-keys "^6.6.0" babel-plugin-transform-es2015-for-of "^6.6.0" babel-plugin-transform-es2015-function-name "^6.9.0" babel-plugin-transform-es2015-literals "^6.3.13" babel-plugin-transform-es2015-modules-amd "^6.8.0" - babel-plugin-transform-es2015-modules-commonjs "^6.14.0" + babel-plugin-transform-es2015-modules-commonjs "^6.16.0" babel-plugin-transform-es2015-modules-systemjs "^6.14.0" babel-plugin-transform-es2015-modules-umd "^6.12.0" babel-plugin-transform-es2015-object-super "^6.3.13" - babel-plugin-transform-es2015-parameters "^6.9.0" + babel-plugin-transform-es2015-parameters "^6.16.0" babel-plugin-transform-es2015-shorthand-properties "^6.3.13" babel-plugin-transform-es2015-spread "^6.3.13" babel-plugin-transform-es2015-sticky-regex "^6.3.13" babel-plugin-transform-es2015-template-literals "^6.6.0" babel-plugin-transform-es2015-typeof-symbol "^6.6.0" babel-plugin-transform-es2015-unicode-regex "^6.3.13" - babel-plugin-transform-regenerator "^6.14.0" + babel-plugin-transform-regenerator "^6.16.0" -babel-register@^6.14.0, babel-register@^6.16.0: +babel-register@^6.16.0: version "6.16.3" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.16.3.tgz#7b0c0ca7bfdeb9188ba4c27e5fcb7599a497c624" dependencies: @@ -704,7 +667,7 @@ babel-template@^6.14.0, babel-template@^6.15.0, babel-template@^6.16.0, babel-te babylon "^6.11.0" lodash "^4.2.0" -babel-traverse@^6.0.20, babel-traverse@^6.14.0, babel-traverse@^6.15.0, babel-traverse@^6.16.0, babel-traverse@^6.8.0, babel-traverse@^6.9.0: +babel-traverse@^6.14.0, babel-traverse@^6.15.0, babel-traverse@^6.16.0, babel-traverse@^6.8.0, babel-traverse@^6.9.0: version "6.16.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.16.0.tgz#fba85ae1fd4d107de9ce003149cc57f53bef0c4f" dependencies: @@ -718,7 +681,7 @@ babel-traverse@^6.0.20, babel-traverse@^6.14.0, babel-traverse@^6.15.0, babel-tr invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.0.19, babel-types@^6.10.2, babel-types@^6.14.0, babel-types@^6.15.0, babel-types@^6.16.0, babel-types@^6.8.0, babel-types@^6.9.0: +babel-types@^6.10.2, babel-types@^6.14.0, babel-types@^6.15.0, babel-types@^6.16.0, babel-types@^6.8.0, babel-types@^6.9.0: version "6.16.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.16.0.tgz#71cca1dbe5337766225c5c193071e8ebcbcffcfe" dependencies: @@ -727,10 +690,14 @@ babel-types@^6.0.19, babel-types@^6.10.2, babel-types@^6.14.0, babel-types@^6.15 lodash "^4.2.0" to-fast-properties "^1.0.1" -babylon@^6.0.18, babylon@^6.11.0, babylon@^6.8.1, babylon@^6.9.0: +babylon@^6.11.0, babylon@^6.8.1: version "6.11.4" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.11.4.tgz#75e1f52187efa0cde5a541a7f7fdda38f6eb5bd2" +babylon@^6.11.2: + version "6.11.6" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.11.6.tgz#56dc52e624882841c7fe095257fbcb4a5bb61ae1" + balanced-match@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" @@ -859,9 +826,11 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chai-as-promised@5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-5.3.0.tgz#09d7a402908aa70dfdbead53e5853fc79d3ef21c" +chai-as-promised@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6" + dependencies: + check-error "^1.0.2" chai-spies@0.7.1: version "0.7.1" @@ -895,6 +864,10 @@ chalk@1.1.1: strip-ansi "^3.0.0" supports-color "^2.0.0" +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + chokidar@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.0.tgz#90c32ad4802901d7713de532dc284e96a63ad058" @@ -1163,9 +1136,9 @@ doctrine@^1.2.2: esutils "^2.0.2" isarray "^1.0.0" -doctrine@1.2.x: - version "1.2.3" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.2.3.tgz#6aec6bbd62cf89dd498cae70c0ed9f49da873a6a" +doctrine@1.3.x: + version "1.3.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.3.0.tgz#13e75682b55518424276f7c173783456ef913d26" dependencies: esutils "^2.0.2" isarray "^1.0.0" @@ -1251,15 +1224,15 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-config-airbnb-base@^5.0.2: - version "5.0.3" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-5.0.3.tgz#9714ac35ec2cd7fab0d44d148a9f91db2944074d" +eslint-config-airbnb-base@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-7.2.0.tgz#1a2ff77cc5d4abc2e1c5daebe4106fce95ff7c2a" -eslint-config-airbnb@10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-10.0.1.tgz#a470108646d6c45e1f639a03f11d504a1aa4aedc" +eslint-config-airbnb@11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-11.0.0.tgz#84c8e6b47f060dba659dc4f8b3b48ceec271e58c" dependencies: - eslint-config-airbnb-base "^5.0.2" + eslint-config-airbnb-base "^7.0.0" eslint-import-resolver-node@^0.2.0: version "0.2.3" @@ -1269,56 +1242,58 @@ eslint-import-resolver-node@^0.2.0: object-assign "^4.0.1" resolve "^1.1.6" -eslint-plugin-flowtype@2.15.0: - version "2.15.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.15.0.tgz#408458aa399ab9712e66317fafc2530912b473a7" +eslint-plugin-flowtype@2.20.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.20.0.tgz#69b90576174ee6a305362c777720825e7db9464b" dependencies: lodash "^4.15.0" -eslint-plugin-import@1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-1.14.0.tgz#acd2159923f48c50e5cf55c30a0e1708f04af97a" +eslint-plugin-import@1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-1.16.0.tgz#b2fa07ebcc53504d0f2a4477582ec8bff1871b9f" dependencies: builtin-modules "^1.1.1" contains-path "^0.1.0" debug "^2.2.0" - doctrine "1.2.x" + doctrine "1.3.x" es6-map "^0.1.3" es6-set "^0.1.4" eslint-import-resolver-node "^0.2.0" + has "^1.0.1" lodash.cond "^4.3.0" lodash.endswith "^4.0.1" lodash.find "^4.3.0" lodash.findindex "^4.3.0" + minimatch "^3.0.3" object-assign "^4.0.1" pkg-dir "^1.0.0" pkg-up "^1.0.0" -eslint-plugin-jsx-a11y@2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-2.2.1.tgz#1919fab212cd73a95eab2ac12a028793f37e4196" +eslint-plugin-jsx-a11y@2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-2.2.3.tgz#4e35cb71b8a7db702ac415c806eb8e8d9ea6c65d" dependencies: damerau-levenshtein "^1.0.0" jsx-ast-utils "^1.0.0" object-assign "^4.0.1" -eslint-plugin-react@6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.2.0.tgz#71eb94c1f63ffe6fc7ffa41f492d97f634bee76e" +eslint-plugin-react@6.4.1: + version "6.4.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.4.1.tgz#7d1aade747db15892f71eee1fea4addf97bcfa2b" dependencies: doctrine "^1.2.2" jsx-ast-utils "^1.3.1" -eslint@3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.4.0.tgz#af5984007bd3f1fb1b3b6b01a0a22eda0ec7a9f4" +eslint@3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.7.1.tgz#7faa84599e0fea422f04bc32db49054051a3f11a" dependencies: chalk "^1.1.3" concat-stream "^1.4.6" debug "^2.1.1" doctrine "^1.2.2" escope "^3.6.0" - espree "^3.1.6" + espree "^3.3.1" estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" @@ -1347,7 +1322,7 @@ eslint@3.4.0: text-table "~0.2.0" user-home "^2.0.0" -espree@^3.1.6: +espree@^3.3.1: version "3.3.2" resolved "https://registry.yarnpkg.com/espree/-/espree-3.3.2.tgz#dbf3fadeb4ecb4d4778303e50103b3d36c88b89c" dependencies: @@ -1521,9 +1496,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@0.32.0: - version "0.32.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.32.0.tgz#a1d69d153a07b0a9cd4a633d13bf746d4ace5730" +flow-bin@0.33.0: + version "0.33.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.33.0.tgz#ef011eace7a6100f1ae08b852db78279032b8750" for-in@^0.1.5: version "0.1.6" @@ -1594,6 +1569,10 @@ fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: mkdirp ">=0.5 0" rimraf "2" +function-bind@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" + gauge@~1.2.0: version "1.2.7" resolved "https://registry.yarnpkg.com/gauge/-/gauge-1.2.7.tgz#e9cec5483d3d4ee0ef44b60a7d99e4935e136d93" @@ -1705,7 +1684,7 @@ glob@^5.0.5: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.3, glob@^7.0.5: +glob@^7.0.3, glob@^7.0.5, glob@^7.0.6: version "7.1.1" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" dependencies: @@ -1795,6 +1774,12 @@ has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" +has@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + dependencies: + function-bind "^1.0.2" + hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" @@ -2029,7 +2014,7 @@ istanbul-lib-hook@^1.0.0-alpha.4: dependencies: append-transform "^0.3.0" -istanbul-lib-instrument@^1.1.0: +istanbul-lib-instrument@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.1.3.tgz#66d5353d1f592b9e34d1cf9acda9c3f1ab509696" dependencies: @@ -2051,7 +2036,7 @@ istanbul-lib-report@^1.0.0-alpha.3: rimraf "^2.4.3" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.0.0-alpha.10: +istanbul-lib-source-maps@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.0.2.tgz#9e91b0e5ae6ed203f67c69a34e6e98b10bb69a49" dependencies: @@ -2224,10 +2209,6 @@ lodash.assign@^3.0.0: lodash._createassigner "^3.0.0" lodash.keys "^3.0.0" -lodash.assign@^4.0.0, lodash.assign@^4.0.3, lodash.assign@^4.0.6, lodash.assign@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - lodash.clone@4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.3.2.tgz#e56b176b6823a7dde38f7f2bf58de7d5971200e9" @@ -2290,7 +2271,7 @@ lodash.padstart@^4.1.0: version "4.6.1" resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" -lodash.pickby@^4.0.0: +lodash.pickby@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" @@ -2415,7 +2396,7 @@ mime@^1.2.11: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" -minimatch@^3.0.0, minimatch@^3.0.2, "minimatch@2 || 3": +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, "minimatch@2 || 3": version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: @@ -2439,9 +2420,9 @@ mkdirp@^0.5.0, mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@0.5.1: dependencies: minimist "0.0.8" -mocha@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.0.2.tgz#63a97f3e18f4d3e659d47a617677d089874557f0" +mocha@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.1.2.tgz#51f93b432bf7e1b175ffc22883ccd0be32dba6b5" dependencies: browser-stdout "1.3.0" commander "2.9.0" @@ -2597,10 +2578,11 @@ number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" -nyc@8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-8.1.0.tgz#eaad1e95e33d52f87651cfbf79a9fb697d343e3a" +nyc@8.3.1: + version "8.3.1" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-8.3.1.tgz#5761e96b0d5871844e8768e35d8c8a0b7fd6b67c" dependencies: + archy "^1.0.0" arrify "^1.0.1" caching-transform "^1.0.0" convert-source-map "^1.3.0" @@ -2608,24 +2590,23 @@ nyc@8.1.0: find-cache-dir "^0.1.1" find-up "^1.1.2" foreground-child "^1.5.3" - glob "^7.0.3" + glob "^7.0.6" istanbul-lib-coverage "^1.0.0" istanbul-lib-hook "^1.0.0-alpha.4" - istanbul-lib-instrument "^1.1.0" + istanbul-lib-instrument "^1.1.3" istanbul-lib-report "^1.0.0-alpha.3" - istanbul-lib-source-maps "^1.0.0-alpha.10" + istanbul-lib-source-maps "^1.0.2" istanbul-reports "^1.0.0-alpha.8" md5-hex "^1.2.0" micromatch "^2.3.11" mkdirp "^0.5.0" - pkg-up "^1.0.0" resolve-from "^2.0.0" rimraf "^2.5.4" - signal-exit "^3.0.0" + signal-exit "^3.0.1" spawn-wrap "^1.2.4" - test-exclude "^2.1.1" - yargs "^4.8.1" - yargs-parser "^3.1.0" + test-exclude "^2.1.3" + yargs "^6.0.0" + yargs-parser "^4.0.2" oauth-sign@~0.8.1: version "0.8.2" @@ -3154,7 +3135,7 @@ signal-exit@^2.0.0: version "2.1.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-2.1.2.tgz#375879b1f92ebc3b334480d038dc546a6d558564" -signal-exit@^3.0.0: +signal-exit@^3.0.0, signal-exit@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.1.tgz#5a4c884992b63a7acd9badb7894c3ee9cfccad81" @@ -3260,7 +3241,7 @@ string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" -string-width@^1.0.1: +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" dependencies: @@ -3344,7 +3325,7 @@ tar@~2.2.0, tar@~2.2.1: fstream "^1.0.2" inherits "2" -test-exclude@^2.1.1: +test-exclude@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-2.1.3.tgz#a8d8968e1da83266f9864f2852c55e220f06434a" dependencies: @@ -3554,38 +3535,29 @@ yallist@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.0.tgz#306c543835f09ee1a4cb23b7bce9ab341c91cdd4" -yargs-parser@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" - dependencies: - camelcase "^3.0.0" - lodash.assign "^4.0.6" - -yargs-parser@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-3.2.0.tgz#5081355d19d9d0c8c5d81ada908cb4e6d186664f" +yargs-parser@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.0.2.tgz#7f7173a8c7cca1d81dc7c18692fc07c2c2e2b1e0" dependencies: camelcase "^3.0.0" - lodash.assign "^4.1.0" -yargs@^4.8.1: - version "4.8.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" +yargs@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.0.0.tgz#900479df4e8bf6ab0e87216f5ed2b2760b968345" dependencies: cliui "^3.2.0" decamelize "^1.1.1" get-caller-file "^1.0.1" - lodash.assign "^4.0.3" os-locale "^1.4.0" read-pkg-up "^1.0.1" require-directory "^2.1.1" require-main-filename "^1.0.1" set-blocking "^2.0.0" - string-width "^1.0.1" + string-width "^1.0.2" which-module "^1.0.0" window-size "^0.2.0" y18n "^3.2.1" - yargs-parser "^2.4.1" + yargs-parser "^4.0.2" yargs@~3.10.0: version "3.10.0"