diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..5964d64 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,12 @@ +module.exports = { + "extends": "babel", + "plugins": [ + "jest", + "jasmine", + ], + "env": { + "node": true, + "jest": true, + "jasmine": true, + }, +}; diff --git a/package.json b/package.json index eb21010..c2bdae9 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,9 @@ "package": "npm run clean && npm run build && npm run bundle", "test": "jest & npm run flow", "build": "babel src --out-dir dist --ignore __tests__", - "flow": "flow check" + "flow": "flow check", + "eslint": "eslint src/ --format=codeframe", + "eslint-fix": "eslint src/ --fix --format=codeframe" }, "author": "Andrew Levine", "license": "MIT", @@ -22,6 +24,7 @@ }, "devDependencies": { "babel-cli": "^6.18.0", + "babel-eslint": "^7.1.1", "babel-plugin-transform-async-to-generator": "^6.22.0", "babel-plugin-transform-class-properties": "^6.19.0", "babel-plugin-transform-es2015-destructuring": "^6.19.0", @@ -30,6 +33,11 @@ "babel-plugin-transform-es2015-spread": "^6.8.0", "babel-plugin-transform-flow-strip-types": "^6.21.0", "babel-plugin-transform-object-rest-spread": "^6.20.2", + "eslint": "^3.18.0", + "eslint-config-babel": "^6.0.0", + "eslint-plugin-flowtype": "^2.30.3", + "eslint-plugin-jasmine": "^2.2.0", + "eslint-plugin-jest": "^19.0.1", "flow-bin": "^0.37.4", "jest": "^18.0.0" }, diff --git a/src/__tests__/logger.js b/src/__tests__/logger.js index 2129868..fa9bc16 100644 --- a/src/__tests__/logger.js +++ b/src/__tests__/logger.js @@ -1,34 +1,34 @@ // @flow -import Logger from '../logger'; +import Logger from "../logger"; -describe('Logger', () => { - beforeEach(() => { - spyOn(console, 'log'); - }); +describe("Logger", () => { + beforeEach(() => { + spyOn(console, "log"); + }); - afterEach(() => { - delete process.env.LOG_LEVEL; - }); + afterEach(() => { + delete process.env.LOG_LEVEL; + }); - it('does not log when level is not allowed', () => { - process.env.LOG_LEVEL = 'normal'; - const { log } = new Logger('test.js'); - log('foo', 'verbose'); + it("does not log when level is not allowed", () => { + process.env.LOG_LEVEL = "normal"; + const { log } = new Logger("test.js"); + log("foo", "verbose"); - expect(console.log).toHaveBeenCalledTimes(0); - }); + expect(console.log).toHaveBeenCalledTimes(0); + }); - it('logs when level is allowed', () => { - process.env.LOG_LEVEL = 'verbose'; - const { log } = new Logger('test.js'); - log('foo', 'verbose'); + it("logs when level is allowed", () => { + process.env.LOG_LEVEL = "verbose"; + const { log } = new Logger("test.js"); + log("foo", "verbose"); - expect(console.log).toHaveBeenCalledTimes(1); - }); + expect(console.log).toHaveBeenCalledTimes(1); + }); - it('defaults to normal log level when not provided to `log`', () => { - const logger = new Logger('test.js'); - expect(logger.level).toBe(0); - }); + it("defaults to normal log level when not provided to `log`", () => { + const logger = new Logger("test.js"); + expect(logger.level).toBe(0); + }); }); diff --git a/src/__tests__/util.js b/src/__tests__/util.js index c08eb1b..1a0f539 100644 --- a/src/__tests__/util.js +++ b/src/__tests__/util.js @@ -1,21 +1,21 @@ -const fs = require('fs'); -const path = require('path'); -const util = require('../util'); -const diff = fs.readFileSync(path.join(__dirname, '__fixtures__/diff.txt'), 'UTF-8'); +const fs = require("fs"); +const path = require("path"); +const util = require("../util"); +const diff = fs.readFileSync(path.join(__dirname, "__fixtures__/diff.txt"), "UTF-8"); const setsAreEqual = (setA, setB) => { - const pred = val => setB.has(val); - return Array.from(setA).every(pred); + const pred = (val) => setB.has(val); + return Array.from(setA).every(pred); }; -describe('packagesFromDiff', () => { - it('should return list of package names from diff', () => { - const packages = util.packagesFromDiff(diff); - const expectedPackages = new Set([ - 'babel-types', - 'babel-plugin-transform-es2015-function-name' - ]); +describe("packagesFromDiff", () => { + it("should return list of package names from diff", () => { + const packages = util.packagesFromDiff(diff); + const expectedPackages = new Set([ + "babel-types", + "babel-plugin-transform-es2015-function-name" + ]); - expect(setsAreEqual(packages, expectedPackages)).toBe(true); - }); + expect(setsAreEqual(packages, expectedPackages)).toBe(true); + }); }); diff --git a/src/auth.js b/src/auth.js index dd1c37b..d758521 100644 --- a/src/auth.js +++ b/src/auth.js @@ -1,20 +1,20 @@ // @flow -import crypto from 'crypto'; -import timingSafeEqual from 'timing-safe-equal'; -import Logger from './logger'; +import crypto from "crypto"; +import timingSafeEqual from "timing-safe-equal"; +import Logger from "./logger"; -const { log } = new Logger('auth.js'); +const { log } = new Logger("auth.js"); exports.isValid = (rawBody: string, signature: string, secret: string): bool => { - const newSignature = crypto - .createHmac('sha1', secret) - .update(new Buffer(rawBody, 'utf-8')) - .digest('hex'); + const newSignature = crypto + .createHmac("sha1", secret) + .update(new Buffer(rawBody, "utf-8")) + .digest("hex"); - log(`Received sha was ${signature}, new sha is ${newSignature}`, 'verbose'); + log(`Received sha was ${signature}, new sha is ${newSignature}`, "verbose"); - return timingSafeEqual( + return timingSafeEqual( // Note: Should change to `Buffer.from` when AWS Lambda supports node >= 6 new Buffer(signature), new Buffer(`sha1=${newSignature}`) diff --git a/src/github.js b/src/github.js index e90b078..949c62a 100644 --- a/src/github.js +++ b/src/github.js @@ -1,39 +1,39 @@ // @flow -const got = require('got'); +const got = require("got"); -const BASE_URI = exports.BASE_URI = 'https://api.github.com'; +const BASE_URI = exports.BASE_URI = "https://api.github.com"; const headers = { - Authorization: `token ${process.env.GITHUB_API_KEY || ''}` + Authorization: `token ${process.env.GITHUB_API_KEY || ""}` }; const post = exports.post = (path: string, body: Object | Array) => { - return got.post(`${BASE_URI}${path}`, { - headers, - body: JSON.stringify(body) - }); + return got.post(`${BASE_URI}${path}`, { + headers, + body: JSON.stringify(body) + }); }; const get = exports.get = (uri: string, opts: Object) => got.get(uri, { headers, ...opts }); const del = exports.del = (path: string) => { - return got.delete(`${BASE_URI}${path}`, { - headers - }); + return got.delete(`${BASE_URI}${path}`, { + headers + }); }; exports.addIssueComment = (issueId: string | number, owner: string, repo: string, comment: string) => { - const uri = `/repos/${owner}/${repo}/issues/${issueId}/comments`; - return post(uri, { body: comment }); + const uri = `/repos/${owner}/${repo}/issues/${issueId}/comments`; + return post(uri, { body: comment }); }; exports.addLabels = (id: string | number, owner: string, repo: string, labels: Array) => { - return post(`/repos/${owner}/${repo}/issues/${id}/labels`, labels); + return post(`/repos/${owner}/${repo}/issues/${id}/labels`, labels); }; type OrgPayload = Promise>; exports.getUserOrgs = (username: string): OrgPayload => { - return get(`${BASE_URI}/users/${username}/orgs`, { json: true }) + return get(`${BASE_URI}/users/${username}/orgs`, { json: true }) .then(({ body }) => body); }; @@ -45,12 +45,12 @@ type NewIssueParams = { }; type NewIssueResponse = { html_url: string; }; exports.newIssue = ({ title, body, owner, repo }: NewIssueParams): Promise => { - console.log('posting new issue'); - return got.post(`${BASE_URI}/repos/${owner}/${repo}/issues`, { - headers, - json: true, - body: JSON.stringify({ title, body }) - }).then(({ body }) => body); + console.log("posting new issue"); + return got.post(`${BASE_URI}/repos/${owner}/${repo}/issues`, { + headers, + json: true, + body: JSON.stringify({ title, body }) + }).then(({ body }) => body); }; type CloseIssueParams = { @@ -59,9 +59,9 @@ type CloseIssueParams = { repo: string; }; exports.closeIssue = ({ id, owner, repo }: CloseIssueParams) => { - return got.patch(`${BASE_URI}/repos/${owner}/${repo}/issues/${id}`, { - body: JSON.stringify({ state: 'closed' }) - }); + return got.patch(`${BASE_URI}/repos/${owner}/${repo}/issues/${id}`, { + body: JSON.stringify({ state: "closed" }) + }); }; type IssueCommentParams = { @@ -71,8 +71,8 @@ type IssueCommentParams = { }; // https://developer.github.com/v3/issues/comments/#delete-a-comment exports.deleteIssueComment = ({ id, owner, repo }: IssueCommentParams) => { - return del(`/repos/${owner}/${repo}/issues/comments/${id}`); -} + return del(`/repos/${owner}/${repo}/issues/comments/${id}`); +}; type IssueParams = { content: string; @@ -82,12 +82,12 @@ type IssueParams = { }; // https://developer.github.com/v3/reactions/#create-reaction-for-an-issue exports.createIssueReaction = ({ content, number, owner, repo }: IssueParams) => { - return got.post(`${BASE_URI}/repos/${owner}/${repo}/issues/${number}/reactions`, { - headers: { - ...headers, - Accept: 'application/vnd.github.squirrel-girl-preview' - }, - json: true, - body: JSON.stringify({ content }) - }).then(({ body }) => body); -} + return got.post(`${BASE_URI}/repos/${owner}/${repo}/issues/${number}/reactions`, { + headers: { + ...headers, + Accept: "application/vnd.github.squirrel-girl-preview" + }, + json: true, + body: JSON.stringify({ content }) + }).then(({ body }) => body); +}; diff --git a/src/handlers/issue_comment/created.js b/src/handlers/issue_comment/created.js index cb7b688..4490066 100644 --- a/src/handlers/issue_comment/created.js +++ b/src/handlers/issue_comment/created.js @@ -1,10 +1,10 @@ // @flow -import github from '../../github'; -import Logger from '../../logger'; -import { oneLine } from 'common-tags' +import github from "../../github"; +import Logger from "../../logger"; +import { oneLine } from "common-tags"; -const { log } = new Logger('handlers/issue_comment/created.js'); +const { log } = new Logger("handlers/issue_comment/created.js"); type IssueCommentPayload = { issue: { @@ -37,63 +37,63 @@ const movedComment = (user: string, uri: string) => oneLine` `; const newIssueBody = (user: string, originalUri: string, body: string) => { - return `Original issue submitted by @${user} in ${originalUri}\n\n${body}`; + return `Original issue submitted by @${user} in ${originalUri}\n\n${body}`; }; -const isAnnoying = (body) => body === '+1' || body === '-1'; +const isAnnoying = (body) => body === "+1" || body === "-1"; // This is super messy and needs cleanup. But not tonight :D export default function({ comment, issue, repository }: IssueCommentPayload) { - if (isAnnoying(comment.body.trim())) { - log(`Removing a +1/-1 comment`, 'verbose'); - github.deleteIssueComment({ - id: comment.id, - owner: repository.owner.login, - repo: repository.name - }); - } + if (isAnnoying(comment.body.trim())) { + log("Removing a +1/-1 comment", "verbose"); + github.deleteIssueComment({ + id: comment.id, + owner: repository.owner.login, + repo: repository.name + }); + } - const [, targetRepo] = comment.body.match(reRepo) || []; - if (!targetRepo) return; + const [, targetRepo] = comment.body.match(reRepo) || []; + if (!targetRepo) return; - const username = issue.user.login; - const movingUser = comment.user.login; - github.getUserOrgs(movingUser).then(orgs => { - const isBabelMember = orgs.find(org => org.login === 'babel'); - if (!isBabelMember) { - log(`User ${movingUser} attempted to move an issue without being an org member. Rude!`, 'verbose'); - return; - } + const username = issue.user.login; + const movingUser = comment.user.login; + github.getUserOrgs(movingUser).then((orgs) => { + const isBabelMember = orgs.find((org) => org.login === "babel"); + if (!isBabelMember) { + log(`User ${movingUser} attempted to move an issue without being an org member. Rude!`, "verbose"); + return; + } - const [owner, repo] = targetRepo.split('/'); - log(`Attempting to move issue ${issue.number} to ${owner}:${repo}`, 'verbose'); + const [owner, repo] = targetRepo.split("/"); + log(`Attempting to move issue ${issue.number} to ${owner}:${repo}`, "verbose"); - return github.newIssue({ - title: issue.title, - body: newIssueBody(username, issue.html_url, issue.body), - owner, - repo - }); - }).then(res => { - if (!res) return; + return github.newIssue({ + title: issue.title, + body: newIssueBody(username, issue.html_url, issue.body), + owner, + repo + }); + }).then((res) => { + if (!res) return; - log(`Adding issue moved notification for ${issue.number}`, 'verbose'); - return github.addIssueComment( + log(`Adding issue moved notification for ${issue.number}`, "verbose"); + return github.addIssueComment( issue.number, repository.owner.login, repository.name, movedComment(username, res.html_url) ); - }).then(res => { - if (!res) return; - log(`Closing issue ${issue.number}`, 'verbose'); - return github.closeIssue({ - id: issue.number, - owner: repository.owner.login, - repo: repository.name - }); - }).catch(err => { - log(`Failed moving issue ${issue.number}. Details: ${err.message}`); + }).then((res) => { + if (!res) return; + log(`Closing issue ${issue.number}`, "verbose"); + return github.closeIssue({ + id: issue.number, + owner: repository.owner.login, + repo: repository.name }); + }).catch((err) => { + log(`Failed moving issue ${issue.number}. Details: ${err.message}`); + }); } diff --git a/src/handlers/issues/__tests__/labeled.js b/src/handlers/issues/__tests__/labeled.js index 1dbfcc8..3d31a8f 100644 --- a/src/handlers/issues/__tests__/labeled.js +++ b/src/handlers/issues/__tests__/labeled.js @@ -1,22 +1,21 @@ // @flow -import handler from '../labeled'; -import fs from 'fs'; +import handler from "../labeled"; -const wrongLabelPayload = require('./__fixtures__/other-label-added.json'); -const needsInfoPayload = require('./__fixtures__/info-label-added.json'); -jest.mock('../../../github'); +const wrongLabelPayload = require("./__fixtures__/other-label-added.json"); +const needsInfoPayload = require("./__fixtures__/info-label-added.json"); +jest.mock("../../../github"); -describe('Issue Opened Handler', () => { - it('should not add a comment if label !== "Needs Info"', () => { - handler(wrongLabelPayload); - const github = require('../../../github'); - expect(github.addIssueComment).toHaveBeenCalledTimes(0); - }); +describe("Issue Opened Handler", () => { + it("should not add a comment if label !== \"Needs Info\"", () => { + handler(wrongLabelPayload); + const github = require("../../../github"); + expect(github.addIssueComment).toHaveBeenCalledTimes(0); + }); - it('should add a comment if label === "Needs Info"', () => { - handler(needsInfoPayload); - const github = require('../../../github'); - expect(github.addIssueComment).toHaveBeenCalledTimes(1); - }); + it("should add a comment if label === \"Needs Info\"", () => { + handler(needsInfoPayload); + const github = require("../../../github"); + expect(github.addIssueComment).toHaveBeenCalledTimes(1); + }); }); diff --git a/src/handlers/issues/__tests__/opened.js b/src/handlers/issues/__tests__/opened.js index e35f0f3..ec53a0e 100644 --- a/src/handlers/issues/__tests__/opened.js +++ b/src/handlers/issues/__tests__/opened.js @@ -1,51 +1,50 @@ // @flow -import handler from '../opened'; -import fs from 'fs'; +import handler from "../opened"; -const payload = require('./__fixtures__/new-issue-opened.json'); -jest.mock('../../../github', () => ({ - getUserOrgs: jest.fn(() => Promise.resolve([])), - addIssueComment: jest.fn(() => Promise.resolve()) +const payload = require("./__fixtures__/new-issue-opened.json"); +jest.mock("../../../github", () => ({ + getUserOrgs: jest.fn(() => Promise.resolve([])), + addIssueComment: jest.fn(() => Promise.resolve()) })); -describe('Issue Opened Handler', () => { - it('Should add a new comment when an issue is opened', async () => { - await handler(payload); - const github = require('../../../github'); +describe("Issue Opened Handler", () => { + it("Should add a new comment when an issue is opened", async () => { + await handler(payload); + const github = require("../../../github"); - expect(github.addIssueComment).toHaveBeenCalledTimes(1); - }); + expect(github.addIssueComment).toHaveBeenCalledTimes(1); + }); - it('should use correct username', async () => { - await handler(payload); - const github = require('../../../github'); + it("should use correct username", async () => { + await handler(payload); + const github = require("../../../github"); // $FlowFixMe - const [[, , , msg]] = github.addIssueComment.mock.calls; - const expectedUser = payload.issue.user.login; - expect(msg).toMatch(new RegExp(`.+@${expectedUser}.+`)); - }); + const [[, , , msg]] = github.addIssueComment.mock.calls; + const expectedUser = payload.issue.user.login; + expect(msg).toMatch(new RegExp(`.+@${expectedUser}.+`)); + }); - it('should use correct repo + owner', async () => { - await handler(payload); - const github = require('../../../github'); + it("should use correct repo + owner", async () => { + await handler(payload); + const github = require("../../../github"); // $FlowFixMe - const [[, owner, repo]] = github.addIssueComment.mock.calls; - const expectedRepo = payload.repository.name; - const expectedOwner = payload.repository.owner.login; + const [[, owner, repo]] = github.addIssueComment.mock.calls; + const expectedRepo = payload.repository.name; + const expectedOwner = payload.repository.owner.login; - expect(repo).toEqual(expectedRepo); - expect(owner).toEqual(expectedOwner); - }); + expect(repo).toEqual(expectedRepo); + expect(owner).toEqual(expectedOwner); + }); - it('should use correct issue number', async () => { - await handler(payload); - const github = require('../../../github'); + it("should use correct issue number", async () => { + await handler(payload); + const github = require("../../../github"); // $FlowFixMe - const [[issue]] = github.addIssueComment.mock.calls; - expect(issue).toEqual(payload.issue.number); - }); + const [[issue]] = github.addIssueComment.mock.calls; + expect(issue).toEqual(payload.issue.number); + }); }); diff --git a/src/handlers/issues/labeled.js b/src/handlers/issues/labeled.js index 5f2ce19..e1dfa74 100644 --- a/src/handlers/issues/labeled.js +++ b/src/handlers/issues/labeled.js @@ -1,7 +1,7 @@ // @flow -import github from '../../github'; -import messages from '../../messages'; +import github from "../../github"; +import messages from "../../messages"; type LabeledIssuePayload = { issue: { @@ -18,12 +18,12 @@ type LabeledIssuePayload = { }; export default function({ label, issue, repository }: LabeledIssuePayload) { - const issueSubmitter = issue.user.login; - const { login: owner } = repository.owner; - const { name: repo } = repository; + const issueSubmitter = issue.user.login; + const { login: owner } = repository.owner; + const { name: repo } = repository; - if (label.name === 'Needs Info') { - const msg = messages.needsInfo(issueSubmitter); - github.addIssueComment(issue.number, owner, repo, msg); - } + if (label.name === "Needs Info") { + const msg = messages.needsInfo(issueSubmitter); + github.addIssueComment(issue.number, owner, repo, msg); + } } diff --git a/src/handlers/issues/opened.js b/src/handlers/issues/opened.js index 281c2ce..b203eb6 100644 --- a/src/handlers/issues/opened.js +++ b/src/handlers/issues/opened.js @@ -1,10 +1,10 @@ // @flow -import github from '../../github'; -import messages from '../../messages'; -import Logger from '../../logger'; +import github from "../../github"; +import messages from "../../messages"; +import Logger from "../../logger"; -const { log } = new Logger('issues/opened.js'); +const { log } = new Logger("issues/opened.js"); type OpenedIssuePayload = { issue: { @@ -18,22 +18,22 @@ type OpenedIssuePayload = { }; export default function({ issue, repository }: OpenedIssuePayload) { - const issueSubmitter = issue.user.login; - const { login: owner } = repository.owner; - const { name: repo } = repository; - const msg = messages.newIssue(issueSubmitter); + const issueSubmitter = issue.user.login; + const { login: owner } = repository.owner; + const { name: repo } = repository; + const msg = messages.newIssue(issueSubmitter); - log(`Checking if ${issueSubmitter} is member of Babel org`, 'verbose'); - return github.getUserOrgs(issueSubmitter).then(orgs => { - const isBabelOrgMember = orgs.filter(({ login }) => login === 'babel').length; - if (isBabelOrgMember) { - log(`User is member of Babel org. Skipping comment`, 'verbose'); - return; - }; + log(`Checking if ${issueSubmitter} is member of Babel org`, "verbose"); + return github.getUserOrgs(issueSubmitter).then((orgs) => { + const isBabelOrgMember = orgs.filter(({ login }) => login === "babel").length; + if (isBabelOrgMember) { + log("User is member of Babel org. Skipping comment", "verbose"); + return; + } - log(`User is not member of Babel org. Adding comment`, 'verbose'); - return github.addIssueComment(issue.number, owner, repo, msg); - }).catch(e => { - log(`Failed attempting to add new issue comment. Details: ${e.message}`); - }); + log("User is not member of Babel org. Adding comment", "verbose"); + return github.addIssueComment(issue.number, owner, repo, msg); + }).catch((e) => { + log(`Failed attempting to add new issue comment. Details: ${e.message}`); + }); } diff --git a/src/handlers/pull_request/opened.js b/src/handlers/pull_request/opened.js index fa5082c..c056c54 100644 --- a/src/handlers/pull_request/opened.js +++ b/src/handlers/pull_request/opened.js @@ -1,9 +1,9 @@ // @flow -import Logger from '../../logger'; -import github from '../../github'; +import Logger from "../../logger"; +import github from "../../github"; -const { log } = new Logger('pull_request/opened.js'); +const { log } = new Logger("pull_request/opened.js"); type OpenedPRPayload = { number: number; @@ -21,40 +21,41 @@ type OpenedPRPayload = { }; function issuesFromBody(body: string) { - const reFixedList = /\s+Fixed tickets\s+\|*\s(.+)/i; - const [, fixedList] = body.match(reFixedList) || []; - if (!fixedList) return []; - - const reID = /#(\d+)/g; - let val, ids = []; - while ((val = reID.exec(fixedList)) !== null) { - ids.push(val[1]); - } - - return ids; + const reFixedList = /\s+Fixed tickets\s+\|*\s(.+)/i; + const [, fixedList] = body.match(reFixedList) || []; + if (!fixedList) return []; + + const reID = /#(\d+)/g; + let val = []; + const ids = []; + while ((val = reID.exec(fixedList)) !== null) { + ids.push(val[1]); + } + + return ids; } export default function({ number, pull_request, repository }: OpenedPRPayload) { - const { body } = pull_request; - const issues = issuesFromBody(body); - if (!issues.length) { - log(`No issues found for PR #${number}`, 'verbose'); - return - } - - const { name: repo, owner: { login } } = repository; - const requests = issues.map(id => github.addLabels( + const { body } = pull_request; + const issues = issuesFromBody(body); + if (!issues.length) { + log(`No issues found for PR #${number}`, "verbose"); + return; + } + + const { name: repo, owner: { login } } = repository; + const requests = issues.map((id) => github.addLabels( id, login, repo, - ['Has PR'] + ["Has PR"] )); - const issuesStr = issues.join(', '); - log(`Sent request(s) to add labels related to PR #${number}. Issues: ${issuesStr}`, 'verbose'); - Promise.all(requests).then(() => { - log(`Submitted labels for PR ${number} on issues: ${issuesStr}`, 'verbose'); - }).catch(e => { - log(`Failed submitted labels for PR ${number} on at least one of ${issuesStr}`); - }); + const issuesStr = issues.join(", "); + log(`Sent request(s) to add labels related to PR #${number}. Issues: ${issuesStr}`, "verbose"); + Promise.all(requests).then(() => { + log(`Submitted labels for PR ${number} on issues: ${issuesStr}`, "verbose"); + }).catch((e) => { + log(`Failed submitted labels for PR ${number} on at least one of ${issuesStr}. Details: ${e.message}`); + }); } diff --git a/src/handlers/status/failure.js b/src/handlers/status/failure.js index da3c2d3..e2c6081 100644 --- a/src/handlers/status/failure.js +++ b/src/handlers/status/failure.js @@ -1,12 +1,12 @@ // @flow -import Logger from '../../logger'; -import github from '../../github'; -import { fetchBuild } from '../../travis'; -import stripIndent from 'common-tags/lib/stripIndent'; -import type { JobItem } from '../../travis'; +import Logger from "../../logger"; +import github from "../../github"; +import { fetchBuild } from "../../travis"; +import stripIndent from "common-tags/lib/stripIndent"; +import type { JobItem } from "../../travis"; -const { log } = new Logger('status/failure.js'); +const { log } = new Logger("status/failure.js"); type FailedStatusPayload = { description: string; @@ -33,37 +33,37 @@ type FailedStatusPayload = { const reBuildID = /.+\/(\d+)$/; const buildItemFailureText = (item: JobItem, owner: string, repo: string) => { - const travis = `https://travis-ci.org/${owner}/${repo}/jobs/${item.id}`; - return `* [Node v${item.config.node_js} - ${item.config.os}](${travis})`; + const travis = `https://travis-ci.org/${owner}/${repo}/jobs/${item.id}`; + return `* [Node v${item.config.node_js} - ${item.config.os}](${travis})`; }; const buildFailureMsg = (prOwner: string, failedBuilds: Array, owner, repo) => { - const failureItemsText = failedBuilds.map( - item => buildItemFailureText(item, owner, repo) - ).join('\n'); - return stripIndent` + const failureItemsText = failedBuilds.map( + (item) => buildItemFailureText(item, owner, repo) + ).join("\n"); + return stripIndent` Hey @${prOwner}! It looks like one or more of your builds have failed.` + ` I\'ve copied the relevant info below to save you some time.\n\n${failureItemsText}`; }; export default function(payload: FailedStatusPayload) { - const { repository: repo, target_url } = payload; - const [, buildID] = payload.target_url.match(reBuildID) || []; + const { repository: repo } = payload; + const [, buildID] = payload.target_url.match(reBuildID) || []; - log(`Fetching test matrix for TravisCI build #${buildID}`, 'verbose'); + log(`Fetching test matrix for TravisCI build #${buildID}`, "verbose"); - fetchBuild(repo.owner.login, repo.name, buildID).then(res => { - const failedBuilds = res.jobs.filter(build => build.state === 'failed'); - const committer = payload.commit.author.login; + fetchBuild(repo.owner.login, repo.name, buildID).then((res) => { + const failedBuilds = res.jobs.filter((build) => build.state === "failed"); + const committer = payload.commit.author.login; - log(`Adding comment for PR number ${res.build.pull_request_number}`, 'verbose'); - return github.addIssueComment( + log(`Adding comment for PR number ${res.build.pull_request_number}`, "verbose"); + return github.addIssueComment( res.build.pull_request_number, repo.owner.login, repo.name, buildFailureMsg(committer, failedBuilds, repo.owner.login, repo.name) ); - }).catch(e => { - log(`Failed fetching test matrix. Details:\n${e.message}`); - }); + }).catch((e) => { + log(`Failed fetching test matrix. Details:\n${e.message}`); + }); } diff --git a/src/index.js b/src/index.js index a819643..72493ef 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,7 @@ // @flow -import auth from './auth'; -import Logger from './logger'; +import auth from "./auth"; +import Logger from "./logger"; type InputType = { signature: string; @@ -14,34 +14,34 @@ type InputType = { type LambdaCB = (err: any, success: any) => void; -const { log } = new Logger('index.js'); +const { log } = new Logger("index.js"); exports.handler = ({ signature, data, type }: InputType, context: Object, callback: LambdaCB) => { - log('Validating auth', 'verbose'); - const isAuthValid = auth.isValid( + log("Validating auth", "verbose"); + const isAuthValid = auth.isValid( JSON.stringify(data), signature, - process.env.GITHUB_SECRET || '' + process.env.GITHUB_SECRET || "" ); - if (!isAuthValid) { - return callback(new Error('Invalid Auth')); - } + if (!isAuthValid) { + return callback(new Error("Invalid Auth")); + } - log('Auth Valid', 'verbose'); - const event = data.action || data.state || 'UNKNOWN'; - const possibleHandlerPath = `./handlers/${type}/${event}`; - let handler; + log("Auth Valid", "verbose"); + const event = data.action || data.state || "UNKNOWN"; + const possibleHandlerPath = `./handlers/${type}/${event}`; + let handler; - try { - handler = require(possibleHandlerPath); - } catch (e) { - log(`**No matching handler found for ${type}:${event}**`, 'verbose'); - log(`**Tried looking in ${possibleHandlerPath}**`, 'verbose'); - return; - } + try { + handler = require(possibleHandlerPath); + } catch (e) { + log(`**No matching handler found for ${type}:${event}**`, "verbose"); + log(`**Tried looking in ${possibleHandlerPath}**`, "verbose"); + return; + } - log(`**Invoking handler for ${type}:${event}**`); + log(`**Invoking handler for ${type}:${event}**`); // Support module.exports or transpiled `export default` - handler.default ? handler.default(data) : handler(data); + handler.default ? handler.default(data) : handler(data); }; diff --git a/src/logger.js b/src/logger.js index 28a497c..9cabadf 100644 --- a/src/logger.js +++ b/src/logger.js @@ -2,33 +2,33 @@ type LogLevel = 0 | 1; const logLevels: { [key: string]: LogLevel } = { - normal: 0, - verbose: 1 + normal: 0, + verbose: 1 }; export default class Logger { - file: string; - level: LogLevel; + file: string; + level: LogLevel; - constructor(file: string) { - this.file = file; - this.setLogLevel(); - } + constructor(file: string) { + this.file = file; + this.setLogLevel(); + } - setLogLevel() { - const LOG_LEVEL = process.env.LOG_LEVEL || 'normal'; - if (Object.keys(logLevels).indexOf(LOG_LEVEL) > -1) { - this.level = logLevels[LOG_LEVEL]; - } else { - const allowed = Object.keys(logLevels).join(', '); - throw new Error(`Invalid value for process.env.LOG_LEVEL. Value must be one of ${allowed}`); - } + setLogLevel() { + const LOG_LEVEL = process.env.LOG_LEVEL || "normal"; + if (Object.keys(logLevels).indexOf(LOG_LEVEL) > -1) { + this.level = logLevels[LOG_LEVEL]; + } else { + const allowed = Object.keys(logLevels).join(", "); + throw new Error(`Invalid value for process.env.LOG_LEVEL. Value must be one of ${allowed}`); } + } - log = (message: string, logLevel: $Enum = 'normal') => { - const level = logLevels[logLevel]; - if (level <= this.level) { - console.log(`**${this.file}: ${message}**`); - } - }; + log = (message: string, logLevel: $Enum = "normal") => { + const level = logLevels[logLevel]; + if (level <= this.level) { + console.log(`**${this.file}: ${message}**`); + } + }; } diff --git a/src/messages.js b/src/messages.js index 40eedd4..5bee6d4 100644 --- a/src/messages.js +++ b/src/messages.js @@ -1,14 +1,14 @@ // @flow -const stripIndent = require('common-tags/lib/stripIndent'); +const stripIndent = require("common-tags/lib/stripIndent"); exports.needsInfo = (username: string) => stripIndent` Hi @${username}! A maintainer of the project has notified me that you're missing some information we'll need to replicate this issue. Please understand that we receive a high volume of issues, and there are only a limited number - of volunteers that help maintain this project. The easier it is for us to decipher an issue with the info provided, - the more likely it is that we'll be able to help. + of volunteers that help maintain this project. The easier it is for us to decipher an issue with the info + provided, the more likely it is that we'll be able to help. Please make sure you have the following information documented in this ticket: @@ -17,8 +17,9 @@ exports.needsInfo = (username: string) => stripIndent` 3. The behavior you expect 4. A [short, self-contained example](http://sscce.org/) - Please provide either a link to the problem via the [\`repl\`](https://babeljs.io/repl/), or if the \`repl\` is insufficient, - a new and minimal repository with instructions on how to build/replicate the issue. + Please provide either a link to the problem via the [\`repl\`](https://babeljs.io/repl/), or if the + \`repl\` is insufficient, a new and minimal repository with instructions on how to build/replicate the + issue. `; exports.newIssue = (username: string) => stripIndent` @@ -27,6 +28,6 @@ exports.newIssue = (username: string) => stripIndent` so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack - community that typically always has someone willing to help. You can sign-up [here](https://slack.babeljs.io/) - for an invite. + community that typically always has someone willing to help. You can sign-up + [here](https://slack.babeljs.io/) for an invite. `; diff --git a/src/travis.js b/src/travis.js index 5c16128..624d767 100644 --- a/src/travis.js +++ b/src/travis.js @@ -1,12 +1,12 @@ // @flow -import got from 'got'; +import got from "got"; const headers = { - Accept: 'application/vnd.travis-ci.2+json', - 'User-Agent': 'BabelBot/1.0.0' + Accept: "application/vnd.travis-ci.2+json", + "User-Agent": "BabelBot/1.0.0" }; -const API_BASE = 'https://api.travis-ci.org'; +const API_BASE = "https://api.travis-ci.org"; export type JobItem = { id: number; @@ -28,11 +28,11 @@ type BuildBody = { export function fetchBuild(owner: string, repo: string, buildID: number | string): Promise { - return got.get(`${API_BASE}/repos/${owner}/${repo}/builds/${buildID}`, { - headers, - json: true - }).then(res => { - const body: BuildBody = res.body; - return body; - }); + return got.get(`${API_BASE}/repos/${owner}/${repo}/builds/${buildID}`, { + headers, + json: true + }).then((res) => { + const body: BuildBody = res.body; + return body; + }); } diff --git a/src/util.js b/src/util.js index 7428a5b..b9a9c4c 100644 --- a/src/util.js +++ b/src/util.js @@ -1,18 +1,18 @@ // @flow -const parseDiff = require('parse-diff'); +const parseDiff = require("parse-diff"); -const flatten = arr => [].concat.apply([], arr); +const flatten = (arr) => [].concat.apply([], arr); exports.packagesFromDiff = (diff: string) => { - const parsedDiff = parseDiff(diff); - const filesList = flatten(parsedDiff.map(piece => [piece.from, piece.to])); + const parsedDiff = parseDiff(diff); + const filesList = flatten(parsedDiff.map((piece) => [piece.from, piece.to])); - return filesList.reduce((acc, file) => { - const results = file.match(/packages\/([a-zA-Z0-9-.]+)\//) || []; - if (results.length === 2) { - acc.add(results[1]); - } - return acc; - }, new Set()); + return filesList.reduce((acc, file) => { + const results = file.match(/packages\/([a-zA-Z0-9-.]+)\//) || []; + if (results.length === 2) { + acc.add(results[1]); + } + return acc; + }, new Set()); }; diff --git a/yarn.lock b/yarn.lock index d68c06d..06b90a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,10 +16,35 @@ acorn-globals@^1.0.4: dependencies: acorn "^2.1.0" +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" + acorn@^2.1.0, acorn@^2.4.0: version "2.7.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7" +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +ajv-keywords@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" + +ajv@^4.7.0: + version "4.11.5" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.5.tgz#b6ee74657b993a01dce44b7944d56f485828d5bd" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + 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" @@ -32,7 +57,7 @@ amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" -ansi-escapes@^1.4.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" @@ -169,15 +194,7 @@ babel-cli@^6.18.0: optionalDependencies: chokidar "^1.0.0" -babel-code-frame@^6.20.0: - version "6.20.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.20.0.tgz#b968f839090f9a8bc6d41938fb96cb84f7387b26" - dependencies: - chalk "^1.1.0" - esutils "^2.0.2" - js-tokens "^2.0.0" - -babel-code-frame@^6.22.0: +babel-code-frame@^6.16.0, babel-code-frame@^6.20.0, babel-code-frame@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" dependencies: @@ -209,6 +226,16 @@ babel-core@^6.0.0, babel-core@^6.18.0: slash "^1.0.0" source-map "^0.5.0" +babel-eslint@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.1.1.tgz#8a6a884f085aa7060af69cfc77341c2f99370fb2" + dependencies: + babel-code-frame "^6.16.0" + babel-traverse "^6.15.0" + babel-types "^6.15.0" + babylon "^6.13.0" + lodash.pickby "^4.6.0" + babel-generator@^6.18.0, babel-generator@^6.21.0: version "6.21.0" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.21.0.tgz#605f1269c489a1c75deeca7ea16d43d4656c8494" @@ -433,21 +460,21 @@ babel-register@^6.18.0: mkdirp "^0.5.1" source-map-support "^0.4.2" -babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.20.0, babel-runtime@^6.9.0, babel-runtime@^6.9.1: - version "6.20.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.20.0.tgz#87300bdcf4cd770f09bf0048c64204e17806d16f" +babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.20.0, babel-runtime@^6.22.0, babel-runtime@^6.9.1: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" dependencies: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-runtime@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" +babel-runtime@^6.18.0, babel-runtime@^6.9.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.20.0.tgz#87300bdcf4cd770f09bf0048c64204e17806d16f" dependencies: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-template@^6.15.0, babel-template@^6.16.0, babel-template@^6.8.0: +babel-template@^6.15.0, babel-template@^6.16.0: version "6.16.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.16.0.tgz#e149dd1a9f03a35f817ddbc4d0481988e7ebc8ca" dependencies: @@ -457,7 +484,7 @@ babel-template@^6.15.0, babel-template@^6.16.0, babel-template@^6.8.0: babylon "^6.11.0" lodash "^4.2.0" -babel-template@^6.22.0, babel-template@^6.23.0: +babel-template@^6.22.0, babel-template@^6.23.0, babel-template@^6.8.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.23.0.tgz#04d4f270adbb3aa704a8143ae26faa529238e638" dependencies: @@ -467,21 +494,7 @@ babel-template@^6.22.0, babel-template@^6.23.0: babylon "^6.11.0" lodash "^4.2.0" -babel-traverse@^6.16.0, babel-traverse@^6.18.0, babel-traverse@^6.21.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.21.0.tgz#69c6365804f1a4f69eb1213f85b00a818b8c21ad" - dependencies: - babel-code-frame "^6.20.0" - babel-messages "^6.8.0" - babel-runtime "^6.20.0" - babel-types "^6.21.0" - babylon "^6.11.0" - debug "^2.2.0" - globals "^9.0.0" - invariant "^2.2.0" - lodash "^4.2.0" - -babel-traverse@^6.22.0, babel-traverse@^6.23.0: +babel-traverse@^6.15.0, babel-traverse@^6.16.0, babel-traverse@^6.18.0, babel-traverse@^6.21.0, babel-traverse@^6.22.0, babel-traverse@^6.23.0: version "6.23.1" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" dependencies: @@ -495,16 +508,7 @@ babel-traverse@^6.22.0, babel-traverse@^6.23.0: invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.21.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.21.0.tgz#314b92168891ef6d3806b7f7a917fdf87c11a4b2" - dependencies: - babel-runtime "^6.20.0" - esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^1.0.1" - -babel-types@^6.22.0, babel-types@^6.23.0: +babel-types@^6.15.0, babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.21.0, babel-types@^6.22.0, babel-types@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" dependencies: @@ -513,11 +517,7 @@ babel-types@^6.22.0, babel-types@^6.23.0: lodash "^4.2.0" to-fast-properties "^1.0.1" -babylon@^6.11.0, babylon@^6.13.0: - version "6.14.1" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815" - -babylon@^6.15.0: +babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0: version "6.16.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" @@ -582,6 +582,16 @@ builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" @@ -616,7 +626,7 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -645,6 +655,16 @@ ci-info@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" +circular-json@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" + +cli-cursor@^1.0.1: + 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-table@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" @@ -658,6 +678,10 @@ cli-usage@^0.1.1: marked "^0.3.6" marked-terminal "^1.6.2" +cli-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" @@ -678,6 +702,10 @@ clone@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -708,6 +736,14 @@ 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.5.2: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -750,6 +786,12 @@ cssom@0.3.x, "cssom@>= 0.3.0 < 0.4.0": dependencies: cssom "0.3.x" +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -780,6 +822,18 @@ deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" +del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -798,6 +852,13 @@ diff@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.1.0.tgz#9406c73a401e6c2b3ba901c5e2c44eb6a60c5385" +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" + duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -820,7 +881,59 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" -escape-string-regexp@^1.0.2: +es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.14" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.14.tgz#625bc9ab9cac0f6fb9dc271525823d1800b3d360" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-symbol "^3.1" + +es6-map@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -835,6 +948,80 @@ escodegen@^1.6.1: optionalDependencies: source-map "~0.2.0" +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-config-babel@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-babel/-/eslint-config-babel-6.0.0.tgz#66feedf6ce6e04abe585cec1a65b5bcc96bed50a" + +eslint-plugin-flowtype@^2.30.3: + version "2.30.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.30.3.tgz#57835d2c0ed388da7a2725803ec32af2f437c301" + dependencies: + lodash "^4.15.0" + +eslint-plugin-jasmine@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jasmine/-/eslint-plugin-jasmine-2.2.0.tgz#7135879383c39a667c721d302b9f20f0389543de" + +eslint-plugin-jest@^19.0.1: + version "19.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-19.0.1.tgz#42a420e90e81aa74e162c16166e43a31b890eece" + +eslint@^3.18.0: + version "3.18.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.18.0.tgz#647e985c4ae71502d20ac62c109f66d5104c8a4b" + dependencies: + babel-code-frame "^6.16.0" + chalk "^1.1.3" + concat-stream "^1.5.2" + debug "^2.1.1" + 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" + glob "^7.0.3" + globals "^9.14.0" + ignore "^3.2.0" + imurmurhash "^0.1.4" + inquirer "^0.12.0" + is-my-json-valid "^2.10.0" + is-resolvable "^1.0.0" + js-yaml "^3.5.1" + json-stable-stringify "^1.0.0" + levn "^0.3.0" + lodash "^4.0.0" + mkdirp "^0.5.0" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.1" + pluralize "^1.2.1" + progress "^1.1.8" + require-uncached "^1.0.2" + shelljs "^0.7.5" + strip-bom "^3.0.0" + strip-json-comments "~2.0.1" + table "^3.7.8" + text-table "~0.2.0" + user-home "^2.0.0" + +espree@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.0.tgz#41656fa5628e042878025ef467e78f125cb86e1d" + dependencies: + acorn "4.0.4" + acorn-jsx "^3.0.0" + esprima@^2.6.0, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" @@ -843,20 +1030,52 @@ esprima@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9" +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" + dependencies: + estraverse "~4.1.0" + object-assign "^4.0.1" + estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" +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" + +estraverse@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" + esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + dependencies: + d "1" + es5-ext "~0.10.14" + exec-sh@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" dependencies: merge "^1.1.3" +exit-hook@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + expand-brackets@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" @@ -893,6 +1112,20 @@ fb-watchman@^1.8.0, fb-watchman@^1.9.0: dependencies: bser "^1.0.2" +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + filename-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" @@ -921,6 +1154,15 @@ find-up@^1.0.0, find-up@^1.1.2: path-exists "^2.0.0" pinkie-promise "^2.0.0" +flat-cache@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + flow-bin@^0.37.4: version "0.37.4" resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.37.4.tgz#3d8da2ef746e80e730d166e09040f4198969b76b" @@ -1043,7 +1285,7 @@ glob@5.x, glob@^5.0.5: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.5: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: version "7.1.1" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" dependencies: @@ -1054,10 +1296,21 @@ glob@^7.0.5: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^9.0.0: +globals@^9.0.0, globals@^9.14.0: version "9.14.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + got@^6.6.3: version "6.6.3" resolved "https://registry.yarnpkg.com/got/-/got-6.6.3.tgz#ff72c56d7f040eb8918ffb80fb62bcaf489d4eec" @@ -1165,6 +1418,14 @@ iconv-lite@^0.4.13: version "0.4.15" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" +ignore@^3.2.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.6.tgz#26e8da0644be0bb4cb39516f6c79f0e0f4ffe48c" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1172,7 +1433,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -1180,6 +1441,28 @@ ini@~1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" +inquirer@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" + dependencies: + ansi-escapes "^1.1.0" + ansi-regex "^2.0.0" + chalk "^1.0.0" + cli-cursor "^1.0.1" + cli-width "^2.0.0" + figures "^1.3.5" + lodash "^4.3.0" + readline2 "^1.0.1" + run-async "^0.1.0" + rx-lite "^3.1.2" + string-width "^1.0.1" + strip-ansi "^3.0.0" + through "^2.3.6" + +interpret@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" + invariant@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" @@ -1246,13 +1529,17 @@ is-fullwidth-code-point@^1.0.0: dependencies: number-is-nan "^1.0.0" +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + is-glob@^2.0.0, is-glob@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" dependencies: is-extglob "^1.0.0" -is-my-json-valid@^2.12.4: +is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: version "2.15.0" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" dependencies: @@ -1267,6 +1554,22 @@ is-number@^2.0.2, is-number@^2.1.0: dependencies: kind-of "^3.0.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" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + is-posix-bracket@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" @@ -1283,6 +1586,12 @@ is-redirect@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" +is-resolvable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" + dependencies: + tryit "^1.0.1" + is-retry-allowed@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" @@ -1299,7 +1608,7 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" -isarray@1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -1577,7 +1886,7 @@ js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" -js-yaml@3.x: +js-yaml@3.x, js-yaml@^3.5.1: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" dependencies: @@ -1621,7 +1930,7 @@ json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" -json-stable-stringify@^1.0.0: +json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" dependencies: @@ -1667,7 +1976,7 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" -levn@~0.3.0: +levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" dependencies: @@ -1753,7 +2062,11 @@ lodash.keys@^3.0.0: lodash.isarguments "^3.0.0" lodash.isarray "^3.0.0" -lodash@^4.2.0: +lodash.pickby@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" + +lodash@^4.0.0, lodash@^4.15.0, lodash@^4.2.0, lodash@^4.3.0: version "4.17.2" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42" @@ -1843,7 +2156,7 @@ minimist@^1.1.1, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@~0.5.1: +mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -1866,6 +2179,10 @@ multimatch@^2.1.0: arrify "^1.0.0" minimatch "^3.0.0" +mute-stream@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" + nan@^2.3.0: version "2.5.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.0.tgz#aa8f1e34531d807e9e27755b234b4a6ec0c152a8" @@ -1977,6 +2294,10 @@ once@~1.3.3: dependencies: wrappy "1" +onetime@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" @@ -1984,7 +2305,7 @@ optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" -optionator@^0.8.1: +optionator@^0.8.1, optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" dependencies: @@ -2050,6 +2371,10 @@ path-is-absolute@^1.0.0: 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: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + path-parse@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" @@ -2076,6 +2401,10 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" +pluralize@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -2102,6 +2431,10 @@ process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" +progress@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + prr@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" @@ -2145,7 +2478,7 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2: +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" dependencies: @@ -2178,6 +2511,20 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" +readline2@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + mute-stream "0.0.5" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + redeyed@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a" @@ -2242,6 +2589,17 @@ 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" +require-uncached@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" @@ -2250,18 +2608,35 @@ resolve@^1.1.6: version "1.2.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" +restore-cursor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + dependencies: + exit-hook "^1.0.0" + onetime "^1.0.0" + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@~2.5.1, rimraf@~2.5.4: +rimraf@2, rimraf@^2.2.8, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@~2.5.1, rimraf@~2.5.4: version "2.5.4" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" dependencies: glob "^7.0.5" +run-async@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" + dependencies: + once "^1.3.0" + +rx-lite@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" + sane@~1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/sane/-/sane-1.4.1.tgz#88f763d74040f5f0c256b6163db399bf110ac715" @@ -2289,6 +2664,14 @@ set-immediate-shim@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" +shelljs@^0.7.5: + version "0.7.7" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + shellwords@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" @@ -2301,6 +2684,10 @@ slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" @@ -2370,6 +2757,13 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" +string-width@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^3.0.0" + string.prototype.codepointat@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/string.prototype.codepointat/-/string.prototype.codepointat-0.2.0.tgz#6b26e9bd3afcaa7be3b4269b526de1b82000ac78" @@ -2394,10 +2788,18 @@ strip-bom@^2.0.0: dependencies: is-utf8 "^0.2.0" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + strip-json-comments@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" +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" + supports-color@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a" @@ -2416,6 +2818,17 @@ supports-color@^3.1.2: version "3.2.0" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.0.tgz#2183fcd165fc30048b3421aad29ada7a339ea566" +table@^3.7.8: + version "3.8.3" + resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + tar-pack@~3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.3.0.tgz#30931816418f55afc4d21775afdd6720cee45dae" @@ -2447,10 +2860,18 @@ test-exclude@^3.2.2: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + throat@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6" +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + timed-out@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-3.1.0.tgz#43b98b14bb712c9161c28f4dc1f3068d67a04ec2" @@ -2477,6 +2898,10 @@ tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" +tryit@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" + tunnel-agent@~0.4.1: version "0.4.3" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" @@ -2491,6 +2916,10 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + uglify-js@^2.6: version "2.7.5" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8" @@ -2522,6 +2951,12 @@ user-home@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" +user-home@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" + dependencies: + os-homedir "^1.0.0" + util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -2630,6 +3065,12 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + "xml-name-validator@>= 2.0.1 < 3.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635"