diff --git a/package.json b/package.json index 7d34afe..c3e97f8 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "prettier": "~1.3.1" }, "dependencies": { + "aor-realtime": "0.0.1", "apollo-client": "~1.2.0", "babel-plugin-transform-runtime": "~6.23.0", "graphql": "~0.9.6", diff --git a/src/realtime/buildAorAction.js b/src/realtime/buildAorAction.js deleted file mode 100644 index 744759b..0000000 --- a/src/realtime/buildAorAction.js +++ /dev/null @@ -1,8 +0,0 @@ -import { FETCH_END } from 'admin-on-rest'; - -export default ({ type, payload, meta: { fetch: restType, ...meta } }, parsedApolloQueryResult) => ({ - type: `${type}_SUCCESS`, - payload: parsedApolloQueryResult, - requestPayload: payload, - meta: { ...meta, fetchResponse: restType, fetchStatus: FETCH_END }, -}); diff --git a/src/realtime/createApolloQueryChannel.js b/src/realtime/createApolloQueryChannel.js deleted file mode 100644 index 14763db..0000000 --- a/src/realtime/createApolloQueryChannel.js +++ /dev/null @@ -1,15 +0,0 @@ -import { eventChannel } from 'redux-saga'; -import queryObserver from './queryObserver'; - -export const queryWatcherFactory = queryObserverImpl => (watcher, emitter) => { - const observer = queryObserverImpl(emitter); - watcher.subscribe(observer); - - const unsubscribe = () => { - observer.unsubscribe(); - }; - - return unsubscribe; -}; - -export default watcher => eventChannel(emitter => queryWatcherFactory(queryObserver)(watcher, emitter)); diff --git a/src/realtime/createApolloQueryChannel.spec.js b/src/realtime/createApolloQueryChannel.spec.js deleted file mode 100644 index 00600fc..0000000 --- a/src/realtime/createApolloQueryChannel.spec.js +++ /dev/null @@ -1,32 +0,0 @@ -import expect, { createSpy } from 'expect'; -import { queryWatcherFactory } from './createApolloQueryChannel'; - -describe('realtime', () => { - describe('createApolloQueryChannel', () => { - describe('queryWatcher', () => { - const observerUnsubscribe = createSpy(); - const queryObserver = createSpy().andReturn({ - unsubscribe: observerUnsubscribe, - }); - const emitter = 'the emitter'; - const watcher = { - subscribe: createSpy(), - }; - - const unsubscribe = queryWatcherFactory(queryObserver)(watcher, 'the emitter'); - - it('calls the queryObserver with the specified emitter', () => { - expect(queryObserver).toHaveBeenCalledWith(emitter); - }); - - it('calls subscribe on the watcher', () => { - expect(watcher.subscribe).toHaveBeenCalled(); - }); - - it('returns an unsubscribe function which calls observer.unsubscribe when invoked', () => { - unsubscribe(); - expect(observerUnsubscribe).toHaveBeenCalled(); - }); - }); - }); -}); diff --git a/src/realtime/getWatchOptionsForQuery.js b/src/realtime/getWatchOptionsForQuery.js index 056965b..aa65179 100644 --- a/src/realtime/getWatchOptionsForQuery.js +++ b/src/realtime/getWatchOptionsForQuery.js @@ -22,20 +22,22 @@ const knownApolloOptions = [ /** * Get options for calling ApolloClient.watchQuery. * @param apolloWatchOptions {Object} Options supplied by user - * @param action {Object} Action from admin-on-rest + * @param fetchType {String} The fetch type from admin-on-rest (GET_LIST, GET_ONE, etc.) + * @param resource {String} The resource from admin-on-rest + * @param params {Object} The paremeters for the query from admin-on-rest */ -export default (apolloWatchOptions, { meta: { fetch, resource } }) => { +export default (apolloWatchOptions, fetchType, resource, params) => { const options = []; - let tmpOptions = getOrCall(apolloWatchOptions, resource, fetch); + let tmpOptions = getOrCall(apolloWatchOptions, resource, fetchType, params); options.push(tmpOptions); if (tmpOptions) { options.push(tmpOptions); - tmpOptions = getOrCall(tmpOptions[resource], fetch); + tmpOptions = getOrCall(tmpOptions[resource], fetchType, params); if (tmpOptions) { options.push(tmpOptions); - tmpOptions = getOrCall(tmpOptions[fetch]); + tmpOptions = getOrCall(tmpOptions[fetchType], params); if (tmpOptions) { options.push(tmpOptions); diff --git a/src/realtime/getWatchOptionsForQuery.spec.js b/src/realtime/getWatchOptionsForQuery.spec.js index 689432b..38adfae 100644 --- a/src/realtime/getWatchOptionsForQuery.spec.js +++ b/src/realtime/getWatchOptionsForQuery.spec.js @@ -4,10 +4,12 @@ import merge from 'lodash.merge'; import getWatchOptionsForQuery, { defaultWatchOptions } from './getWatchOptionsForQuery'; describe('getWatchOptionsForQuery', () => { - const action = { meta: { resource: 'Post', fetch: 'GET_LIST' } }; + const fetchType = 'GET_LIST'; + const resource = 'Post'; + const params = {}; it('returns the default options when no options were specified', () => { - const options = getWatchOptionsForQuery(undefined, action); + const options = getWatchOptionsForQuery(undefined, fetchType, resource, params); expect(options).toEqual(defaultWatchOptions); }); @@ -17,7 +19,7 @@ describe('getWatchOptionsForQuery', () => { pollInterval: 10000, noFetch: true, }; - const options = getWatchOptionsForQuery(userOptions, action); + const options = getWatchOptionsForQuery(userOptions, fetchType, resource, params); expect(options).toEqual(merge({}, defaultWatchOptions, userOptions)); }); @@ -35,7 +37,7 @@ describe('getWatchOptionsForQuery', () => { ...rootOptions, Post: postOptions, }; - const options = getWatchOptionsForQuery(userOptions, action); + const options = getWatchOptionsForQuery(userOptions, fetchType, resource, params); expect(options).toEqual(merge({}, defaultWatchOptions, rootOptions, postOptions)); }); @@ -60,7 +62,7 @@ describe('getWatchOptionsForQuery', () => { GET_LIST: verbOptions, }, }; - const options = getWatchOptionsForQuery(userOptions, action); + const options = getWatchOptionsForQuery(userOptions, fetchType, resource, params); expect(options).toEqual(merge({}, defaultWatchOptions, rootOptions, postOptions, verbOptions)); }); diff --git a/src/realtime/index.js b/src/realtime/index.js index 250f11a..1b00e25 100644 --- a/src/realtime/index.js +++ b/src/realtime/index.js @@ -1,3 +1,14 @@ -import sagaFactory from './saga'; +import realtimeSaga from 'aor-realtime'; +import { fork } from 'redux-saga/effects'; -export default apolloConfiguredClient => sagaFactory(apolloConfiguredClient); +import getWatchOptionsForQuery from './getWatchOptionsForQuery'; + +export default (apolloConfiguredClient, apolloWatchOptions) => + function* aorGraphQlSaga() { + const observeQuery = (fetchType, resource, params) => { + const watchOptions = getWatchOptionsForQuery(apolloWatchOptions, fetchType, resource, params); + return apolloConfiguredClient.watchRequest(fetchType, resource, params, watchOptions); + }; + + yield fork(realtimeSaga(observeQuery)); + }; diff --git a/src/realtime/queryObserver.js b/src/realtime/queryObserver.js deleted file mode 100644 index d134205..0000000 --- a/src/realtime/queryObserver.js +++ /dev/null @@ -1,13 +0,0 @@ -import { END } from 'redux-saga'; - -export default emitter => ({ - complete() { - emitter(END); - }, - error() { - emitter(END); - }, - next(apolloQueryResult) { - emitter(apolloQueryResult); - }, -}); diff --git a/src/realtime/queryObserver.spec.js b/src/realtime/queryObserver.spec.js deleted file mode 100644 index 9403966..0000000 --- a/src/realtime/queryObserver.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -import expect, { createSpy } from 'expect'; -import { END } from 'redux-saga'; - -import queryObserver from './queryObserver'; - -describe('realtime', () => { - describe('queryObserver', () => { - const emitter = createSpy(); - - it('calls emitter with END when calling complete', () => { - queryObserver(emitter).complete(); - - expect(emitter).toHaveBeenCalledWith(END); - }); - - it('calls emitter with END when calling error', () => { - queryObserver(emitter).error(); - - expect(emitter).toHaveBeenCalledWith(END); - }); - - it('calls emitter with apolloQueryResult when calling next', () => { - const expected = 'apollo query result'; - queryObserver(emitter).next(expected); - - expect(emitter).toHaveBeenCalledWith(expected); - }); - }); -}); diff --git a/src/realtime/saga.js b/src/realtime/saga.js deleted file mode 100644 index ca7b285..0000000 --- a/src/realtime/saga.js +++ /dev/null @@ -1,41 +0,0 @@ -import { LOCATION_CHANGE } from 'react-router-redux'; -import { takeLatest, call, put, take } from 'redux-saga/effects'; -import { CRUD_GET_LIST, CRUD_GET_ONE, FETCH_START, FETCH_END } from 'admin-on-rest'; -import omit from 'lodash.omit'; - -import buildAorAction from './buildAorAction'; -import createApolloQueryChannel from './createApolloQueryChannel'; -import getWatchOptionsForQuery from './getWatchOptionsForQuery'; - -export const watchCrudActionsFactory = (apolloConfiguredClient, apolloWatchOptions) => - function* watchCrudActions(action) { - const watchOptions = yield call(getWatchOptionsForQuery, apolloWatchOptions, action); - const { payload: params, meta: { fetch: fetchType, resource } } = action; - const watcher = yield call(apolloConfiguredClient.watchRequest, fetchType, resource, params, watchOptions); - const apolloQueryChannel = yield call(createApolloQueryChannel, watcher); - - while (true) { // eslint-disable-line - const parsedApolloQueryResult = yield take(apolloQueryChannel); - const { type, payload, meta } = action; - - yield [ - put({ type: `${type}_LOADING`, payload, meta: omit(meta, 'fetch') }), - put({ type: FETCH_START }), - ]; - - const aorAction = yield call(buildAorAction, action, parsedApolloQueryResult); - - yield put(aorAction); - - yield put({ type: FETCH_END }); - } - }; - -export const watchLocationChangeFactory = watchCrudActions => function* watchLocationChange() { - yield takeLatest([CRUD_GET_LIST, CRUD_GET_ONE], watchCrudActions); -}; - -export default (apolloConfiguredClient, apolloWatchOptions) => function* aorGraphQlSaga() { - const watchCrudActions = watchCrudActionsFactory(apolloConfiguredClient, apolloWatchOptions); - yield takeLatest(LOCATION_CHANGE, watchLocationChangeFactory(watchCrudActions)); -}; diff --git a/yarn.lock b/yarn.lock index f12a828..63d4ac6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -108,6 +108,19 @@ anymatch@^1.3.0: arrify "^1.0.0" micromatch "^2.1.5" +aor-realtime@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/aor-realtime/-/aor-realtime-0.0.1.tgz#22b137d478946a2dcadbc10c99694bbe9ddd93d4" + dependencies: + babel-plugin-transform-runtime "~6.23.0" + lodash.merge "~4.6.0" + lodash.omit "~4.5.0" + lodash.pick "~4.4.0" + lodash.pickby "~4.6.0" + react-router "~4.1.1" + react-router-redux "~5.0.0-alpha.5" + redux-saga "~0.14.6" + apollo-client@~1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-1.2.1.tgz#927564d4fbd5cafd8ed2add842fd77ca80391cef" @@ -226,13 +239,13 @@ aws4@^1.2.1: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" -babel-cli@~6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.23.0.tgz#52ff946a2b0f64645c35e7bd5eea267aa0948c0f" +babel-cli@~6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.24.1.tgz#207cd705bba61489b2ea41b5312341cf6aca2283" dependencies: - babel-core "^6.23.0" + babel-core "^6.24.1" babel-polyfill "^6.23.0" - babel-register "^6.23.0" + babel-register "^6.24.1" babel-runtime "^6.22.0" commander "^2.8.1" convert-source-map "^1.1.0" @@ -255,31 +268,7 @@ babel-code-frame@6.22.0, babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: esutils "^2.0.2" js-tokens "^3.0.0" -babel-core@^6.23.0, babel-core@~6.23.1: - version "6.23.1" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.23.1.tgz#c143cb621bb2f621710c220c5d579d15b8a442df" - dependencies: - babel-code-frame "^6.22.0" - babel-generator "^6.23.0" - babel-helpers "^6.23.0" - babel-messages "^6.23.0" - babel-register "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.23.0" - babel-traverse "^6.23.1" - babel-types "^6.23.0" - babylon "^6.11.0" - convert-source-map "^1.1.0" - debug "^2.1.1" - json5 "^0.5.0" - lodash "^4.2.0" - minimatch "^3.0.2" - path-is-absolute "^1.0.0" - private "^0.1.6" - slash "^1.0.0" - source-map "^0.5.0" - -babel-core@^6.24.1: +babel-core@^6.24.1, babel-core@~6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.24.1.tgz#8c428564dce1e1f41fb337ec34f4c3b022b5ad83" dependencies: @@ -312,7 +301,7 @@ babel-eslint@7.2.3: babel-types "^6.23.0" babylon "^6.17.0" -babel-generator@^6.18.0, babel-generator@^6.23.0, babel-generator@^6.24.1: +babel-generator@^6.18.0, babel-generator@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.1.tgz#e715f486c58ded25649d888944d52aa07c5d9497" dependencies: @@ -436,7 +425,7 @@ babel-helper-replace-supers@^6.24.1: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-helpers@^6.23.0, babel-helpers@^6.24.1: +babel-helpers@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" dependencies: @@ -455,13 +444,13 @@ babel-plugin-check-es2015-constants@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-istanbul@~4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.0.0.tgz#36bde8fbef4837e5ff0366531a2beabd7b1ffa10" +babel-plugin-istanbul@~4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.3.tgz#6ee6280410dcf59c7747518c3dfd98680958f102" dependencies: find-up "^2.1.0" - istanbul-lib-instrument "^1.4.2" - test-exclude "^4.0.0" + istanbul-lib-instrument "^1.7.1" + test-exclude "^4.1.0" babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" @@ -573,7 +562,7 @@ babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-block-scoping@^6.22.0: +babel-plugin-transform-es2015-block-scoping@^6.24.1: 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: @@ -583,7 +572,7 @@ babel-plugin-transform-es2015-block-scoping@^6.22.0: babel-types "^6.24.1" lodash "^4.2.0" -babel-plugin-transform-es2015-classes@^6.22.0: +babel-plugin-transform-es2015-classes@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" dependencies: @@ -597,7 +586,7 @@ babel-plugin-transform-es2015-classes@^6.22.0: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-computed-properties@^6.22.0: +babel-plugin-transform-es2015-computed-properties@^6.24.1: 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: @@ -610,7 +599,7 @@ babel-plugin-transform-es2015-destructuring@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-duplicate-keys@^6.22.0: +babel-plugin-transform-es2015-duplicate-keys@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" dependencies: @@ -623,7 +612,7 @@ babel-plugin-transform-es2015-for-of@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-function-name@^6.22.0: +babel-plugin-transform-es2015-function-name@^6.24.1: 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: @@ -637,7 +626,7 @@ babel-plugin-transform-es2015-literals@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: +babel-plugin-transform-es2015-modules-amd@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" dependencies: @@ -645,7 +634,7 @@ babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015 babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-modules-commonjs@^6.22.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: +babel-plugin-transform-es2015-modules-commonjs@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" dependencies: @@ -654,7 +643,7 @@ babel-plugin-transform-es2015-modules-commonjs@^6.22.0, babel-plugin-transform-e babel-template "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-modules-systemjs@^6.22.0: +babel-plugin-transform-es2015-modules-systemjs@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" dependencies: @@ -662,7 +651,7 @@ babel-plugin-transform-es2015-modules-systemjs@^6.22.0: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-modules-umd@^6.22.0: +babel-plugin-transform-es2015-modules-umd@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" dependencies: @@ -670,14 +659,14 @@ babel-plugin-transform-es2015-modules-umd@^6.22.0: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-object-super@^6.22.0: +babel-plugin-transform-es2015-object-super@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" dependencies: babel-helper-replace-supers "^6.24.1" babel-runtime "^6.22.0" -babel-plugin-transform-es2015-parameters@^6.22.0: +babel-plugin-transform-es2015-parameters@^6.24.1: 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: @@ -688,7 +677,7 @@ babel-plugin-transform-es2015-parameters@^6.22.0: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-shorthand-properties@^6.22.0: +babel-plugin-transform-es2015-shorthand-properties@^6.24.1: 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: @@ -701,7 +690,7 @@ babel-plugin-transform-es2015-spread@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-sticky-regex@^6.22.0: +babel-plugin-transform-es2015-sticky-regex@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" dependencies: @@ -721,7 +710,7 @@ babel-plugin-transform-es2015-typeof-symbol@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-unicode-regex@^6.22.0: +babel-plugin-transform-es2015-unicode-regex@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" dependencies: @@ -758,7 +747,7 @@ babel-plugin-transform-object-rest-spread@^6.22.0: babel-plugin-syntax-object-rest-spread "^6.8.0" babel-runtime "^6.22.0" -babel-plugin-transform-regenerator@^6.22.0: +babel-plugin-transform-regenerator@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" dependencies: @@ -785,44 +774,44 @@ babel-polyfill@^6.23.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-preset-es2015@~6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.22.0.tgz#af5a98ecb35eb8af764ad8a5a05eb36dc4386835" +babel-preset-es2015@~6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" dependencies: babel-plugin-check-es2015-constants "^6.22.0" babel-plugin-transform-es2015-arrow-functions "^6.22.0" babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.22.0" - babel-plugin-transform-es2015-classes "^6.22.0" - babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.24.1" + babel-plugin-transform-es2015-classes "^6.24.1" + babel-plugin-transform-es2015-computed-properties "^6.24.1" babel-plugin-transform-es2015-destructuring "^6.22.0" - babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-duplicate-keys "^6.24.1" babel-plugin-transform-es2015-for-of "^6.22.0" - babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-function-name "^6.24.1" babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.22.0" - babel-plugin-transform-es2015-modules-commonjs "^6.22.0" - babel-plugin-transform-es2015-modules-systemjs "^6.22.0" - babel-plugin-transform-es2015-modules-umd "^6.22.0" - babel-plugin-transform-es2015-object-super "^6.22.0" - babel-plugin-transform-es2015-parameters "^6.22.0" - babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-plugin-transform-es2015-modules-systemjs "^6.24.1" + babel-plugin-transform-es2015-modules-umd "^6.24.1" + babel-plugin-transform-es2015-object-super "^6.24.1" + babel-plugin-transform-es2015-parameters "^6.24.1" + babel-plugin-transform-es2015-shorthand-properties "^6.24.1" babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.24.1" babel-plugin-transform-es2015-template-literals "^6.22.0" babel-plugin-transform-es2015-typeof-symbol "^6.22.0" - babel-plugin-transform-es2015-unicode-regex "^6.22.0" - babel-plugin-transform-regenerator "^6.22.0" + babel-plugin-transform-es2015-unicode-regex "^6.24.1" + babel-plugin-transform-regenerator "^6.24.1" -babel-preset-stage-0@~6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-preset-stage-0/-/babel-preset-stage-0-6.22.0.tgz#707eeb5b415da769eff9c42f4547f644f9296ef9" +babel-preset-stage-0@~6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz#5642d15042f91384d7e5af8bc88b1db95b039e6a" dependencies: babel-plugin-transform-do-expressions "^6.22.0" babel-plugin-transform-function-bind "^6.22.0" - babel-preset-stage-1 "^6.22.0" + babel-preset-stage-1 "^6.24.1" -babel-preset-stage-1@^6.22.0: +babel-preset-stage-1@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0" dependencies: @@ -849,7 +838,7 @@ babel-preset-stage-3@^6.24.1: babel-plugin-transform-exponentiation-operator "^6.24.1" babel-plugin-transform-object-rest-spread "^6.22.0" -babel-register@^6.23.0, babel-register@^6.24.1: +babel-register@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" dependencies: @@ -875,7 +864,7 @@ babel-runtime@~6.18.0: core-js "^2.4.0" regenerator-runtime "^0.9.5" -babel-template@^6.16.0, babel-template@^6.23.0, babel-template@^6.24.1: +babel-template@^6.16.0, babel-template@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333" dependencies: @@ -1126,7 +1115,7 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.4.6: +concat-stream@^1.5.2: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -1231,6 +1220,12 @@ debug@2.2.0: dependencies: ms "0.7.1" +debug@2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" + dependencies: + ms "0.7.2" + debug@^2.1.1, debug@^2.2.0, debug@^2.6.3: version "2.6.6" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.6.tgz#a9fa6fbe9ca43cf1e79f73b75c0189cbb7d6db5a" @@ -1292,17 +1287,24 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" -diff@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" +diff@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" -doctrine@1.5.0, doctrine@^1.2.2: +doctrine@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" dependencies: esutils "^2.0.2" isarray "^1.0.0" +doctrine@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" @@ -1453,17 +1455,18 @@ eslint-plugin-prettier@~2.0.1: dependencies: requireindex "~1.1.0" -eslint@~3.17.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.17.1.tgz#b80ae12d9c406d858406fccda627afce33ea10ea" +eslint@~3.19.0: + version "3.19.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" dependencies: babel-code-frame "^6.16.0" chalk "^1.1.3" - concat-stream "^1.4.6" + concat-stream "^1.5.2" debug "^2.1.1" - doctrine "^1.2.2" + doctrine "^2.0.0" escope "^3.6.0" espree "^3.4.0" + esquery "^1.0.0" estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" @@ -1503,6 +1506,12 @@ esprima@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" +esquery@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" + dependencies: + estraverse "^4.0.0" + esrecurse@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" @@ -1510,7 +1519,7 @@ esrecurse@^4.1.0: estraverse "~4.1.0" object-assign "^4.0.1" -estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" @@ -1794,17 +1803,6 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@7.0.5: - version "7.0.5" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@7.1.1, glob@^7.0.0, 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" @@ -2265,17 +2263,17 @@ istanbul-cobertura-badger@~1.3.0: xml-splitter "~1.2.1" xtend "~4.0.1" -istanbul-lib-coverage@^1.0.1, istanbul-lib-coverage@^1.1.0: +istanbul-lib-coverage@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.0.tgz#caca19decaef3525b5d6331d701f3f3b7ad48528" -istanbul-lib-hook@^1.0.0: +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.7.1: version "1.7.1" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.1.tgz#169e31bc62c778851a99439dd99c3cc12184d360" dependencies: @@ -2287,7 +2285,7 @@ istanbul-lib-instrument@^1.4.2: istanbul-lib-coverage "^1.1.0" semver "^5.3.0" -istanbul-lib-report@^1.0.0-alpha.3: +istanbul-lib-report@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.0.tgz#444c4ecca9afa93cf584f56b10f195bf768c0770" dependencies: @@ -2296,7 +2294,7 @@ istanbul-lib-report@^1.0.0-alpha.3: path-parse "^1.0.5" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.1.0: +istanbul-lib-source-maps@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.0.tgz#8c7706d497e26feeb6af3e0c28fd5b0669598d0e" dependencies: @@ -2306,7 +2304,7 @@ istanbul-lib-source-maps@^1.1.0: rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.0.0: +istanbul-reports@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.0.tgz#1ef3b795889219cfb5fad16365f6ce108d5f8c66" dependencies: @@ -2713,16 +2711,16 @@ mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: dependencies: minimist "0.0.8" -mocha@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.2.0.tgz#7dc4f45e5088075171a68896814e6ae9eb7a85e3" +mocha@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.3.0.tgz#d29b7428d3f52c82e2e65df1ecb7064e1aabbfb5" dependencies: browser-stdout "1.3.0" commander "2.9.0" - debug "2.2.0" - diff "1.4.0" + debug "2.6.0" + diff "3.2.0" escape-string-regexp "1.0.5" - glob "7.0.5" + glob "7.1.1" growl "1.9.2" json3 "3.3.2" lodash.create "3.1.1" @@ -2733,6 +2731,10 @@ ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + ms@0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.3.tgz#708155a5e44e33f5fd0fc53e81d0d40a91be1fff" @@ -2838,9 +2840,9 @@ 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@~10.1.2: - version "10.1.2" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-10.1.2.tgz#ea7acaa20a235210101604f4e7d56d28453b0274" +nyc@~10.3.2: + version "10.3.2" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-10.3.2.tgz#f27f4d91f2a9db36c24f574ff5c6efff0233de46" dependencies: archy "^1.0.0" arrify "^1.0.1" @@ -2852,12 +2854,12 @@ nyc@~10.1.2: find-up "^1.1.2" foreground-child "^1.5.3" glob "^7.0.6" - istanbul-lib-coverage "^1.0.1" - istanbul-lib-hook "^1.0.0" - istanbul-lib-instrument "^1.4.2" - istanbul-lib-report "^1.0.0-alpha.3" - istanbul-lib-source-maps "^1.1.0" - istanbul-reports "^1.0.0" + istanbul-lib-coverage "^1.1.0" + istanbul-lib-hook "^1.0.6" + istanbul-lib-instrument "^1.7.1" + istanbul-lib-report "^1.1.0" + istanbul-lib-source-maps "^1.2.0" + istanbul-reports "^1.1.0" md5-hex "^1.2.0" merge-source-map "^1.0.2" micromatch "^2.3.11" @@ -2866,9 +2868,9 @@ nyc@~10.1.2: rimraf "^2.5.4" signal-exit "^3.0.1" spawn-wrap "1.2.4" - test-exclude "^3.3.0" - yargs "^6.6.0" - yargs-parser "^4.0.2" + test-exclude "^4.1.0" + yargs "^7.1.0" + yargs-parser "^5.0.0" oauth-sign@~0.8.1: version "0.8.2" @@ -3235,7 +3237,7 @@ react-router-redux@~5.0.0-alpha.5: prop-types "^15.5.4" react-router "^4.1.1" -react-router@^4.1.1, react-router@~4.1.0: +react-router@^4.1.1, react-router@~4.1.0, react-router@~4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.1.1.tgz#d448f3b7c1b429a6fbb03395099949c606b1fe95" dependencies: @@ -3764,17 +3766,7 @@ tar@^2.2.1: fstream "^1.0.2" inherits "2" -test-exclude@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-3.3.0.tgz#7a17ca1239988c98367b0621456dbb7d4bc38977" - dependencies: - arrify "^1.0.1" - micromatch "^2.3.11" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" - -test-exclude@^4.0.0: +test-exclude@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.0.tgz#04ca70b7390dd38c98d4a003a173806ca7991c91" dependencies: @@ -3978,15 +3970,15 @@ yallist@^2.0.0: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" -yargs-parser@^4.0.2, yargs-parser@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" dependencies: camelcase "^3.0.0" -yargs@^6.6.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" +yargs@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" dependencies: camelcase "^3.0.0" cliui "^3.2.0" @@ -4000,7 +3992,7 @@ yargs@^6.6.0: string-width "^1.0.2" which-module "^1.0.0" y18n "^3.2.1" - yargs-parser "^4.2.0" + yargs-parser "^5.0.0" yargs@~3.10.0: version "3.10.0"