diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..3898113a --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "arrowParens": "always", + "printWidth": 120, + "singleQuote": true +} diff --git a/examples/github/index.js b/examples/github/index.js index f4a0b81f..ef9a0cc7 100644 --- a/examples/github/index.js +++ b/examples/github/index.js @@ -5,27 +5,30 @@ import { normalize } from '../../src'; import path from 'path'; let data = ''; -const request = https.request({ - host: 'api.github.com', - path: '/repos/paularmstrong/normalizr/issues', - method: 'get', - headers: { - 'user-agent': 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)' - } -}, (res) => { - res.on('data', (d) => { - data += d; - }); +const request = https.request( + { + host: 'api.github.com', + path: '/repos/paularmstrong/normalizr/issues', + method: 'get', + headers: { + 'user-agent': 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)' + } + }, + (res) => { + res.on('data', (d) => { + data += d; + }); - res.on('end', () => { - const normalizedData = normalize(JSON.parse(data), schema.issueOrPullRequest); - const out = JSON.stringify(normalizedData, null, 2); - fs.writeFileSync(path.resolve(__dirname, './output.json'), out); - }); + res.on('end', () => { + const normalizedData = normalize(JSON.parse(data), schema.issueOrPullRequest); + const out = JSON.stringify(normalizedData, null, 2); + fs.writeFileSync(path.resolve(__dirname, './output.json'), out); + }); - res.on('error', (e) => { - console.log(e); - }); -}); + res.on('error', (e) => { + console.log(e); + }); + } +); request.end(); diff --git a/examples/github/schema.js b/examples/github/schema.js index f1c0645e..ace18c43 100644 --- a/examples/github/schema.js +++ b/examples/github/schema.js @@ -10,7 +10,7 @@ export const milestone = new schema.Entity('milestones', { export const issue = new schema.Entity('issues', { assignee: user, - assignees: [ user ], + assignees: [user], labels: label, milestone, user @@ -18,13 +18,16 @@ export const issue = new schema.Entity('issues', { export const pullRequest = new schema.Entity('pullRequests', { assignee: user, - assignees: [ user ], + assignees: [user], labels: label, milestone, user }); -export const issueOrPullRequest = new schema.Array({ - issues: issue, - pullRequests: pullRequest -}, (entity) => entity.pull_request ? 'pullRequests' : 'issues'); +export const issueOrPullRequest = new schema.Array( + { + issues: issue, + pullRequests: pullRequest + }, + (entity) => (entity.pull_request ? 'pullRequests' : 'issues') +); diff --git a/examples/redux/index.js b/examples/redux/index.js index f5518479..0d843cdb 100644 --- a/examples/redux/index.js +++ b/examples/redux/index.js @@ -6,189 +6,196 @@ import * as Selector from './src/redux/selectors'; const REPO = 'paularmstrong/normalizr'; const start = () => { - inquirer.prompt([ - { - type: 'input', - name: 'repo', - message: 'What is the slug of the repo you wish to browseMain?', - default: REPO, - validate: (input) => { - if (!(/^[a-zA-Z0-9]+\/[a-zA-Z0-9]+/).test(input)) { - return 'Repo slug must be in the form "user/project"'; + inquirer + .prompt([ + { + type: 'input', + name: 'repo', + message: 'What is the slug of the repo you wish to browseMain?', + default: REPO, + validate: (input) => { + if (!/^[a-zA-Z0-9]+\/[a-zA-Z0-9]+/.test(input)) { + return 'Repo slug must be in the form "user/project"'; + } + return true; } - return true; } - } - ]).then(({ repo }) => { - store.dispatch(Action.setRepo(repo)); - main(); - }); + ]) + .then(({ repo }) => { + store.dispatch(Action.setRepo(repo)); + main(); + }); }; const main = () => { - return inquirer.prompt([ - { - type: 'list', - name: 'action', - message: 'What would you like to do?', - choices: [ - 'Browse current state', - 'Get new data', - new inquirer.Separator(), - 'Quit' - ] - } - ]).then(({ action }) => { - switch (action) { - case 'Browse current state': - return browseMain(); - case 'Get new data': - return pull(); - default: - return process.exit(); - } - }); + return inquirer + .prompt([ + { + type: 'list', + name: 'action', + message: 'What would you like to do?', + choices: ['Browse current state', 'Get new data', new inquirer.Separator(), 'Quit'] + } + ]) + .then(({ action }) => { + switch (action) { + case 'Browse current state': + return browseMain(); + case 'Get new data': + return pull(); + default: + return process.exit(); + } + }); }; const browseMain = () => { - return inquirer.prompt([ - { - type: 'list', - name: 'browseMainAction', - message: 'What would you like to do?', - choices: () => { - return [ - { value: 'print', name: 'Print the entire state tree' }, - new inquirer.Separator(), - ...Object.keys(store.getState()).map((value) => ({ value, name: `Browse ${value}` })), - new inquirer.Separator(), - { value: 'main', name: 'Go Back to Main Menu' } - ]; + return inquirer + .prompt([ + { + type: 'list', + name: 'browseMainAction', + message: 'What would you like to do?', + choices: () => { + return [ + { value: 'print', name: 'Print the entire state tree' }, + new inquirer.Separator(), + ...Object.keys(store.getState()).map((value) => ({ value, name: `Browse ${value}` })), + new inquirer.Separator(), + { value: 'main', name: 'Go Back to Main Menu' } + ]; + } + } + ]) + .then((answers) => { + switch (answers.browseMainAction) { + case 'main': + return main(); + case 'print': + console.log(JSON.stringify(store.getState(), null, 2)); + return browseMain(); + default: + return browse(answers.browseMainAction); } - } - ]).then((answers) => { - switch (answers.browseMainAction) { - case 'main': - return main(); - case 'print': - console.log(JSON.stringify(store.getState(), null, 2)); - return browseMain(); - default: - return browse(answers.browseMainAction); - } - }); + }); }; const browse = (stateKey) => { - return inquirer.prompt([ - { - type: 'list', - name: 'action', - message: `Browse ${stateKey}`, - choices: [ - { value: 'count', name: 'Show # of Objects' }, - { value: 'keys', name: 'List All Keys' }, - { value: 'view', name: 'View by Key' }, - { value: 'all', name: 'View All' }, - { value: 'denormalize', name: 'Denormalize' }, - new inquirer.Separator(), - { value: 'browseMain', name: 'Go Back to Browse Menu' }, - { value: 'main', name: 'Go Back to Main Menu' } - ] - }, - { - type: 'list', - name: 'list', - message: `Select the ${stateKey} to view:`, - choices: Object.keys(store.getState()[stateKey]), - when: ({ action }) => action === 'view' - } - ]).then(({ action, list }) => { - const state = store.getState()[stateKey]; - if (list) { - console.log(JSON.stringify(state[list], null, 2)); - } - switch (action) { - case 'count': - console.log(`-> ${Object.keys(state).length} items.`); - return browse(stateKey); - case 'keys': - Object.keys(state).map((key) => console.log(key)); - return browse(stateKey); - case 'all': - console.log(JSON.stringify(state, null, 2)); - return browse(stateKey); - case 'denormalize': - return browseDenormalized(stateKey); - case 'browseMain': - return browseMain(); - case 'main': - return main(); - default: - return browse(stateKey); - } - }); + return inquirer + .prompt([ + { + type: 'list', + name: 'action', + message: `Browse ${stateKey}`, + choices: [ + { value: 'count', name: 'Show # of Objects' }, + { value: 'keys', name: 'List All Keys' }, + { value: 'view', name: 'View by Key' }, + { value: 'all', name: 'View All' }, + { value: 'denormalize', name: 'Denormalize' }, + new inquirer.Separator(), + { value: 'browseMain', name: 'Go Back to Browse Menu' }, + { value: 'main', name: 'Go Back to Main Menu' } + ] + }, + { + type: 'list', + name: 'list', + message: `Select the ${stateKey} to view:`, + choices: Object.keys(store.getState()[stateKey]), + when: ({ action }) => action === 'view' + } + ]) + .then(({ action, list }) => { + const state = store.getState()[stateKey]; + if (list) { + console.log(JSON.stringify(state[list], null, 2)); + } + switch (action) { + case 'count': + console.log(`-> ${Object.keys(state).length} items.`); + return browse(stateKey); + case 'keys': + Object.keys(state).map((key) => console.log(key)); + return browse(stateKey); + case 'all': + console.log(JSON.stringify(state, null, 2)); + return browse(stateKey); + case 'denormalize': + return browseDenormalized(stateKey); + case 'browseMain': + return browseMain(); + case 'main': + return main(); + default: + return browse(stateKey); + } + }); }; const browseDenormalized = (stateKey) => { - return inquirer.prompt([ - { - type: 'list', - name: 'selector', - message: `Denormalize a/and ${stateKey} entity`, - choices: [ - ...Object.keys(store.getState()[stateKey]), - new inquirer.Separator(), - { value: 'browse', name: 'Go Back to Browse Menu' }, - { value: 'main', name: 'Go Back to Main Menu' } - ] - } - ]).then(({ selector }) => { - switch (selector) { - case 'browse': - return browse(stateKey); - case 'main': - return main(); - default: { - const data = Selector[`select${stateKey.replace(/s$/, '')}`](store.getState(), selector); - console.log(JSON.stringify(data, null, 2)); - return browseDenormalized(stateKey); + return inquirer + .prompt([ + { + type: 'list', + name: 'selector', + message: `Denormalize a/and ${stateKey} entity`, + choices: [ + ...Object.keys(store.getState()[stateKey]), + new inquirer.Separator(), + { value: 'browse', name: 'Go Back to Browse Menu' }, + { value: 'main', name: 'Go Back to Main Menu' } + ] + } + ]) + .then(({ selector }) => { + switch (selector) { + case 'browse': + return browse(stateKey); + case 'main': + return main(); + default: { + const data = Selector[`select${stateKey.replace(/s$/, '')}`](store.getState(), selector); + console.log(JSON.stringify(data, null, 2)); + return browseDenormalized(stateKey); + } } - } - }); + }); }; const pull = () => { - return inquirer.prompt([ - { - type: 'list', - name: 'pullAction', - message: 'What data would you like to fetch?', - choices: () => { - return [ - ...Object.keys(store.getState()).map((value) => ({ value, name: value })), - new inquirer.Separator(), - { value: 'main', name: 'Go Back to Main Menu' } - ]; + return inquirer + .prompt([ + { + type: 'list', + name: 'pullAction', + message: 'What data would you like to fetch?', + choices: () => { + return [ + ...Object.keys(store.getState()).map((value) => ({ value, name: value })), + new inquirer.Separator(), + { value: 'main', name: 'Go Back to Main Menu' } + ]; + } + } + ]) + .then((answers) => { + switch (answers.pullAction) { + case 'commits': + return store.dispatch(Action.getCommits()).then(pull); + case 'issues': + return store.dispatch(Action.getIssues()).then(pull); + case 'labels': + return store.dispatch(Action.getLabels()).then(pull); + case 'milestones': + return store.dispatch(Action.getMilestones()).then(pull); + case 'pullRequests': + return store.dispatch(Action.getPullRequests()).then(pull); + case 'main': + default: + return main(); } - } - ]).then((answers) => { - switch (answers.pullAction) { - case 'commits': - return store.dispatch(Action.getCommits()).then(pull); - case 'issues': - return store.dispatch(Action.getIssues()).then(pull); - case 'labels': - return store.dispatch(Action.getLabels()).then(pull); - case 'milestones': - return store.dispatch(Action.getMilestones()).then(pull); - case 'pullRequests': - return store.dispatch(Action.getPullRequests()).then(pull); - case 'main': - default: - return main(); - } - }); + }); }; start(); diff --git a/examples/relationships/schema.js b/examples/relationships/schema.js index 45d4ae9e..c9b0d108 100644 --- a/examples/relationships/schema.js +++ b/examples/relationships/schema.js @@ -3,9 +3,9 @@ import { schema } from '../../src'; const userProcessStrategy = (value, parent, key) => { switch (key) { case 'author': - return { ...value, posts: [ parent.id ] }; + return { ...value, posts: [parent.id] }; case 'commenter': - return { ...value, comments: [ parent.id ] }; + return { ...value, comments: [parent.id] }; default: return { ...value }; } @@ -15,27 +15,35 @@ const userMergeStrategy = (entityA, entityB) => { return { ...entityA, ...entityB, - posts: [ ...(entityA.posts || []), ...(entityB.posts || []) ], - comments: [ ...(entityA.comments || []), ...(entityB.comments || []) ] + posts: [...(entityA.posts || []), ...(entityB.posts || [])], + comments: [...(entityA.comments || []), ...(entityB.comments || [])] }; }; -const user = new schema.Entity('users', {}, { - mergeStrategy: userMergeStrategy, - processStrategy: userProcessStrategy -}); +const user = new schema.Entity( + 'users', + {}, + { + mergeStrategy: userMergeStrategy, + processStrategy: userProcessStrategy + } +); -const comment = new schema.Entity('comments', { - commenter: user -}, { - processStrategy: (value, parent, key) => { - return { ...value, post: parent.id }; +const comment = new schema.Entity( + 'comments', + { + commenter: user + }, + { + processStrategy: (value, parent, key) => { + return { ...value, post: parent.id }; + } } -}); +); const post = new schema.Entity('posts', { author: user, - comments: [ comment ] + comments: [comment] }); -export default [ post ]; +export default [post]; diff --git a/package.json b/package.json index c3cff6f2..faeac986 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,8 @@ "flow": "flow src; test $? -eq 0 -o $? -eq 2", "lint": "eslint ./ --fix", "prebuild": "npm run clean", - "prepublish": "npm run build", + "precommit": "flow check && lint-staged", + "prepublishOnly": "npm run build", "test": "jest", "test:coverage": "npm run test -- --coverage && cat ./coverage/lcov.info | coveralls" }, @@ -54,10 +55,13 @@ "babel-preset-env": "^1.6.1", "coveralls": "^2.11.15", "eslint": "^3.12.2", - "flow-bin": "^0.37.1", + "flow-bin": "^0.65.0", + "husky": "^0.14.3", "immutable": "^3.8.1", "jest": "19.0.2", + "lint-staged": "^6.1.0", "npm-run-all": "^3.1.2", + "prettier": "^1.10.2", "rimraf": "^2.5.4", "rollup": "^0.54.1", "rollup-plugin-babel": "^3.0.3", @@ -67,5 +71,9 @@ "typescript-definition-tester": "0.0.5", "uglify-es": "^3.3.8" }, - "dependencies": {} + "dependencies": {}, + "lint-staged": { + "src/**/*.js": ["test", "git add"], + "*.{js,json,css,md}": ["prettier --write", "git add"] + } } diff --git a/rollup.config.js b/rollup.config.js index 197961c5..b30fa5e5 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -28,4 +28,3 @@ export default { filesize() ].filter(Boolean) }; - diff --git a/src/__tests__/index.test.js b/src/__tests__/index.test.js index f049a6f8..891fae35 100644 --- a/src/__tests__/index.test.js +++ b/src/__tests__/index.test.js @@ -2,7 +2,7 @@ import { denormalize, normalize, schema } from '../'; describe('normalize', () => { - [ 42, null, undefined, '42', () => {} ].forEach((input) => { + [42, null, undefined, '42', () => {}].forEach((input) => { it(`cannot normalize input that == ${input}`, () => { expect(() => normalize(input, new schema.Entity('test'))).toThrow(); }); @@ -15,7 +15,7 @@ describe('normalize', () => { it('normalizes entities', () => { const mySchema = new schema.Entity('tacos'); - expect(normalize([ { id: 1, type: 'foo' }, { id: 2, type: 'bar' } ], [ mySchema ])).toMatchSnapshot(); + expect(normalize([{ id: 1, type: 'foo' }, { id: 2, type: 'bar' }], [mySchema])).toMatchSnapshot(); }); it('normalizes nested entities', () => { @@ -25,7 +25,7 @@ describe('normalize', () => { }); const article = new schema.Entity('articles', { author: user, - comments: [ comment ] + comments: [comment] }); const input = { @@ -66,15 +66,15 @@ describe('normalize', () => { it('ignores null values', () => { const myEntity = new schema.Entity('myentities'); - expect(normalize([ null ], [ myEntity ])).toMatchSnapshot(); - expect(normalize([ undefined ], [ myEntity ])).toMatchSnapshot(); - expect(normalize([ false ], [ myEntity ])).toMatchSnapshot(); + expect(normalize([null], [myEntity])).toMatchSnapshot(); + expect(normalize([undefined], [myEntity])).toMatchSnapshot(); + expect(normalize([false], [myEntity])).toMatchSnapshot(); }); it('can use fully custom entity classes', () => { class MyEntity extends schema.Entity { schema = { - children: [ new schema.Entity('children') ] + children: [new schema.Entity('children')] }; getId(entity, parent, key) { @@ -96,21 +96,28 @@ describe('normalize', () => { } const mySchema = new MyEntity('food'); - expect(normalize({ - uuid: '1234', - name: 'tacos', - children: [ - { id: 4, name: 'lettuce' } - ] - }, mySchema)).toMatchSnapshot(); + expect( + normalize( + { + uuid: '1234', + name: 'tacos', + children: [{ id: 4, name: 'lettuce' }] + }, + mySchema + ) + ).toMatchSnapshot(); }); it('uses the non-normalized input when getting the ID for an entity', () => { const userEntity = new schema.Entity('users'); const idAttributeFn = jest.fn((nonNormalized, parent, key) => nonNormalized.user.id); - const recommendation = new schema.Entity('recommendations', { user: userEntity }, { - idAttribute: idAttributeFn - }); + const recommendation = new schema.Entity( + 'recommendations', + { user: userEntity }, + { + idAttribute: idAttributeFn + } + ); expect(normalize({ user: { id: '456' } }, recommendation)).toMatchSnapshot(); expect(idAttributeFn.mock.calls).toMatchSnapshot(); expect(recommendation.idAttribute).toBe(idAttributeFn); @@ -125,16 +132,15 @@ describe('normalize', () => { it('can normalize object without proper object prototype inheritance', () => { const test = { id: 1, elements: [] }; - test.elements.push(Object.assign( - Object.create(null), - { + test.elements.push( + Object.assign(Object.create(null), { id: 18, name: 'test' - } - )); + }) + ); const testEntity = new schema.Entity('test', { - elements: [ new schema.Entity('elements') ] + elements: [new schema.Entity('elements')] }); expect(() => normalize(test, testEntity)).not.toThrow(); @@ -158,7 +164,7 @@ describe('denormalize', () => { 2: { id: 2, type: 'bar' } } }; - expect(denormalize([ 1, 2 ], [ mySchema ], entities)).toMatchSnapshot(); + expect(denormalize([1, 2], [mySchema], entities)).toMatchSnapshot(); }); it('denormalizes nested entities', () => { @@ -168,7 +174,7 @@ describe('denormalize', () => { }); const article = new schema.Entity('articles', { author: user, - comments: [ comment ] + comments: [comment] }); const entities = { @@ -176,9 +182,7 @@ describe('denormalize', () => { '123': { author: '8472', body: 'This article is great.', - comments: [ - 'comment-123-4738' - ], + comments: ['comment-123-4738'], id: '123', title: 'A Great Article' } @@ -227,24 +231,28 @@ describe('denormalize', () => { it('denormalizes with function as idAttribute', () => { const normalizedData = { - 'entities': { - 'patrons': { - '1': { 'id': '1', 'guest': null, 'name': 'Esther' }, - '2': { 'id': '2', 'guest': 'guest-2-1', 'name': 'Tom' } + entities: { + patrons: { + '1': { id: '1', guest: null, name: 'Esther' }, + '2': { id: '2', guest: 'guest-2-1', name: 'Tom' } }, - 'guests': { 'guest-2-1': { 'guest_id': 1 } } + guests: { 'guest-2-1': { guest_id: 1 } } }, - 'result': [ '1', '2' ] + result: ['1', '2'] }; - const guestSchema = new schema.Entity('guests', {}, { - idAttribute: (value, parent, key) => `${key}-${parent.id}-${value.guest_id}` - }); + const guestSchema = new schema.Entity( + 'guests', + {}, + { + idAttribute: (value, parent, key) => `${key}-${parent.id}-${value.guest_id}` + } + ); const patronsSchema = new schema.Entity('patrons', { guest: guestSchema }); - expect(denormalize(normalizedData.result, [ patronsSchema ], normalizedData.entities)).toMatchSnapshot(); + expect(denormalize(normalizedData.result, [patronsSchema], normalizedData.entities)).toMatchSnapshot(); }); }); diff --git a/src/__tests__/typescript.test.js b/src/__tests__/typescript.test.js index 85b9f0a2..10c4f8f1 100644 --- a/src/__tests__/typescript.test.js +++ b/src/__tests__/typescript.test.js @@ -4,10 +4,6 @@ import { compileDirectory } from 'typescript-definition-tester'; describe('TypeScript definitions', () => { it('compile against index.d.ts', (done) => { - compileDirectory( - path.resolve(__dirname, 'typescript'), - (fileName) => fileName.match(/\.ts$/), - done - ); + compileDirectory(path.resolve(__dirname, 'typescript'), (fileName) => fileName.match(/\.ts$/), done); }); }); diff --git a/src/index.js b/src/index.js index 8433441f..9ed7617b 100644 --- a/src/index.js +++ b/src/index.js @@ -108,9 +108,7 @@ const getEntities = (entities) => { return entityOrId; } - return isImmutable ? - entities.getIn([ schemaKey, entityOrId.toString() ]) : - entities[schemaKey][entityOrId]; + return isImmutable ? entities.getIn([schemaKey, entityOrId.toString()]) : entities[schemaKey][entityOrId]; }; }; diff --git a/src/schemas/Array.js b/src/schemas/Array.js index 24af96ae..ca8f3cd5 100644 --- a/src/schemas/Array.js +++ b/src/schemas/Array.js @@ -9,7 +9,7 @@ const validateSchema = (definition) => { return definition[0]; }; -const getValues = (input) => Array.isArray(input) ? input : Object.keys(input).map((key) => input[key]); +const getValues = (input) => (Array.isArray(input) ? input : Object.keys(input).map((key) => input[key])); export const normalize = (schema, input, parent, key, visit, addEntity) => { schema = validateSchema(schema); @@ -23,22 +23,19 @@ export const normalize = (schema, input, parent, key, visit, addEntity) => { export const denormalize = (schema, input, unvisit) => { schema = validateSchema(schema); - return (input && input.map) ? - input.map((entityOrId) => unvisit(entityOrId, schema)) : - input; + return input && input.map ? input.map((entityOrId) => unvisit(entityOrId, schema)) : input; }; export default class ArraySchema extends PolymorphicSchema { normalize(input, parent, key, visit, addEntity) { const values = getValues(input); - return values.map((value, index) => this.normalizeValue(value, parent, key, visit, addEntity)) + return values + .map((value, index) => this.normalizeValue(value, parent, key, visit, addEntity)) .filter((value) => value !== undefined && value !== null); } denormalize(input, unvisit) { - return (input && input.map) ? - input.map((value) => this.denormalizeValue(value, unvisit)) : - input; + return input && input.map ? input.map((value) => this.denormalizeValue(value, unvisit)) : input; } } diff --git a/src/schemas/ImmutableUtils.js b/src/schemas/ImmutableUtils.js index bbc5da15..589c3d11 100644 --- a/src/schemas/ImmutableUtils.js +++ b/src/schemas/ImmutableUtils.js @@ -11,10 +11,12 @@ * @return {bool} */ export function isImmutable(object) { - return !!(object && typeof object.hasOwnProperty === 'function' && ( - object.hasOwnProperty('__ownerID') || // Immutable.Map - (object._map && object._map.hasOwnProperty('__ownerID')) // Immutable.Record - )); + return !!( + object && + typeof object.hasOwnProperty === 'function' && + (object.hasOwnProperty('__ownerID') || // Immutable.Map + (object._map && object._map.hasOwnProperty('__ownerID'))) + ); // Immutable.Record } /** diff --git a/src/schemas/Polymorphic.js b/src/schemas/Polymorphic.js index eda71cec..e9481969 100644 --- a/src/schemas/Polymorphic.js +++ b/src/schemas/Polymorphic.js @@ -3,9 +3,7 @@ import { isImmutable } from './ImmutableUtils'; export default class PolymorphicSchema { constructor(definition, schemaAttribute) { if (schemaAttribute) { - this._schemaAttribute = typeof schemaAttribute === 'string' ? - (input) => input[schemaAttribute] : - schemaAttribute; + this._schemaAttribute = typeof schemaAttribute === 'string' ? (input) => input[schemaAttribute] : schemaAttribute; } this.define(definition); } @@ -37,9 +35,9 @@ export default class PolymorphicSchema { return value; } const normalizedValue = visit(value, parent, key, schema, addEntity); - return this.isSingleSchema || normalizedValue === undefined || normalizedValue === null ? - normalizedValue : - { id: normalizedValue, schema: this.getSchemaAttribute(value, parent, key) }; + return this.isSingleSchema || normalizedValue === undefined || normalizedValue === null + ? normalizedValue + : { id: normalizedValue, schema: this.getSchemaAttribute(value, parent, key) }; } denormalizeValue(value, unvisit) { diff --git a/src/schemas/Values.js b/src/schemas/Values.js index 48adc5d5..52047069 100644 --- a/src/schemas/Values.js +++ b/src/schemas/Values.js @@ -4,10 +4,12 @@ export default class ValuesSchema extends PolymorphicSchema { normalize(input, parent, key, visit, addEntity) { return Object.keys(input).reduce((output, key, index) => { const value = input[key]; - return value !== undefined && value !== null ? { - ...output, - [key]: this.normalizeValue(value, input, key, visit, addEntity) - } : output; + return value !== undefined && value !== null + ? { + ...output, + [key]: this.normalizeValue(value, input, key, visit, addEntity) + } + : output; }, {}); } diff --git a/yarn.lock b/yarn.lock index 7534964c..de0c3747 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26,9 +26,9 @@ acorn@^4.0.4: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" -acorn@^5.2.1: - version "5.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822" +acorn@^5.4.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.4.1.tgz#fdc58d9d17f4a4e98d102ded826a9b9759125102" ajv-keywords@^1.0.0: version "1.5.1" @@ -41,6 +41,15 @@ ajv@^4.7.0: co "^4.6.0" json-stable-stringify "^1.0.1" +ajv@^5.1.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" @@ -59,7 +68,7 @@ ansi-align@^2.0.0: dependencies: string-width "^2.0.0" -ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: +ansi-escapes@^1.0.0, ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" @@ -75,12 +84,16 @@ 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.0.0, ansi-styles@^3.1.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" +any-observable@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.2.0.tgz#c67870058003579009083f54ac0abafb5c33d242" + anymatch@^1.3.0: version "1.3.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" @@ -88,6 +101,10 @@ anymatch@^1.3.0: micromatch "^2.1.5" normalize-path "^2.0.0" +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" + append-transform@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" @@ -178,7 +195,11 @@ aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" -aws4@^1.2.1: +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + +aws4@^1.2.1, aws4@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" @@ -224,8 +245,8 @@ babel-eslint@^7.1.1: babylon "^6.17.0" babel-generator@^6.18.0, babel-generator@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" dependencies: babel-messages "^6.23.0" babel-runtime "^6.26.0" @@ -233,7 +254,7 @@ babel-generator@^6.18.0, babel-generator@^6.26.0: detect-indent "^4.0.0" jsesc "^1.3.0" lodash "^4.17.4" - source-map "^0.5.6" + source-map "^0.5.7" trim-right "^1.0.1" babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: @@ -721,6 +742,18 @@ boom@2.x.x: dependencies: hoek "2.x.x" +boom@4.x.x: + version "4.3.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" + dependencies: + hoek "4.x.x" + +boom@5.x.x: + version "5.2.0" + resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" + dependencies: + hoek "4.x.x" + boxen@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" @@ -804,13 +837,17 @@ camelcase@^4.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" caniuse-lite@^1.0.30000792: - version "1.0.30000792" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000792.tgz#d0cea981f8118f3961471afbb43c9a1e5bbf0332" + version "1.0.30000804" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000804.tgz#8729a143d65378e8936adbb161f550e9c49fc09d" caseless@~0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + center-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" @@ -828,7 +865,7 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.1: +chalk@^2.0.1, chalk@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" dependencies: @@ -848,12 +885,23 @@ cli-boxes@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" -cli-cursor@^1.0.1: +cli-cursor@^1.0.1, cli-cursor@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" dependencies: restore-cursor "^1.0.1" +cli-spinners@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" + +cli-truncate@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" + dependencies: + slice-ansi "0.0.4" + string-width "^1.0.1" + cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" @@ -902,9 +950,9 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@^2.9.0, commander@~2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" +commander@^2.11.0, commander@^2.9.0, commander@~2.14.1: + version "2.14.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" concat-map@0.0.1: version "0.0.1" @@ -934,6 +982,15 @@ core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cosmiconfig@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" + dependencies: + is-directory "^0.3.1" + js-yaml "^3.9.0" + parse-json "^4.0.0" + require-from-string "^2.0.1" + coveralls@^2.11.15: version "2.13.3" resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.3.tgz#9ad7c2ae527417f361e8b626483f48ee92dd2bc7" @@ -965,6 +1022,12 @@ cryptiles@2.x.x: dependencies: boom "2.x.x" +cryptiles@3.x.x: + version "3.1.2" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" + dependencies: + boom "5.x.x" + cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.2" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" @@ -987,6 +1050,10 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +date-fns@^1.27.2: + version "1.29.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6" + debug@^2.1.1, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -1003,6 +1070,10 @@ decamelize@^1.0.0, decamelize@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" +dedent@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" + deep-assign@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/deep-assign/-/deep-assign-2.0.0.tgz#ebe06b1f07f08dae597620e3dd1622f371a1c572" @@ -1084,8 +1155,12 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" electron-to-chromium@^1.3.30: - version "1.3.31" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.31.tgz#00d832cba9fe2358652b0c48a8816c8e3a037e9f" + version "1.3.33" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.33.tgz#bf00703d62a7c65238136578c352d6c5c042a545" + +elegant-spinner@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" errno@^0.1.4: version "0.1.6" @@ -1093,7 +1168,7 @@ errno@^0.1.4: dependencies: prr "~1.0.1" -error-ex@^1.2.0: +error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" dependencies: @@ -1234,10 +1309,10 @@ eslint@^3.12.2: user-home "^2.0.0" espree@^3.4.0: - version "3.5.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.2.tgz#756ada8b979e9dcfcdb30aad8d1a9304a905e1ca" + version "3.5.3" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.3.tgz#931e0af64e7fbbed26b050a29daad1fc64799fa6" dependencies: - acorn "^5.2.1" + acorn "^5.4.0" acorn-jsx "^3.0.0" esprima@^2.6.0: @@ -1314,6 +1389,18 @@ execa@^0.7.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" @@ -1330,7 +1417,7 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -extend@~3.0.0: +extend@~3.0.0, extend@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" @@ -1340,10 +1427,22 @@ extglob@^0.3.1: dependencies: is-extglob "^1.0.0" -extsprintf@1.3.0, extsprintf@^1.2.0: +extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + +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-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" @@ -1360,7 +1459,7 @@ fb-watchman@^2.0.0: dependencies: bser "^2.0.0" -figures@^1.3.5: +figures@^1.3.5, figures@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" dependencies: @@ -1386,8 +1485,8 @@ fileset@^2.0.2: minimatch "^3.0.3" filesize@^3.5.6: - version "3.5.11" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.11.tgz#1919326749433bb3cf77368bd158caabcc19e9ee" + version "3.6.0" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.0.tgz#22d079615624bb6fd3c04026120628a41b3f4efa" fill-range@^2.1.0: version "2.2.3" @@ -1399,6 +1498,10 @@ fill-range@^2.1.0: repeat-element "^1.1.2" repeat-string "^1.5.2" +find-parent-dir@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -1421,9 +1524,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.37.1: - version "0.37.4" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.37.4.tgz#3d8da2ef746e80e730d166e09040f4198969b76b" +flow-bin@^0.65.0: + version "0.65.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.65.0.tgz#64ffeca27211c786e2d68508c65686ba1b8a2169" for-in@^1.0.1: version "1.0.2" @@ -1451,6 +1554,14 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" +form-data@~2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + from@~0: version "0.1.7" resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" @@ -1477,6 +1588,10 @@ get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" +get-own-enumerable-property-symbols@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz#5c4ad87f2834c4b9b4e84549dc1e0650fb38c24b" + get-stdin@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-0.1.0.tgz#5998af24aafc802d15c82c685657eeb8b10d4a91" @@ -1563,6 +1678,10 @@ handlebars@^4.0.3: optionalDependencies: uglify-js "^2.6" +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + har-validator@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" @@ -1572,6 +1691,13 @@ har-validator@~2.0.6: is-my-json-valid "^2.12.4" pinkie-promise "^2.0.0" +har-validator@~5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" + dependencies: + ajv "^5.1.0" + har-schema "^2.0.0" + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -1601,10 +1727,23 @@ hawk@~3.1.3: hoek "2.x.x" sntp "1.x.x" +hawk@~6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" + dependencies: + boom "4.x.x" + cryptiles "3.x.x" + hoek "4.x.x" + sntp "2.x.x" + hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" +hoek@4.x.x: + version "4.2.0" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d" + home-or-tmp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" @@ -1630,6 +1769,22 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +husky@^0.14.3: + version "0.14.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" + dependencies: + is-ci "^1.0.10" + normalize-path "^1.0.0" + strip-indent "^2.0.0" + iconv-lite@0.4.19: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" @@ -1646,6 +1801,16 @@ imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +indent-string@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1707,7 +1872,7 @@ is-callable@^1.1.1, is-callable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" -is-ci@^1.0.9: +is-ci@^1.0.10, is-ci@^1.0.9: version "1.1.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" dependencies: @@ -1717,6 +1882,10 @@ is-date-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" @@ -1735,6 +1904,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.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" @@ -1757,6 +1930,12 @@ is-glob@^2.0.0, is-glob@^2.0.1: dependencies: is-extglob "^1.0.0" +is-glob@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" + dependencies: + is-extglob "^2.1.1" + is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: version "2.17.1" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.17.1.tgz#3da98914a70a22f0a8563ef1511a246c6fc55471" @@ -1778,10 +1957,16 @@ is-number@^3.0.0: dependencies: kind-of "^3.0.2" -is-obj@^1.0.0: +is-obj@^1.0.0, is-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" +is-observable@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-0.2.0.tgz#b361311d83c6e5d726cabf5e250b0237106f5ae2" + dependencies: + symbol-observable "^0.2.2" + 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" @@ -1806,6 +1991,10 @@ is-primitive@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" @@ -1816,6 +2005,10 @@ is-regex@^1.0.4: dependencies: has "^1.0.1" +is-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + is-resolvable@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" @@ -1994,6 +2187,10 @@ jest-file-exists@^19.0.0: version "19.0.0" resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-19.0.0.tgz#cca2e587a11ec92e24cfeab3f8a94d657f3fceb8" +jest-get-type@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23" + jest-haste-map@^19.0.0: version "19.0.2" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-19.0.2.tgz#286484c3a16e86da7872b0877c35dce30c3d6f07" @@ -2113,6 +2310,15 @@ jest-validate@^19.0.2: leven "^2.0.0" pretty-format "^19.0.0" +jest-validate@^21.1.0: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7" + dependencies: + chalk "^2.0.1" + jest-get-type "^21.2.0" + leven "^2.1.0" + pretty-format "^21.2.1" + jest@19.0.2: version "19.0.2" resolved "https://registry.yarnpkg.com/jest/-/jest-19.0.2.tgz#b794faaf8ff461e7388f28beef559a54f20b2c10" @@ -2123,14 +2329,14 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@3.6.1, js-yaml@^3.5.1: +js-yaml@3.6.1: version "3.6.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" dependencies: argparse "^1.0.7" esprima "^2.6.0" -js-yaml@^3.7.0: +js-yaml@^3.5.1, js-yaml@^3.7.0, js-yaml@^3.9.0: version "3.10.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" dependencies: @@ -2173,6 +2379,14 @@ jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" +json-parse-better-errors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz#50183cd1b2d25275de069e9e71b467ac9eab973a" + +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -2234,7 +2448,7 @@ lcov-parse@0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" -leven@^2.0.0: +leven@^2.0.0, leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" @@ -2245,6 +2459,79 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lint-staged@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-6.1.0.tgz#28f600c10a6cbd249ceb003118a1552e53544a93" + dependencies: + app-root-path "^2.0.0" + chalk "^2.1.0" + commander "^2.11.0" + cosmiconfig "^4.0.0" + debug "^3.1.0" + dedent "^0.7.0" + execa "^0.8.0" + find-parent-dir "^0.3.0" + is-glob "^4.0.0" + jest-validate "^21.1.0" + listr "^0.13.0" + lodash "^4.17.4" + log-symbols "^2.0.0" + minimatch "^3.0.0" + npm-which "^3.0.1" + p-map "^1.1.1" + path-is-inside "^1.0.2" + pify "^3.0.0" + staged-git-files "0.0.4" + stringify-object "^3.2.0" + +listr-silent-renderer@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" + +listr-update-renderer@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz#344d980da2ca2e8b145ba305908f32ae3f4cc8a7" + dependencies: + chalk "^1.1.3" + cli-truncate "^0.2.1" + elegant-spinner "^1.0.1" + figures "^1.7.0" + indent-string "^3.0.0" + log-symbols "^1.0.2" + log-update "^1.0.2" + strip-ansi "^3.0.1" + +listr-verbose-renderer@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#8206f4cf6d52ddc5827e5fd14989e0e965933a35" + dependencies: + chalk "^1.1.3" + cli-cursor "^1.0.2" + date-fns "^1.27.2" + figures "^1.7.0" + +listr@^0.13.0: + version "0.13.0" + resolved "https://registry.yarnpkg.com/listr/-/listr-0.13.0.tgz#20bb0ba30bae660ee84cc0503df4be3d5623887d" + dependencies: + chalk "^1.1.3" + cli-truncate "^0.2.1" + figures "^1.7.0" + indent-string "^2.1.0" + is-observable "^0.2.0" + is-promise "^2.1.0" + is-stream "^1.1.0" + listr-silent-renderer "^1.1.1" + listr-update-renderer "^0.4.0" + listr-verbose-renderer "^0.4.0" + log-symbols "^1.0.2" + log-update "^1.0.2" + ora "^0.2.3" + p-map "^1.1.1" + rxjs "^5.4.2" + stream-to-observable "^0.2.0" + strip-ansi "^3.0.1" + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -2267,13 +2554,32 @@ lodash@^3.6.0: resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.3.0: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + version "4.17.5" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" log-driver@1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" +log-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" + dependencies: + chalk "^1.0.0" + +log-symbols@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + dependencies: + chalk "^2.0.1" + +log-update@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" + dependencies: + ansi-escapes "^1.0.0" + cli-cursor "^1.0.2" + longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" @@ -2327,7 +2633,7 @@ mime-db@~1.30.0: version "1.30.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" -mime-types@^2.1.12, mime-types@~2.1.7: +mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.7: version "2.1.17" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" dependencies: @@ -2339,13 +2645,13 @@ minimatch@^2.0.1: dependencies: brace-expansion "^1.0.0" -minimatch@^3.0.2, minimatch@^3.0.3, 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: brace-expansion "^1.1.7" -minimist@0.0.8, minimist@~0.0.1: +minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -2357,6 +2663,10 @@ minimist@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -2397,12 +2707,22 @@ normalize-package-data@^2.3.2: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" +normalize-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" + normalize-path@^2.0.0, normalize-path@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" dependencies: remove-trailing-separator "^1.0.1" +npm-path@^2.0.2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.4.tgz#c641347a5ff9d6a09e4d9bce5580c4f505278e64" + dependencies: + which "^1.2.10" + npm-run-all@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-3.1.2.tgz#c7e3faf4aa0a59bf0dcfc12601166151692171cf" @@ -2424,6 +2744,14 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" +npm-which@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" + dependencies: + commander "^2.9.0" + npm-path "^2.0.2" + which "^1.2.10" + 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" @@ -2432,7 +2760,7 @@ number-is-nan@^1.0.0: version "1.4.3" resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c" -oauth-sign@~0.8.1: +oauth-sign@~0.8.1, oauth-sign@~0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" @@ -2479,6 +2807,15 @@ optionator@^0.8.1, optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" +ora@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4" + dependencies: + chalk "^1.1.1" + cli-cursor "^1.0.2" + cli-spinners "^0.1.2" + object-assign "^4.0.1" + os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -2509,6 +2846,10 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" +p-map@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" + p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -2528,6 +2869,13 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + parse5@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" @@ -2546,7 +2894,7 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" -path-is-inside@^1.0.1: +path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" @@ -2572,10 +2920,18 @@ pause-stream@0.0.11: dependencies: through "~2.3" +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + pinkie-promise@^2.0.0, pinkie-promise@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -2598,12 +2954,23 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" +prettier@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.10.2.tgz#1af8356d1842276a99a5b5529c82dd9e9ad3cc93" + pretty-format@^19.0.0: version "19.0.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-19.0.0.tgz#56530d32acb98a3fa4851c4e2b9d37b420684c84" dependencies: ansi-styles "^3.0.0" +pretty-format@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.2.1.tgz#ae5407f3cf21066cd011aa1ba5fce7b6a2eddb36" + dependencies: + ansi-regex "^3.0.0" + ansi-styles "^3.2.0" + private@^0.1.6, private@^0.1.7: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -2638,6 +3005,10 @@ qs@~6.3.0: version "6.3.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" +qs@~6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" + randomatic@^1.1.3: version "1.1.7" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" @@ -2744,7 +3115,7 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@2.79.0, request@^2.79.0: +request@2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: @@ -2769,10 +3140,41 @@ request@2.79.0, request@^2.79.0: tunnel-agent "~0.4.1" uuid "^3.0.0" +request@^2.79.0: + version "2.83.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.6.0" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.1" + forever-agent "~0.6.1" + form-data "~2.3.1" + har-validator "~5.0.3" + hawk "~6.0.2" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.17" + oauth-sign "~0.8.2" + performance-now "^2.1.0" + qs "~6.5.1" + safe-buffer "^5.1.1" + stringstream "~0.0.5" + tough-cookie "~2.3.3" + tunnel-agent "^0.6.0" + uuid "^3.1.0" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" +require-from-string@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.1.tgz#c545233e9d7da6616e9d59adfb39fc9f588676ff" + require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" @@ -2860,7 +3262,13 @@ rx-lite@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" -safe-buffer@~5.1.0, safe-buffer@~5.1.1: +rxjs@^5.4.2: + version "5.5.6" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.6.tgz#e31fb96d6fd2ff1fd84bcea8ae9c02d007179c02" + dependencies: + symbol-observable "1.0.1" + +safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" @@ -2937,6 +3345,12 @@ sntp@1.x.x: dependencies: hoek "2.x.x" +sntp@2.x.x: + version "2.1.0" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" + dependencies: + hoek "4.x.x" + source-map-support@^0.4.15: version "0.4.18" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" @@ -2949,7 +3363,7 @@ source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.6: +source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -2995,12 +3409,22 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +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" + stream-combiner@~0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" dependencies: duplexer "~0.1.1" +stream-to-observable@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.2.0.tgz#59d6ea393d87c2c0ddac10aa0d561bc6ba6f0e10" + dependencies: + any-observable "^0.2.0" + string-length@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" @@ -3036,7 +3460,15 @@ string_decoder@~1.0.3: dependencies: safe-buffer "~5.1.0" -stringstream@~0.0.4: +stringify-object@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.2.tgz#9853052e5a88fb605a44cd27445aa257ad7ffbcd" + dependencies: + get-own-enumerable-property-symbols "^2.0.1" + is-obj "^1.0.1" + is-regexp "^1.0.0" + +stringstream@~0.0.4, stringstream@~0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -3066,6 +3498,10 @@ strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + 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" @@ -3086,6 +3522,14 @@ supports-color@^4.0.0: dependencies: has-flag "^2.0.0" +symbol-observable@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" + +symbol-observable@^0.2.2: + version "0.2.4" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40" + symbol-tree@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" @@ -3137,7 +3581,7 @@ to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" -tough-cookie@^2.3.2, tough-cookie@~2.3.0: +tough-cookie@^2.3.2, tough-cookie@~2.3.0, tough-cookie@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" dependencies: @@ -3151,6 +3595,12 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + tunnel-agent@~0.4.1: version "0.4.3" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" @@ -3178,14 +3628,14 @@ typescript-definition-tester@0.0.5: lodash "^3.6.0" typescript@^2.1.4: - version "2.6.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4" + version "2.7.1" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.1.tgz#bb3682c2c791ac90e7c6210b26478a8da085c359" uglify-es@^3.3.7, uglify-es@^3.3.8: - version "3.3.9" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" + version "3.3.10" + resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.10.tgz#8b0b7992cebe20edc26de1bf325cef797b8f3fa5" dependencies: - commander "~2.13.0" + commander "~2.14.1" source-map "~0.6.1" uglify-js@^2.6: @@ -3211,7 +3661,7 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -uuid@^3.0.0: +uuid@^3.0.0, uuid@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" @@ -3265,7 +3715,7 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@^1.1.1, which@^1.2.9, which@^1.3.0: +which@^1.1.1, which@^1.2.10, which@^1.2.9, which@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" dependencies: