pax_global_header00006660000000000000000000000064136630277030014521gustar00rootroot0000000000000052 comment=aea4d8fae63e4a4e93f04dcd7ee5858384593e0a babel-walk-3.0.0/000077500000000000000000000000001366302770300135225ustar00rootroot00000000000000babel-walk-3.0.0/.github/000077500000000000000000000000001366302770300150625ustar00rootroot00000000000000babel-walk-3.0.0/.github/workflows/000077500000000000000000000000001366302770300171175ustar00rootroot00000000000000babel-walk-3.0.0/.github/workflows/rollingversions-canary.yml000066400000000000000000000011311366302770300243500ustar00rootroot00000000000000name: Publish Canary on: push: branches: - master jobs: publish-canary: runs-on: ubuntu-latest 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 prettier:check - run: yarn build - run: node lib - run: npx rollingversions publish --canary $GITHUB_RUN_NUMBER env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} babel-walk-3.0.0/.github/workflows/rollingversions.yml000066400000000000000000000011161366302770300231000ustar00rootroot00000000000000name: Release on: repository_dispatch: types: [rollingversions_publish_approved] jobs: publish: runs-on: ubuntu-latest 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 prettier:check - run: yarn build - run: node lib - run: npx rollingversions publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} babel-walk-3.0.0/.github/workflows/test.yml000066400000000000000000000005361366302770300206250ustar00rootroot00000000000000name: Test on: pull_request: branches: - master jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12.x - run: yarn install --frozen-lockfile - run: yarn prettier:check - run: yarn build - run: node lib babel-walk-3.0.0/.gitignore000066400000000000000000000001461366302770300155130ustar00rootroot00000000000000lib lib-cov *.seed *.log *.csv *.dat *.out *.pid *.gz pids logs results npm-debug.log node_modules babel-walk-3.0.0/LICENSE.md000066400000000000000000000020521366302770300151250ustar00rootroot00000000000000Copyright (c) 2016 Tiancheng "Timothy" Gu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. babel-walk-3.0.0/README.md000066400000000000000000000157321366302770300150110ustar00rootroot00000000000000# babel-walk Lightweight AST traversal tools for [Babel] ASTs. [Babel] supplies the wonderful [babel-traverse] module for walking Babel ASTs. Problem is, babel-traverse is very heavyweight, as it is designed to supply utilities to make all sorts of AST transformations possible. For simple AST walking without transformation, babel-traverse brings a lot of overhead. This module loosely implements the API of Acorn parser's [walk module], which is a lightweight AST walker for the ESTree AST format. In my tests, babel-walk's ancestor walker (the most complex walker provided by this module) is about 8 times faster than babel-traverse, if the visitors are cached and the same AST is used for all runs. It is about 16 times faster if a fresh AST is used every run. [![Build Status](https://img.shields.io/github/workflow/status/pugjs/babel-walk/Publish%20Canary/master?style=for-the-badge)](https://github.com/pugjs/babel-walk/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/babel-walk) [![NPM version](https://img.shields.io/npm/v/babel-walk?style=for-the-badge)](https://www.npmjs.com/package/babel-walk) [babel]: https://babeljs.io/ [babel-traverse]: https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#toc-babel-traverse [walk module]: https://github.com/ternjs/acorn#distwalkjs ## Installation ```sh $ npm install babel-walk ``` ## API ```js var walk = require('babel-walk'); ``` ### walk.simple(visitors)(node, state) Do a simple walk over the AST. `node` should be the AST node to walk, and `visitors` an object containing Babel [visitors]. Each visitor function will be called as `(node, state)`, where `node` is the AST node, and `state` is the same `state` passed to `walk.simple`. When `walk.simple` is called with a fresh set of visitors, it will first "explode" the visitors (e.g. expanding `Visitor(node, state) {}` to `Visitor() { enter(node, state) {} }`). This exploding process can take some time, so it is recommended to cache the result of calling `walk.simple(visitors)` and communicate state leveraging the `state` parameter. All [babel-types] aliases (e.g. `Expression`) work, but the union syntax (e.g. `'Identifier|AssignmentPattern'(node, state) {}`) does not. ### walk.ancestor(visitors)(node, state) Do a simple walk over the AST, but memoizing the ancestors of the node and making them available to the visitors. `node` should be the AST node to walk, and `visitors` an object containing Babel [visitors]. Each visitor function will be called as `(node, state, ancestors)`, where `node` is the AST node, `state` is the same `state` passed to `walk.ancestor`, and `ancestors` is an array of ancestors to the node (with the outermost node being `[0]` and the current node being `[ancestors.length - 1]`). If `state` is not specified in the call to `walk.ancestor`, the `state` parameter will be set to `ancestors`. When `walk.ancestor` is called with a fresh set of visitors, it will first "explode" the visitors (e.g. expanding `Visitor(node, state) {}` to `Visitor() { enter(node, state) {} }`). This exploding process can take some time, so it is recommended to cache the result of calling `walk.ancestor(visitors)` and communicate state leveraging the `state` parameter. All [babel-types] aliases (e.g. `Expression`) work, but the union syntax (e.g. `'Identifier|AssignmentPattern'(node, state) {}`) does not. ### walk.recursive(visitors)(node, state) Do a recursive walk over the AST, where the visitors are responsible for continuing the walk on the child nodes of their target node. `node` should be the AST node to walk, and `visitors` an object containing Babel [visitors]. Each visitor function will be called as `(node, state, c)`, where `node` is the AST node, `state` is the same `state` passed to `walk.recursive`, and `c` is a function that takes a single node as argument and continues walking _that_ node. If no visitor for a node is provided, the default walker algorithm will still be used. When `walk.recursive` is called with a fresh set of visitors, it will first "explode" the visitors (e.g. expanding `Visitor(node, state) {}` to `Visitor() { enter(node, state) {} }`). This exploding process can take some time, so it is recommended to cache the result of calling `walk.recursive(visitors)` and communicate state leveraging the `state` parameter. Unlike other babel-walk walkers, `walk.recursive` does not call the `exit` visitor, only the `enter` (the default) visitor, of a specific node type. All [babel-types] aliases (e.g. `Expression`) work, but the union syntax (e.g. `'Identifier|AssignmentPattern'(node, state) {}`) does not. In the following example, we are trying to count the number of functions in the outermost scope. This means, that we can simply walk all the statements and increment a counter if it is a function declaration or expression, and then stop walking. Note that we do not specify a visitor for the `Program` node, and the default algorithm for walking `Program` nodes is used (which is what we want). Also of note is how I bring the `visitors` object outside of `countFunctions` so that the object can be cached to improve performance. ```js import * as t from 'babel-types'; import {parse} from 'babel'; import * as walk from 'babel-walk'; const visitors = walk.recursive({ Statement(node, state, c) { if (t.isVariableDeclaration(node)) { for (let declarator of node.declarations) { // Continue walking the declarator c(declarator); } } else if (t.isFunctionDeclaration(node)) { state.counter++; } }, VariableDeclarator(node, state) { if (t.isFunction(node.init)) { state.counter++; } }, }); function countFunctions(node) { const state = { counter: 0, }; visitors(node, state); return state.counter; } const ast = parse(` // Counts var a = () => {}; // Counts function b() { // Doesn't count function c() { } } // Counts const c = function d() {}; `); countFunctions(ast); // = 3 ``` [babel-types]: https://github.com/babel/babel/tree/master/packages/babel-types [cache your visitors]: https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#toc-optimizing-nested-visitors [visitors]: https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#toc-visitors ## Caveat For those of you migrating from Acorn to Babel, there are a few things to be aware of. 1. The visitor caching suggestions do not apply to Acorn's walk module, but do for babel-walk. 2. babel-walk does not provide any of the other functions Acorn's walk module provides (e.g. `make`, `findNode*`). 3. babel-walk does not use a `base` variable. The walker algorithm is the same as what babel-traverse uses. - That means certain nodes that are not walked by Acorn, such as the `property` property of a non-computed `MemberExpression`, are walked by babel-walk. ## License MIT babel-walk-3.0.0/package.json000066400000000000000000000017411366302770300160130ustar00rootroot00000000000000{ "name": "babel-walk", "version": "0.0.0", "description": "Lightweight Babel AST traversal", "main": "lib/index.js", "files": [ "lib" ], "scripts": { "build": "tsc && node lib", "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}'" }, "repository": { "type": "git", "url": "https://github.com/pugjs/babel-walk.git" }, "engines": { "node": ">= 10.0.0" }, "author": "Timothy Gu ", "license": "MIT", "dependencies": { "@babel/types": "^7.9.6" }, "devDependencies": { "@forbeslindesay/tsconfig": "^2.0.0", "@types/node": "^14.0.5", "prettier": "^2.0.5", "rimraf": "^3.0.2", "tslint": "^6.1.2", "typescript": "^3.9.3" } } babel-walk-3.0.0/prettier.config.js000066400000000000000000000000771366302770300171660ustar00rootroot00000000000000module.exports = require('@forbeslindesay/tsconfig/prettier'); babel-walk-3.0.0/src/000077500000000000000000000000001366302770300143115ustar00rootroot00000000000000babel-walk-3.0.0/src/explode.ts000066400000000000000000000054521366302770300163270ustar00rootroot00000000000000import * as t from '@babel/types'; if ( !( Array.isArray((t as any).TYPES) && (t as any).TYPES.every((t: any) => typeof t === 'string') ) ) { throw new Error('@babel/types TYPES does not match the expected type.'); } const FLIPPED_ALIAS_KEYS: {[key: string]: string[]} = (t as any) .FLIPPED_ALIAS_KEYS; const TYPES = new Set((t as any).TYPES); if ( !( FLIPPED_ALIAS_KEYS && // tslint:disable-next-line: strict-type-predicates typeof FLIPPED_ALIAS_KEYS === 'object' && Object.keys(FLIPPED_ALIAS_KEYS).every( (key) => Array.isArray(FLIPPED_ALIAS_KEYS[key]) && // tslint:disable-next-line: strict-type-predicates FLIPPED_ALIAS_KEYS[key].every((v) => typeof v === 'string'), ) ) ) { throw new Error( '@babel/types FLIPPED_ALIAS_KEYS does not match the expected type.', ); } /** * This serves thre functions: * * 1. Take any "aliases" and explode them to refecence the concrete types * 2. Normalize all handlers to have an `{enter, exit}` pair, rather than raw functions * 3. make the enter and exit handlers arrays, so that multiple handlers can be merged */ export default function explode(input: any): any { const results: any = {}; for (const key in input) { const aliases = FLIPPED_ALIAS_KEYS[key]; if (aliases) { for (const concreteKey of aliases) { if (concreteKey in results) { if (typeof input[key] === 'function') { results[concreteKey].enter.push(input[key]); } else { if (input[key].enter) results[concreteKey].enter.push(input[key].enter); if (input[key].exit) results[concreteKey].exit.push(input[key].exit); } } else { if (typeof input[key] === 'function') { results[concreteKey] = { enter: [input[key]], exit: [], }; } else { results[concreteKey] = { enter: input[key].enter ? [input[key].enter] : [], exit: input[key].exit ? [input[key].exit] : [], }; } } } } else if (TYPES.has(key)) { if (key in results) { if (typeof input[key] === 'function') { results[key].enter.push(input[key]); } else { if (input[key].enter) results[key].enter.push(input[key].enter); if (input[key].exit) results[key].exit.push(input[key].exit); } } else { if (typeof input[key] === 'function') { results[key] = { enter: [input[key]], exit: [], }; } else { results[key] = { enter: input[key].enter ? [input[key].enter] : [], exit: input[key].exit ? [input[key].exit] : [], }; } } } } return results; } babel-walk-3.0.0/src/index.ts000066400000000000000000000100701366302770300157660ustar00rootroot00000000000000import * as t from '@babel/types'; import explode from './explode'; const VISITOR_KEYS: {[key: string]: string[]} = (t as any).VISITOR_KEYS; if ( !( VISITOR_KEYS && // tslint:disable-next-line: strict-type-predicates typeof VISITOR_KEYS === 'object' && Object.keys(VISITOR_KEYS).every( (key) => Array.isArray(VISITOR_KEYS[key]) && // tslint:disable-next-line: strict-type-predicates VISITOR_KEYS[key].every((v) => typeof v === 'string'), ) ) ) { throw new Error( '@babel/types VISITOR_KEYS does not match the expected type.', ); } export type NodeType = type extends keyof t.Aliases ? t.Aliases[type] : Extract; export type SimpleFunction = ( node: NodeType, state: TState, ) => void; export type SimpleVisitors = { [key in keyof t.Aliases | t.Node['type']]?: | SimpleFunction | { enter?: SimpleFunction; exit?: SimpleFunction; }; }; export function simple(visitors: SimpleVisitors) { const vis = explode(visitors); return (node: t.Node, state: TState) => { (function recurse(node) { if (!node) return; const visitor = vis[node.type]; if (visitor?.enter) { for (const v of visitor.enter) { v(node, state); } } for (const key of VISITOR_KEYS[node.type] || []) { const subNode = (node as any)[key]; if (Array.isArray(subNode)) { for (const subSubNode of subNode) { recurse(subSubNode); } } else { recurse(subNode); } } if (visitor?.exit) { for (const v of visitor.exit) { v(node, state); } } })(node); }; } export type AncestorFunction = ( node: NodeType, state: TState, ancestors: t.Node[], ) => void; export type AncestorVisitor = { [key in keyof t.Aliases | t.Node['type']]?: | AncestorFunction | { enter?: AncestorFunction; exit?: AncestorFunction; }; }; export function ancestor(visitors: AncestorVisitor) { const vis = explode(visitors); return (node: t.Node, state: TState) => { const ancestors: t.Node[] = []; (function recurse(node) { if (!node) return; const visitor = vis[node.type]; const isNew = node !== ancestors[ancestors.length - 1]; if (isNew) ancestors.push(node); if (visitor?.enter) { for (const v of visitor.enter) { v(node, state, ancestors); } } for (const key of VISITOR_KEYS[node.type] || []) { const subNode = (node as any)[key]; if (Array.isArray(subNode)) { for (const subSubNode of subNode) { recurse(subSubNode); } } else { recurse(subNode); } } if (visitor?.exit) { for (const v of visitor.exit) { v(node, state, ancestors); } } if (isNew) ancestors.pop(); })(node); }; } export type RecursiveVisitors = { [key in keyof t.Aliases | t.Node['type']]?: ( node: NodeType, state: TState, recurse: (node: t.Node) => void, ) => void; }; export function recursive(visitors: RecursiveVisitors) { const vis = explode(visitors); return (node: t.Node, state: TState) => { (function recurse(node: t.Node) { if (!node) return; const visitor = vis[node.type]; if (visitor?.enter) { for (const v of visitor.enter) { v(node, state, recurse); } } else { for (const key of VISITOR_KEYS[node.type] || []) { const subNode = (node as any)[key]; if (Array.isArray(subNode)) { for (const subSubNode of subNode) { recurse(subSubNode); } } else { recurse(subNode); } } } })(node); }; } babel-walk-3.0.0/src/test.ts000066400000000000000000000004661366302770300156460ustar00rootroot00000000000000import * as t from '@babel/types'; import {ancestor} from './'; ancestor({})(t.program([]), undefined); ancestor({ Function(node) { console.info(node); }, })(t.program([]), undefined); ancestor({ Function(node, state) { console.info(node, state); }, })(t.program([]), 'hello world'); babel-walk-3.0.0/tsconfig.json000066400000000000000000000003141366302770300162270ustar00rootroot00000000000000{ "extends": "@forbeslindesay/tsconfig", "compilerOptions": { "outDir": "lib", "incremental": true, "rootDir": "src", "tsBuildInfoFile": "lib/.tsbuildinfo" }, "include": ["src"] } babel-walk-3.0.0/tslint.json000066400000000000000000000002321366302770300157270ustar00rootroot00000000000000{ "extends": ["@forbeslindesay/tsconfig/tslint"], "linterOptions": { "exclude": ["coverage/", "dist/", "**/node_modules/**"] }, "rules": {} } babel-walk-3.0.0/yarn.lock000066400000000000000000000305331366302770300153510ustar00rootroot00000000000000# 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/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== 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" 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" 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= 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" 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= chalk@^2.0.0, chalk@^2.3.0: 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" 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= 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== 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== 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= 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" 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= 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== 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.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" lodash@^4.17.13: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== 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.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" 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" 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== 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== 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" 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: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== 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= 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= 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== wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=