diff --git a/.github/workflows/rollingversions-canary.yml b/.github/workflows/rollingversions-canary.yml new file mode 100644 index 0000000..3fe8e91 --- /dev/null +++ b/.github/workflows/rollingversions-canary.yml @@ -0,0 +1,40 @@ +name: Publish Canary + +on: + push: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install --frozen-lockfile + - run: yarn prettier:check + - run: yarn test + + publish-canary: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + registry-url: 'https://registry.npmjs.org' + - run: yarn install --frozen-lockfile + - run: yarn build + - run: npx rollingversions publish --canary $GITHUB_RUN_NUMBER + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/rollingversions.yml b/.github/workflows/rollingversions.yml new file mode 100644 index 0000000..441206a --- /dev/null +++ b/.github/workflows/rollingversions.yml @@ -0,0 +1,38 @@ +name: Release +on: + repository_dispatch: + types: [rollingversions_publish_approved] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install --frozen-lockfile + - run: yarn prettier:check + - run: yarn test + + publish: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + registry-url: 'https://registry.npmjs.org' + - run: yarn install --frozen-lockfile + - run: yarn build + - run: npx rollingversions publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4903918 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: Test + +on: + pull_request: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install --frozen-lockfile + - run: yarn prettier:check + - run: yarn test diff --git a/README.md b/README.md index ade9536..168bd17 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ Compile time `with` for strict mode JavaScript -[![build status](https://img.shields.io/travis/pugjs/with.svg)](http://travis-ci.org/pugjs/with) -[![Dependency Status](https://img.shields.io/david/pugjs/with.svg)](https://david-dm.org/pugjs/with) -[![NPM version](https://img.shields.io/npm/v/with.svg)](https://www.npmjs.com/package/with) +[![Build Status](https://img.shields.io/github/workflow/status/pugjs/with/Publish%20Canary/master?style=for-the-badge)](https://github.com/pugjs/with/actions?query=workflow%3A%22Publish+Canary%22) +[![Rolling Versions](https://img.shields.io/badge/Rolling%20Versions-Enabled-brightgreen?style=for-the-badge)](https://rollingversions.com/pugjs/with) +[![NPM version](https://img.shields.io/npm/v/with?style=for-the-badge)](https://www.npmjs.com/package/with) ## Installation @@ -13,9 +13,9 @@ Compile time `with` for strict mode JavaScript ## Usage ```js -var addWith = require('with') +var addWith = require('with'); -addWith('obj', 'console.log(a)') +addWith('obj', 'console.log(a)'); // => ';(function (console, a) { // console.log(a) // }("console" in obj ? obj.console : @@ -23,7 +23,7 @@ addWith('obj', 'console.log(a)') // "a" in obj ? obj.a : // typeof a !== "undefined" ? a : undefined));' -addWith('obj', 'console.log(a)', ['console']) +addWith('obj', 'console.log(a)', ['console']); // => ';(function (console, a) { // console.log(a) // }("a" in obj ? obj.a : @@ -38,26 +38,26 @@ The idea is that this is roughly equivallent to: ```js with (obj) { - src + src; } ``` -There are a few differences though. For starters, assignments to variables will always remain contained within the with block. +There are a few differences though. For starters, assignments to variables will always remain contained within the with block. e.g. ```js -var foo = 'foo' +var foo = 'foo'; with ({}) { - foo = 'bar' + foo = 'bar'; } -assert(foo === 'bar')// => This fails for compile time with but passes for native with +assert(foo === 'bar'); // => This fails for compile time with but passes for native with -var obj = {foo: 'foo'} +var obj = {foo: 'foo'}; with ({}) { - foo = 'bar' + foo = 'bar'; } -assert(obj.foo === 'bar')// => This fails for compile time with but passes for native with +assert(obj.foo === 'bar'); // => This fails for compile time with but passes for native with ``` It also makes everything be declared, so you can always do: @@ -72,16 +72,16 @@ instead of if (typeof foo === 'undefined') ``` -This is not the case if foo is in `exclude`. If a variable is excluded, we ignore it entirely. This is useful if you know a variable will be global as it can lead to efficiency improvements. +This is not the case if foo is in `exclude`. If a variable is excluded, we ignore it entirely. This is useful if you know a variable will be global as it can lead to efficiency improvements. It is also safe to use in strict mode (unlike `with`) and it minifies properly (`with` disables virtually all minification). #### Parsing Errors -with internally uses babylon to parse code passed to `addWith`. If babylon throws an error, probably due to a syntax error, `addWith` returns an error wrapping the babylon error, so you can -retrieve location information. `error.component` is `"src"` if the error is in the body or `"obj"` if it's in the object part of the with expression. `error.babylonError` is +with internally uses babylon to parse code passed to `addWith`. If babylon throws an error, probably due to a syntax error, `addWith` returns an error wrapping the babylon error, so you can +retrieve location information. `error.component` is `"src"` if the error is in the body or `"obj"` if it's in the object part of the with expression. `error.babylonError` is the error thrown from babylon. ## License - MIT +MIT diff --git a/package.json b/package.json index 8441e7e..6b99d23 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,13 @@ "description": "Compile time `with` for strict mode JavaScript", "main": "lib/index.js", "scripts": { - "prepublish": "babel -d lib src", - "test": "babel-node node_modules/mocha/bin/_mocha test/index.js -R spec" + "build": "tsc", + "postbuild": "rimraf lib/**/__tests__", + "lint": "tslint './src/**/*.{ts,tsx}' -t verbose -p .", + "prettier:write": "prettier --ignore-path .gitignore --write './**/*.{md,json,yaml,js,jsx,ts,tsx}'", + "prettier:check": "prettier --ignore-path .gitignore --list-different './**/*.{md,json,yaml,js,jsx,ts,tsx}'", + "pretest": "yarn build", + "test": "mocha test/index.js -R spec" }, "repository": { "type": "git", @@ -14,17 +19,22 @@ "author": "ForbesLindesay", "license": "MIT", "dependencies": { - "babel-runtime": "^6.11.6", - "babel-types": "^6.15.0", - "babylon": "^6.9.1", - "babylon-walk": "^1.0.2" + "@babel/parser": "^7.9.6", + "@babel/types": "^7.9.6", + "assert-never": "^1.2.1", + "babel-walk": "3.0.0-canary-5" }, "devDependencies": { - "babel-cli": "^6.14.0", - "babel-plugin-add-module-exports": "^0.2.1", - "babel-plugin-transform-runtime": "^6.15.0", - "babel-preset-es2015": "^6.14.0", + "@forbeslindesay/tsconfig": "^2.0.0", + "@types/node": "^14.0.5", "mocha": "*", + "prettier": "^2.0.5", + "rimraf": "^3.0.2", + "tslint": "^6.1.2", + "typescript": "^3.9.3", "uglify-js": "^2.6.2" + }, + "engines": { + "node": ">= 10.0.0" } -} \ No newline at end of file +} diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 0000000..a463843 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1 @@ +module.exports = require('@forbeslindesay/tsconfig/prettier'); diff --git a/src/globals.js b/src/globals.js deleted file mode 100644 index 5044356..0000000 --- a/src/globals.js +++ /dev/null @@ -1,146 +0,0 @@ -import {ancestor as walk} from 'babylon-walk'; -import * as t from 'babel-types'; -import isReferenced from './reference.js'; - -const isScope = t.isFunctionParent; -const isBlockScope = node => t.isBlockStatement(node) || isScope(node); - -const declaresArguments = node => t.isFunction(node) && !t.isArrowFunctionExpression(node); -const declaresThis = declaresArguments; - -const LOCALS_SYMBOL = Symbol('locals'); -const declareLocal = node => node[LOCALS_SYMBOL] = node[LOCALS_SYMBOL] || new Set(); -const setLocal = (node, name) => declareLocal(node).add(name); - -// First pass - -function declareFunction(node) { - for (let param of node.params) { - declarePattern(param, node); - } - if (node.id) { - setLocal(node, node.id.name); - } -} - -function declarePattern(node, parent) { - switch (node.type) { - case 'Identifier': - setLocal(parent, node.name); - break; - case 'ObjectPattern': - for (let prop of node.properties) { - declarePattern(prop.value, parent); - } - break; - case 'ArrayPattern': - for (let element of node.elements) { - if (element) declarePattern(element, parent); - } - break; - case 'RestElement': - declarePattern(node.argument, parent); - break; - case 'AssignmentPattern': - declarePattern(node.left, parent); - break; - // istanbul ignore next - default: - throw new Error('Unrecognized pattern type: ' + node.type); - } -} - -function declareModuleSpecifier(node, state, parents) { - setLocal(parents[1], node.local.name); -} - -const firstPass = { - VariableDeclaration(node, state, parents) { - let parent; - for (let i = parents.length - 2; i >= 0 && !parent; i--) { - if (node.kind === 'var' ? t.isFunctionParent(parents[i]) : isBlockScope(parents[i])) { - parent = parents[i]; - } - } - for (let declaration of node.declarations) { - declarePattern(declaration.id, parent); - } - }, - FunctionDeclaration(node, state, parents) { - let parent; - for (let i = parents.length - 2; i >= 0 && !parent; i--) { - if (isScope(parents[i])) { - parent = parents[i]; - } - } - setLocal(parent, node.id.name); - declareFunction(node); - }, - Function: declareFunction, - ClassDeclaration(node, state, parents) { - let parent; - for (let i = parents.length - 2; i >= 0 && !parent; i--) { - if (isScope(parents[i])) { - parent = parents[i]; - } - } - setLocal(parent, node.id.name); - }, - TryStatement(node) { - if (node.handler === null) return; - setLocal(node.handler, node.handler.param.name); - }, - ImportDefaultSpecifier: declareModuleSpecifier, - ImportSpecifier: declareModuleSpecifier, - ImportNamespaceSpecifier: declareModuleSpecifier -}; - -// Second pass - -const secondPass = { - Identifier(node, state, parents) { - let name = node.name; - if (name === 'undefined') return; - - const lastParent = parents[parents.length - 2]; - if (lastParent) { - if (!isReferenced(node, lastParent)) return; - - let parent; - for (let parent of parents) { - if (name === 'arguments' && declaresArguments(parent)) { - return; - } - if (parent[LOCALS_SYMBOL] && parent[LOCALS_SYMBOL].has(name)) { - return; - } - } - } - state.globals.push(node); - }, - ThisExpression(node, state, parents) { - for (let parent of parents) { - if (declaresThis(parents)) { - return; - } - } - state.globals.push(node); - } -} - -export default function findGlobals(ast) { - const globals = []; - // istanbul ignore if - if (!t.isNode(ast)) { - throw new TypeError('Source must be a Babylon AST'); - } - walk(ast, firstPass); - walk(ast, secondPass, { globals }); - const groupedGlobals = Object.create(null); - for (let node of globals) { - let name = node.type === 'ThisExpression' ? 'this' : node.name; - groupedGlobals[name] = groupedGlobals[name] || []; - groupedGlobals[name].push(node); - } - return Object.keys(groupedGlobals).sort().map(name => ({name, nodes: groupedGlobals[name]})); -} diff --git a/src/globals.ts b/src/globals.ts new file mode 100644 index 0000000..acf2916 --- /dev/null +++ b/src/globals.ts @@ -0,0 +1,195 @@ +import assertNever from 'assert-never'; +import {ancestor as walk} from 'babel-walk'; +import * as t from '@babel/types'; +import isReferenced from './reference'; + +const isScope = t.isFunctionParent; +const isBlockScope = (node: t.Node) => + t.isBlockStatement(node) || isScope(node); + +const declaresArguments = (node: t.Node) => + t.isFunction(node) && !t.isArrowFunctionExpression(node); + +const declaresThis = declaresArguments; + +const LOCALS_SYMBOL = Symbol('locals'); + +const getLocals = (node: t.Node): Set | undefined => + (node as any)[LOCALS_SYMBOL]; +const declareLocals = (node: t.Node): Set => + ((node as any)[LOCALS_SYMBOL] = (node as any)[LOCALS_SYMBOL] || new Set()); + +const setLocal = (node: t.Node, name: string) => declareLocals(node).add(name); + +// First pass + +function declareFunction(node: t.Function) { + for (const param of node.params) { + declarePattern(param, node); + } + const id = (node as t.FunctionDeclaration).id; + if (id) { + setLocal(node, id.name); + } +} + +function declarePattern(node: t.LVal, parent: t.Node) { + switch (node.type) { + case 'Identifier': + setLocal(parent, node.name); + break; + case 'ObjectPattern': + for (const prop of node.properties) { + switch (prop.type) { + case 'RestElement': + declarePattern(prop.argument, parent); + break; + case 'ObjectProperty': + declarePattern(prop.value as t.LVal, parent); + break; + default: + assertNever(prop); + break; + } + } + break; + case 'ArrayPattern': + for (const element of node.elements) { + if (element) declarePattern(element, parent); + } + break; + case 'RestElement': + declarePattern(node.argument, parent); + break; + case 'AssignmentPattern': + declarePattern(node.left, parent); + break; + // istanbul ignore next + default: + throw new Error('Unrecognized pattern type: ' + node.type); + } +} + +function declareModuleSpecifier( + node: + | t.ImportSpecifier + | t.ImportDefaultSpecifier + | t.ImportNamespaceSpecifier, + _state: unknown, + parents: t.Node[], +) { + for (let i = parents.length - 2; i >= 0; i--) { + if (isScope(parents[i])) { + setLocal(parents[i], node.local.name); + return; + } + } +} + +const firstPass = walk({ + VariableDeclaration(node, _state, parents) { + for (let i = parents.length - 2; i >= 0; i--) { + if ( + node.kind === 'var' + ? t.isFunctionParent(parents[i]) + : isBlockScope(parents[i]) + ) { + for (const declaration of node.declarations) { + declarePattern(declaration.id, parents[i]); + } + return; + } + } + }, + FunctionDeclaration(node, _state, parents) { + if (node.id) { + for (let i = parents.length - 2; i >= 0; i--) { + if (isScope(parents[i])) { + setLocal(parents[i], node.id.name); + return; + } + } + } + }, + Function: declareFunction, + ClassDeclaration(node, _state, parents) { + for (let i = parents.length - 2; i >= 0; i--) { + if (isScope(parents[i])) { + setLocal(parents[i], node.id.name); + return; + } + } + }, + TryStatement(node) { + if (node.handler === null) return; + if (node.handler.param === null) return; + declarePattern(node.handler.param, node.handler); + }, + ImportDefaultSpecifier: declareModuleSpecifier, + ImportSpecifier: declareModuleSpecifier, + ImportNamespaceSpecifier: declareModuleSpecifier, +}); + +// Second pass + +const secondPass = walk<{ + globals: (t.Identifier | t.ThisExpression)[]; +}>({ + Identifier(node, state, parents) { + const name = node.name; + if (name === 'undefined') return; + + const lastParent = parents[parents.length - 2]; + if (lastParent) { + if (!isReferenced(node, lastParent)) return; + + for (const parent of parents) { + if (name === 'arguments' && declaresArguments(parent)) { + return; + } + if (getLocals(parent)?.has(name)) { + return; + } + } + } + + state.globals.push(node); + }, + + ThisExpression(node, state, parents) { + for (const parent of parents) { + if (declaresThis(parent)) { + return; + } + } + + state.globals.push(node); + }, +}); + +export default function findGlobals(ast: t.Node) { + const globals: (t.Identifier | t.ThisExpression)[] = []; + + // istanbul ignore if + if (!t.isNode(ast)) { + throw new TypeError('Source must be a Babylon AST'); + } + + firstPass(ast, undefined); + secondPass(ast, {globals}); + + const groupedGlobals = new Map(); + for (const node of globals) { + const name: string = node.type === 'ThisExpression' ? 'this' : node.name; + const existing = groupedGlobals.get(name); + if (existing) { + existing.push(node); + } else { + groupedGlobals.set(name, [node]); + } + } + + return [...groupedGlobals] + .map(([name, nodes]) => ({name, nodes})) + .sort((a, b) => (a.name < b.name ? -1 : 1)); +} diff --git a/src/index.js b/src/index.js deleted file mode 100644 index c0336cc..0000000 --- a/src/index.js +++ /dev/null @@ -1,135 +0,0 @@ -import {parse} from 'babylon'; -import {recursive as walk} from 'babylon-walk'; -import * as t from 'babel-types'; -import detect from './globals.js'; - -const includes = (array, searchElement, fromIndex) => Array.prototype.includes.call(array, searchElement, fromIndex); - -const parseOptions = { - allowReturnOutsideFunction: true, - allowImportExportEverywhere: true -}; - -/** - * Mimic `with` as far as possible but at compile time - * - * @param {String} obj The object part of a with expression - * @param {String} src The body of the with expression - * @param {Array.} exclude A list of variable names to explicitly exclude - */ -export default function addWith(obj, src, exclude = []) { - obj = obj + ''; - src = src + ''; - - let ast; - try { - ast = parse(src, parseOptions); - } catch(e) { - throw Object.assign(new Error('Error parsing body of the with expression'), { - component: 'src', - babylonError: e - }); - } - let objAst; - try { - objAst = parse(obj, parseOptions); - } catch(e) { - throw Object.assign(new Error('Error parsing object part of the with expression'), { - component: 'obj', - babylonError: e - }); - } - exclude = new Set([ - 'undefined', - 'this', - ...exclude, - ...detect(objAst).map(g => g.name) - ]); - - const vars = new Set( - detect(ast) - .map(global => global.name) - .filter(v => !exclude.has(v)) - ); - - if (vars.size === 0) return src; - - let declareLocal = ''; - let local = 'locals_for_with'; - let result = 'result_of_with'; - if (t.isValidIdentifier(obj)) { - local = obj; - } else { - while (vars.has(local) || exclude.has(local)) { - local += '_'; - } - declareLocal = `var ${local} = (${obj});`; - } - while (vars.has(result) || exclude.has(result)) { - result += '_'; - } - - const args = [ - 'this', - ...Array.from(vars).map(v => - `${JSON.stringify(v)} in ${local} ? - ${local}.${v} : - typeof ${v} !== 'undefined' ? ${v} : undefined` - ) - ]; - - let unwrapped = unwrapReturns(ast, src, result); - - return `; - ${declareLocal} - ${unwrapped.before} - (function (${Array.from(vars).join(', ')}) { - ${unwrapped.body} - }.call(${args.join(', ')})); - ${unwrapped.after};`; -} - -const unwrapReturnsVisitors = { - Function(node, state, c) { - // returns in these functions are not applicable - }, - - ReturnStatement(node, state) { - state.hasReturn = true; - let value = ''; - if (node.argument) { - value = `value: (${state.source(node.argument)})` - } - state.replace(node, `return {${value}};`); - } -}; - -/** - * Take a self calling function, and unwrap it such that return inside the function - * results in return outside the function - * - * @param {String} src Some JavaScript code representing a self-calling function - * @param {String} result A temporary variable to store the result in - */ -function unwrapReturns(ast, src, result) { - const charArray = src.split(''); - - const state = { - hasReturn: false, - source(node) { - return src.slice(node.start, node.end); - }, - replace(node, str) { - charArray.fill('', node.start, node.end); - charArray[node.start] = str; - } - }; - - walk(ast, unwrapReturnsVisitors, state); - - return { - before: state.hasReturn ? `var ${result} = ` : '', - body: charArray.join(''), - after: state.hasReturn ? `;if (${result}) return ${result}.value` : '' - }; -} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..72dd9e2 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,154 @@ +import {parse} from '@babel/parser'; +import {recursive as walk} from 'babel-walk'; +import * as t from '@babel/types'; +import detect from './globals'; + +const parseOptions = { + allowReturnOutsideFunction: true, + allowImportExportEverywhere: true, +}; + +/** + * Mimic `with` as far as possible but at compile time + * + * @param obj The object part of a with expression + * @param src The body of the with expression + * @param exclude A list of variable names to explicitly exclude + */ +export default function addWith( + obj: string, + src: string, + exclude: string[] = [], +) { + // tslint:disable-next-line: no-parameter-reassignment + obj = obj + ''; + // tslint:disable-next-line: no-parameter-reassignment + src = src + ''; + + let ast; + try { + ast = parse(src, parseOptions); + } catch (e) { + throw Object.assign( + new Error('Error parsing body of the with expression'), + { + component: 'src', + babylonError: e, + }, + ); + } + let objAst; + try { + objAst = parse(obj, parseOptions); + } catch (e) { + throw Object.assign( + new Error('Error parsing object part of the with expression'), + { + component: 'obj', + babylonError: e, + }, + ); + } + const excludeSet = new Set([ + 'undefined', + 'this', + ...exclude, + ...detect(objAst).map((g) => g.name), + ]); + + const vars = new Set( + detect(ast) + .map((global) => global.name) + .filter((v) => !excludeSet.has(v)), + ); + + if (vars.size === 0) return src; + + let declareLocal = ''; + let local = 'locals_for_with'; + let result = 'result_of_with'; + if (t.isValidIdentifier(obj)) { + local = obj; + } else { + while (vars.has(local) || excludeSet.has(local)) { + local += '_'; + } + declareLocal = `var ${local} = (${obj});`; + } + while (vars.has(result) || excludeSet.has(result)) { + result += '_'; + } + + const args = [ + 'this', + ...Array.from(vars).map( + (v) => + `${JSON.stringify(v)} in ${local} ? + ${local}.${v} : + typeof ${v} !== 'undefined' ? ${v} : undefined`, + ), + ]; + + const unwrapped = unwrapReturns(ast, src, result); + + return `; + ${declareLocal} + ${unwrapped.before} + (function (${Array.from(vars).join(', ')}) { + ${unwrapped.body} + }.call(${args.join(', ')})); + ${unwrapped.after};`; +} + +interface UnwrapReturnsState { + hasReturn: boolean; + source(node: t.Node): string; + replace(node: t.Node, str: string): void; +} +const unwrapReturnsVisitors = walk({ + Function(_node, _state, _c) { + // returns in these functions are not applicable + }, + + ReturnStatement(node, state) { + state.hasReturn = true; + let value = ''; + if (node.argument) { + value = `value: (${state.source(node.argument)})`; + } + state.replace(node, `return {${value}};`); + }, +}); + +/** + * Take a self calling function, and unwrap it such that return inside the function + * results in return outside the function + * + * @param src Some JavaScript code representing a self-calling function + * @param result A temporary variable to store the result in + */ +function unwrapReturns(ast: t.Node, src: string, result: string) { + const charArray = src.split(''); + + const state: UnwrapReturnsState = { + hasReturn: false, + source(node) { + return src.slice(node.start!, node.end!); + }, + replace(node, str) { + charArray.fill('', node.start!, node.end!); + charArray[node.start!] = str; + }, + }; + + unwrapReturnsVisitors(ast, state); + + return { + before: state.hasReturn ? `var ${result} = ` : '', + body: charArray.join(''), + after: state.hasReturn ? `;if (${result}) return ${result}.value` : '', + }; +} + +module.exports = addWith; +module.exports.default = addWith; diff --git a/src/reference.js b/src/reference.ts similarity index 81% rename from src/reference.js rename to src/reference.ts index 1be0daa..f6231a9 100644 --- a/src/reference.js +++ b/src/reference.ts @@ -1,6 +1,6 @@ -import * as t from 'babel-types'; +import * as t from '@babel/types'; -export default function isReferenced(node, parent) { +export default function isReferenced(node: t.Node, parent: t.Node) { switch (parent.type) { // yes: { [NODE]: '' } // yes: { NODE } diff --git a/test/index.js b/test/index.js index 649aac9..72d5c9c 100644 --- a/test/index.js +++ b/test/index.js @@ -1,252 +1,283 @@ -var assert = require('assert') -var fs = require('fs') -var uglify = require('uglify-js') -var addWith = require('../src') +var assert = require('assert'); +var fs = require('fs'); +var uglify = require('uglify-js'); +var addWith = require('../'); -var outputs = [] +var outputs = []; -var sentinel = {} -var sentinel2 = {} +var sentinel = {}; +var sentinel2 = {}; function tryCatch(block) { try { - return {result: 'returned', value: block()} - } catch(e) { - return {result: 'threw', error: e} + return {result: 'returned', value: block()}; + } catch (e) { + return {result: 'threw', error: e}; } } describe('addWith("obj", "console.log(a)")', function () { it('adds the necessary variable declarations', function (done) { - var src = addWith('obj', 'console.log(a)') - outputs.push(src) + var src = addWith('obj', 'console.log(a)'); + outputs.push(src); // var a = obj.a;console.log(a) Function('console,obj', src)( { log: function (a) { - assert(a === sentinel) - done() - } + assert(a === sentinel); + done(); + }, }, - {a: sentinel}) - }) -}) + {a: sentinel}, + ); + }); +}); describe('addWith("obj || {}", "console.log(a)")', function () { it('adds the necessary variable declarations', function (done) { - var src = addWith('obj || {}', 'console.log(a)') - outputs.push(src) + var src = addWith('obj || {}', 'console.log(a)'); + outputs.push(src); // var locals = (obj || {}),a = locals.a;console.log(a) - var expected = 2 + var expected = 2; Function('console,obj', src)( { log: function (a) { - assert(a === sentinel) - if (0 === --expected) done() - } + assert(a === sentinel); + if (0 === --expected) done(); + }, }, - {a: sentinel}) - Function('console,obj', src)( - { - log: function (a) { - assert(a === undefined) - if (0 === --expected) done() - } - }) - }) -}) + {a: sentinel}, + ); + Function( + 'console,obj', + src, + )({ + log: function (a) { + assert(a === undefined); + if (0 === --expected) done(); + }, + }); + }); +}); describe('addWith("obj", "console.log(helper(a))")', function () { it('adds the necessary variable declarations', function (done) { - var src = addWith('obj', 'console.log(helper(a))') - outputs.push(src) + var src = addWith('obj', 'console.log(helper(a))'); + outputs.push(src); // var a = obj.a;console.log(helper(a)) Function('console,obj,helper', src)( { log: function (a) { - assert(a === sentinel) - done() - } + assert(a === sentinel); + done(); + }, }, {a: sentinel2}, function (a) { - assert(a === sentinel2) - return sentinel - }) - }) -}) + assert(a === sentinel2); + return sentinel; + }, + ); + }); +}); describe('addWith("obj || {}", "console.log(locals(a))")', function () { it('adds the necessary variable declarations', function (done) { - var src = addWith('obj || {}', 'console.log(locals(a))') - outputs.push(src) + var src = addWith('obj || {}', 'console.log(locals(a))'); + outputs.push(src); // var locals__ = (obj || {}),locals = locals__.locals,a = locals__.a;console.log(locals(a)) Function('console,obj', src)( { log: function (a) { - assert(a === sentinel) - done() - } + assert(a === sentinel); + done(); + }, }, { a: sentinel2, locals: function (a) { - assert(a === sentinel2) - return sentinel - } - }) - }) -}) + assert(a === sentinel2); + return sentinel; + }, + }, + ); + }); +}); describe('addWith("obj || {}", "console.log(\'foo\')")', function () { it('passes through', function (done) { - var src = addWith('obj || {}', 'console.log("foo")') - outputs.push(src) + var src = addWith('obj || {}', 'console.log("foo")'); + outputs.push(src); // console.log(\'foo\') - Function('console,obj', src)( - { - log: function (a) { - assert(a === 'foo') - done() - } - }) - }) -}) + Function( + 'console,obj', + src, + )({ + log: function (a) { + assert(a === 'foo'); + done(); + }, + }); + }); +}); describe('addWith("obj || {}", "obj.foo")', function () { it('passes through', function () { - var src = addWith('obj || {}', 'obj.bar = obj.foo') - outputs.push(src) + var src = addWith('obj || {}', 'obj.bar = obj.foo'); + outputs.push(src); // obj.bar = obj.foo var obj = { - foo: 'ding' - } - Function('obj', src)(obj) - assert(obj.bar === 'ding') - }) -}) + foo: 'ding', + }; + Function('obj', src)(obj); + assert(obj.bar === 'ding'); + }); +}); describe('addWith("obj || {}", "return foo")', function () { it('supports returning values', function () { - var src = addWith('obj || {}', 'return foo') - outputs.push(src) + var src = addWith('obj || {}', 'return foo'); + outputs.push(src); // obj.bar = obj.foo var obj = { - foo: 'ding' - } - assert(Function('obj', src)(obj) === 'ding') - }) + foo: 'ding', + }; + assert(Function('obj', src)(obj) === 'ding'); + }); it('supports returning without argument', function () { - var src = addWith('obj || {}', 'return; return foo') - outputs.push(src) + var src = addWith('obj || {}', 'return; return foo'); + outputs.push(src); var obj = { - foo: 'ding' - } - assert(Function('obj', src + 'throw new Error("but we returned")')(obj) === undefined) - }) + foo: 'ding', + }; + assert( + Function('obj', src + 'throw new Error("but we returned")')(obj) === + undefined, + ); + }); it('supports returning undefined', function () { - var src = addWith('obj || {}', 'return foo') - outputs.push(src) - assert(Function('obj', src + ';return "ding"')({}) === undefined) - }) + var src = addWith('obj || {}', 'return foo'); + outputs.push(src); + assert(Function('obj', src + ';return "ding"')({}) === undefined); + }); it('supports not actually returning', function () { - var src = addWith('obj || {}', 'if (false) return foo') - outputs.push(src) - assert(Function('obj', src + ';return "ding"')({}) === 'ding') - }) + var src = addWith('obj || {}', 'if (false) return foo'); + outputs.push(src); + assert(Function('obj', src + ';return "ding"')({}) === 'ding'); + }); it('supports returning in a child function', function () { - var src = addWith('obj || {}', 'var a = function () { return foo; }; return a()') - outputs.push(src) + var src = addWith( + 'obj || {}', + 'var a = function () { return foo; }; return a()', + ); + outputs.push(src); var obj = { - foo: 'ding' - } - assert(Function('obj', src + ';throw new Error("but we returned")')(obj) === 'ding') - }) -}) + foo: 'ding', + }; + assert( + Function('obj', src + ';throw new Error("but we returned")')(obj) === + 'ding', + ); + }); +}); describe('addWith("obj || {}", "return foo, bar")', function () { it('returns bar', function () { - var src = addWith('obj || {}', 'return foo, bar') - outputs.push(src) + var src = addWith('obj || {}', 'return foo, bar'); + outputs.push(src); var obj = { foo: 'ding', bar: 'dong', - } - assert(Function('obj', src)(obj) === 'dong') - }) -}) + }; + assert(Function('obj', src)(obj) === 'dong'); + }); +}); describe('addWith("obj || {}", "return this[foo]")', function () { it('keeps reference to this', function () { - var src = addWith('obj || {}', 'return this[foo]') - outputs.push(src) + var src = addWith('obj || {}', 'return this[foo]'); + outputs.push(src); // obj.bar = obj.foo var obj = { - foo: 'bar', - bar: 'ding', - fn: Function('obj', src) - } - assert(obj.fn(obj) === 'ding') - }) + foo: 'bar', + bar: 'ding', + fn: Function('obj', src), + }; + assert(obj.fn(obj) === 'ding'); + }); it('does not pass `undefined` as an argument', function () { - var src = addWith('obj || {}', 'return this[foo]') - assert(!~src.indexOf('"undefined" in locals_for_with')) - assert(!~src.indexOf('locals_for_with.undefined')) - assert(!~src.indexOf('typeof undefined!=="undefined"?undefined:undefined')) - outputs.push(src) - }) -}) + var src = addWith('obj || {}', 'return this[foo]'); + assert(!~src.indexOf('"undefined" in locals_for_with')); + assert(!~src.indexOf('locals_for_with.undefined')); + assert(!~src.indexOf('typeof undefined!=="undefined"?undefined:undefined')); + outputs.push(src); + }); +}); describe('addWith("obj", "var x = (y) => y + z; x(10);")', function () { it('keeps reference to this', function () { - var src = addWith('obj', 'var x = (y) => y + z; x(10);') - outputs.push(src) - }) -}) + var src = addWith('obj', 'var x = (y) => y + z; x(10);'); + outputs.push(src); + }); +}); describe('with reserved words', function () { it('works just fine', function (done) { - var src = addWith('obj', 'console.log(yield)') - outputs.push(src) + var src = addWith('obj', 'console.log(yield)'); + outputs.push(src); Function('console,obj', src)( { log: function (a) { - assert(a === sentinel) - done() - } + assert(a === sentinel); + done(); + }, }, - {'yield': sentinel}) - }) -}) + {yield: sentinel}, + ); + }); +}); describe('with JS syntax error', function () { function spec(obj, body, assertions) { it('exposes error location information', function () { var {result, error} = tryCatch(function () { return addWith(obj, body); - }) - assert(result === 'threw') - assertions(error) - }) + }); + assert(result === 'threw'); + assertions(error); + }); } describe('in the obj', function () { spec('syntax error', '1 + 1;', function (error) { - assert(error.component === 'obj') - assert(error.babylonError.pos === 7) - }) - }) + assert(error.component === 'obj'); + assert(error.babylonError.pos === 7); + }); + }); describe('in the body', function () { spec('1 + 1', 'syntax error', function (error) { - assert(error.component === 'src') - assert(error.babylonError.pos === 7) - }) - }) -}) + assert(error.component === 'src'); + assert(error.babylonError.pos === 7); + }); + }); +}); after(function () { function beautify(src) { try { - return uglify.minify('function example() {' + src + '}', {fromString: true, mangle: false, compress: false, output: {beautify: true}}).code; + return uglify.minify('function example() {' + src + '}', { + fromString: true, + mangle: false, + compress: false, + output: {beautify: true}, + }).code; } catch (ex) { return src; } } - fs.writeFileSync(__dirname + '/output.js', outputs.map(beautify).map(function (out, index) { return '// example-' + index + '\n\n' + out; }).join('\n\n\n')) -}) + fs.writeFileSync( + __dirname + '/output.js', + outputs + .map(beautify) + .map(function (out, index) { + return '// example-' + index + '\n\n' + out; + }) + .join('\n\n\n'), + ); +}); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..a8538b1 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@forbeslindesay/tsconfig", + "compilerOptions": { + "outDir": "lib", + "incremental": true, + "rootDir": "src", + "tsBuildInfoFile": "lib/.tsbuildinfo" + }, + "include": ["src"] +} diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000..f4f141a --- /dev/null +++ b/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": ["@forbeslindesay/tsconfig/tslint"], + "linterOptions": { + "exclude": ["coverage/", "dist/", "**/node_modules/**"] + }, + "rules": {} +} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..789aadc --- /dev/null +++ b/yarn.lock @@ -0,0 +1,983 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" + integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== + dependencies: + "@babel/highlight" "^7.8.3" + +"@babel/helper-validator-identifier@^7.9.0", "@babel/helper-validator-identifier@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" + integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== + +"@babel/highlight@^7.8.3": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" + integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== + dependencies: + "@babel/helper-validator-identifier" "^7.9.0" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.6.tgz#3b1bbb30dabe600cd72db58720998376ff653bc7" + integrity sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q== + +"@babel/types@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.6.tgz#2c5502b427251e9de1bd2dff95add646d95cc9f7" + integrity sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA== + dependencies: + "@babel/helper-validator-identifier" "^7.9.5" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + +"@forbeslindesay/tsconfig@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@forbeslindesay/tsconfig/-/tsconfig-2.0.0.tgz#71a8a92afb366ea7ca05fe46e68bc033060c2e2d" + integrity sha512-SqkFDsM1vgB5iXCjJKnnvYwIlQZhLfGjKQfmwp3PZjvqoDVbng76iQvppJAG1pX2nSmkPz8Z1rmEylXop/Ma8A== + +"@types/node@^14.0.5": + version "14.0.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.5.tgz#3d03acd3b3414cf67faf999aed11682ed121f22b" + integrity sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA== + +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" + integrity sha1-DNkKVhCT810KmSVsIrcGlDP60Rc= + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +ansi-colors@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" + integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +assert-never@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/assert-never/-/assert-never-1.2.1.tgz#11f0e363bf146205fb08193b5c7b90f4d1cf44fe" + integrity sha512-TaTivMB6pYI1kXwrFlEhLeGfOqoDNdTxjCdwRfFFkEA30Eu+k48W34nlok2EYWJfFFzqaEmichdNM7th6M5HNw== + +babel-walk@3.0.0-canary-5: + version "3.0.0-canary-5" + resolved "https://registry.yarnpkg.com/babel-walk/-/babel-walk-3.0.0-canary-5.tgz#f66ecd7298357aee44955f235a6ef54219104b11" + integrity sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw== + dependencies: + "@babel/types" "^7.9.6" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +binary-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" + integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +builtin-modules@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + integrity sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk= + +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + integrity sha1-qg0yYptu6XIgBBHL1EYckHvCt60= + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chokidar@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" + integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.2.0" + optionalDependencies: + fsevents "~2.1.1" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + integrity sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE= + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +commander@^2.12.1: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +debug@3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +decamelize@^1.0.0, decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: + version "1.17.5" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" + integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.1.5" + is-regex "^1.0.5" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimleft "^2.1.1" + string.prototype.trimright "^2.1.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +escape-string-regexp@1.0.5, 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" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +flat@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" + integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== + dependencies: + is-buffer "~2.0.3" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +glob-parent@~5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" + integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + dependencies: + is-glob "^4.0.1" + +glob@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.1, glob@^7.1.3: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-symbols@^1.0.0, has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-buffer@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" + integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== + +is-callable@^1.1.4, is-callable@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" + integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== + +is-date-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +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" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-regex@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== + dependencies: + has "^1.0.3" + +is-symbol@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@^3.13.1: + version "3.14.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" + integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +lodash@^4.17.13, lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + +log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= + +minimatch@3.0.4, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +mkdirp@0.5.5, mkdirp@^0.5.3: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mocha@*: + version "7.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" + integrity sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== + dependencies: + ansi-colors "3.2.3" + browser-stdout "1.3.1" + chokidar "3.3.0" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "3.0.0" + minimatch "3.0.4" + mkdirp "0.5.5" + ms "2.1.1" + node-environment-flags "1.0.6" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.0" + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +node-environment-flags@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" + integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +object-inspect@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@4.1.0, object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.getownpropertydescriptors@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" + integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +p-limit@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +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" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +picomatch@^2.0.4: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + +prettier@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" + integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== + +readdirp@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" + integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== + dependencies: + picomatch "^2.0.4" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +resolve@^1.3.2: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + integrity sha1-YTObci/mo1FWiSENJOFMlhSGE+8= + dependencies: + align-text "^0.1.1" + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +semver@^5.3.0, semver@^5.7.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string.prototype.trimend@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" + integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string.prototype.trimleft@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz#4408aa2e5d6ddd0c9a80739b087fbc067c03b3cc" + integrity sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.trimstart "^1.0.0" + +string.prototype.trimright@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz#c76f1cef30f21bbad8afeb8db1511496cfb0f2a3" + integrity sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.trimend "^1.0.0" + +string.prototype.trimstart@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" + integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +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" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== + dependencies: + has-flag "^3.0.0" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +tslib@^1.10.0, tslib@^1.8.1: + version "1.13.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" + integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== + +tslint@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.2.tgz#2433c248512cc5a7b2ab88ad44a6b1b34c6911cf" + integrity sha512-UyNrLdK3E0fQG/xWNqAFAC5ugtFyPO4JJR1KyyfQAyzR8W0fTRrC91A8Wej4BntFzcvETdCSDa/4PnNYJQLYiA== + dependencies: + "@babel/code-frame" "^7.0.0" + builtin-modules "^1.1.1" + chalk "^2.3.0" + commander "^2.12.1" + diff "^4.0.1" + glob "^7.1.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + mkdirp "^0.5.3" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.10.0" + tsutils "^2.29.0" + +tsutils@^2.29.0: + version "2.29.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" + integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== + dependencies: + tslib "^1.8.1" + +typescript@^3.9.3: + version "3.9.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.3.tgz#d3ac8883a97c26139e42df5e93eeece33d610b8a" + integrity sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ== + +uglify-js@^2.6.2: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + integrity sha1-KcVzMUgFe7Th913zW3qcty5qWd0= + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc= + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + +yargs-parser@13.1.2, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== + dependencies: + flat "^4.1.0" + lodash "^4.17.15" + yargs "^13.3.0" + +yargs@13.3.2, yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + integrity sha1-9+572FfdfB0tOMDnTvvWgdFDH9E= + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0"