diff --git a/.eslintignore b/.eslintignore index 4151b7f9e4..9f823d49de 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,8 @@ packages/material-icons/src packages/documentation/src/constants/sandboxes packages/documentation/src/components/SassDocPage +packages/codemod/transforms/**/__tests__ +packages/codemod/transforms/**/__testfixtures__ # this is needed to fix a config extension error for "@ljharb" in the qs library packages/*/node_modules diff --git a/.gitignore b/.gitignore index cb1e229dad..954348e8b9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ packages/*/*.tsbuildinfo /packages/*/lib /packages/*/dist /packages/*/types +/packages/codemod/bin /packages/dev-utils/bin /packages/material-icons/bin /packages/material-icons/temp diff --git a/.prettierignore b/.prettierignore index 4439cb1278..3ce3a4ec6c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -18,6 +18,10 @@ packages/*/bin packages/*/dist packages/*/types packages/*/.next +packages/codemod/transforms/**/__testfixtures__/**/*.output.ts +packages/codemod/transforms/**/__testfixtures__/**/*.output.tsx +packages/codemod/transforms/**/__testfixtures__/**/*.output.js +packages/codemod/transforms/**/__testfixtures__/**/*.output.jsx packages/documentation/src/constants/sassdoc packages/documentation/src/constants/sandboxes packages/documentation/public/tsdocs diff --git a/jest.config.js b/jest.config.js index 3b0a1859d0..ea71bf559a 100644 --- a/jest.config.js +++ b/jest.config.js @@ -3,7 +3,10 @@ const path = require('path'); const packages = fs .readdirSync(path.join(process.cwd(), 'packages')) - .filter((name) => !['dev-utils'].includes(name)); + .filter((name) => !['dev-utils', 'codemod'].includes(name)); + +const roots = packages.map((name) => `/packages/${name}/src`); +roots.push('/packages/codemod'); const docsSrc = '/packages/documentation/src'; @@ -15,6 +18,7 @@ if (!isWatchMode) { '/packages/*/src/**/*.{ts,tsx}', // internal usage and don't matter for the library coverage reports '!/packages/{dev-utils,documentation,material-icons,react-md}/src/**/*', + '!/packages/codemod/**/*', // these are generated files '!/packages/*/src/scssVariables.ts', // index.ts files are always `export * from "./fileOrFolder"` @@ -25,7 +29,7 @@ if (!isWatchMode) { module.exports = { preset: 'ts-jest', testEnvironment: 'jsdom', - roots: packages.map((name) => `/packages/${name}/src`), + roots, globals: { 'ts-jest': { tsconfig: './tsconfig.test.json', diff --git a/package.json b/package.json index fb62f13da8..c86a81a102 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "scripts": { "prepare": "husky install", "cz": "cz", + "rmd-codemod": "node packages/codemod/bin/rmd-codemod.js", "release": "dev-utils release", "sandbox": "dev-utils sandbox", "sassdoc": "dev-utils sassdoc", @@ -27,7 +28,8 @@ "build-cjs": "tsc -b tsconfig.cjs.json", "build-var": "tsc -b tsconfig.var.json", "build-umd": "yarn workspace react-md umd --silent", - "build": "npm-run-all styles combine-styles build-ejs build-cjs build-var", + "build-codemod": "yarn workspace @react-md/codemod build", + "build": "npm-run-all styles combine-styles build-ejs build-cjs build-var build-codemod", "typecheck": "tsc -p tsconfig.check.json", "lint-scripts": "eslint \"packages/*/src/**/*.{ts,tsx,js,jsx}\"", "lint-styles": "stylelint \"packages/*/src/**/*.scss\"", diff --git a/packages/codemod/LICENSE b/packages/codemod/LICENSE new file mode 100644 index 0000000000..03d2e703dc --- /dev/null +++ b/packages/codemod/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2021 Mikkel Laursen + +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. + diff --git a/packages/codemod/README.md b/packages/codemod/README.md new file mode 100644 index 0000000000..ed6196c2c5 --- /dev/null +++ b/packages/codemod/README.md @@ -0,0 +1,172 @@ +# @react-md/codemod + +This repository contains a collection of codemod scripts for use with +[JSCodeshift](https://github.com/facebook/jscodeshift) that help update ReactMD +APIs. + +> Note: If you use [prettier](https://prettier.io/), you will most likely need +> to re-format your files after running a codemod. + + + +## Usage + +```sh +Usage: npx @react-md/codemod [options] [command] + +Run a codemod script to update to the latest version of ReactMD. + +Running this script without any options or commands will start an interactive wizard. + + +Options: + -h, --help display help for command + +Commands: + v3-to-v4/preset [options] [files...] + v3-to-v4/rename-text-to-typography [options] [files...] + v3-to-v4/scale-transition-props [options] [files...] +``` + +### Transformations + +### `v3-to-v4/preset` + +```sh +Usage: npx @react-md/codemod v3-to-v4/preset [options] [files...] + +Arguments: + files An optional glob or folder path to transform + (default: ".") + +Options: + -d, --dry Dry run (no changes are made to files) (default: + false) + -p, --print Print transformed files to your terminal + (default: false) + --parser The file parser to use. (choices: "babel", + "tsx", "", default: "") + --jscodeshift (Advanced) Pass options directly to jscodeshift + (default: "") + -h, --help display help for command +``` + +### `v3-to-v4/rename-text-to-typography` + +#### Changes + +```diff + import { +- Text, +- TextProps, +- TextTypes, +- TextRenderFunction, +- TextElement, ++ Typography, ++ TypographyProps, ++ TypographyType, ++ TypographyRenderFunction, ++ TypographyHTMLElement, + TextContainer, + } from "@react-md/typography"; + +-const renderer: TextRenderFunction = ({ className }) => ( ++const renderer: TypographyRenderFunction = ({ className }) => ( +
+ ); + +-const types: TextTypes[] = [ ++const types: TypographyType[] = [ + "headline-1", + "headline-2", + "headline-3", +@@ -27,17 +27,15 @@ const types: TextTypes[] = [ + "button", + ]; + +-const props: TextProps = {}; +-let element: TextElement; ++const props: TypographyProps = {}; ++let element: TypographyHTMLElement; + + export default function Example() { +- return ( +- <> +- Hello ++ return <> ++ Hello + +- World! +- Headline ++ World! ++ Headline + +- +- ); ++ ; + } +, +``` + +```sh +Usage: npx @react-md/codemod v3-to-v4/rename-text-to-typography [options] [files...] + +Arguments: + files An optional glob or folder path to transform + (default: ".") + +Options: + -d, --dry Dry run (no changes are made to files) (default: + false) + -p, --print Print transformed files to your terminal + (default: false) + --parser The file parser to use. (choices: "babel", + "tsx", "", default: "") + --jscodeshift (Advanced) Pass options directly to jscodeshift + (default: "") + -h, --help display help for command +``` + +### `v3-to-v4/scale-transition-props` + +#### Changes + +```diff + + export default function Example() { + const [visible, setVisible] = useState(false); +- return ( +- <> ++ return <> + +- ++ +
Something
+
+- +- ); ++ ; + } +, +``` + +```sh +Usage: npx @react-md/codemod v3-to-v4/scale-transition-props [options] [files...] + +Arguments: + files An optional glob or folder path to transform + (default: ".") + +Options: + -d, --dry Dry run (no changes are made to files) (default: + false) + -p, --print Print transformed files to your terminal + (default: false) + --parser The file parser to use. (choices: "babel", + "tsx", "", default: "") + --jscodeshift (Advanced) Pass options directly to jscodeshift + (default: "") + -h, --help display help for command +``` diff --git a/packages/codemod/package.json b/packages/codemod/package.json new file mode 100644 index 0000000000..31cfb62cb1 --- /dev/null +++ b/packages/codemod/package.json @@ -0,0 +1,49 @@ +{ + "name": "@react-md/codemod", + "version": "3.1.1", + "description": "ReactMD codemod scripts", + "author": "Mikkel Laursen ", + "bin": { + "rmd-codemod": "./bin/rmd-codemod.js" + }, + "files": [ + "bin" + ], + "scripts": { + "update-docs": "node updateDocs.js", + "build": "tsc --project tsconfig.build.json" + }, + "repository": { + "type": "git", + "url": "https://github.com/mlaursen/react-md.git", + "directory": "packages/codemod" + }, + "bugs": { + "url": "https://github.com/mlaursen/react-md/issues" + }, + "homepage": "https://react-md.dev", + "keywords": [ + "react-md", + "material design", + "react", + "codemod", + "jscodeshift", + "transforms" + ], + "license": "MIT", + "dependencies": { + "commander": "^8.3.0", + "glob": "^7.2.0", + "inquirer": "^8.2.0", + "jscodeshift": "^0.13.0" + }, + "devDependencies": { + "@types/glob": "^7.2.0", + "@types/inquirer": "^8.1.3", + "@types/jscodeshift": "^0.11.3", + "typescript": "^4.5.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/codemod/rmd-codemod.ts b/packages/codemod/rmd-codemod.ts new file mode 100644 index 0000000000..d2733b00c9 --- /dev/null +++ b/packages/codemod/rmd-codemod.ts @@ -0,0 +1,169 @@ +#!/usr/bin/env node + +/* eslint-disable no-console */ +import { execSync } from "child_process"; +import { Command, Option } from "commander"; +import { existsSync } from "fs"; +import glob from "glob"; +import inquirer from "inquirer"; +import { join } from "path"; + +const jscodeshiftExecutable = require.resolve(".bin/jscodeshift"); +const transforms = glob + .sync("**/*.js", { + cwd: join(__dirname, "transforms"), + ignore: ["**/__tests__/**", "**/__testfixtures__/**", "utils/**/*"], + }) + .map((transform) => transform.replace(".js", "")); + +const parserOptions = [ + { name: "Javascript", value: "babel" }, + { name: "Typescript", value: "tsx" }, +] as const; +const parsers = parserOptions.map(({ value }) => value); + +type Parser = typeof parsers[number]; + +const program = new Command().name("npx @react-md/codemod").description( + `Run a codemod script to update to the latest version of ReactMD. + +Running this script without any options or commands will start an interactive wizard. +` +); + +function getTransformFile(transformName: string): string { + let transform = transformName; + switch (transform) { + case "v3-to-v4": + transform = `${transform}/preset`; + break; + } + + const filePath = join(__dirname, "transforms", `${transform}.js`); + if (!existsSync(filePath)) { + console.error(`${transform} codemod does not exist`); + console.error(`Choose one of: +${transforms.join("\n")} +`); + process.exit(1); + } + + return filePath; +} + +interface Options { + dry: boolean; + print: boolean; + files: string[]; + parser: Parser | ""; + transform: string; +} + +interface Answers { + files: string; + parser: Parser; + transform: string; +} + +async function handleAction(options: Options): Promise { + const requiresFiles = !options.files.length; + const answers = await inquirer.prompt([ + { + type: "list", + name: "transform", + message: "Which transform would you like to apply?", + when: !options.transform, + pageSize: transforms.length, + choices: transforms, + }, + { + type: "input", + name: "files", + message: "On which files or directory should the codemods be applied?", + default: ".", + when: requiresFiles, + filter: (files: string): string => files.trim(), + }, + { + type: "list", + name: "parser", + message: "Which dialect of JavaScript do you use?", + default: "tsx", + when: !options.parser, + pageSize: parserOptions.length, + choices: parserOptions, + }, + ]); + + const filePatterns = requiresFiles ? [answers.files] : options.files; + const files = []; + for (const pattern of filePatterns) { + if (pattern.includes("*")) { + files.push(...glob.sync(pattern)); + } else { + files.push(pattern); + } + } + + const args: string[] = []; + if (options.dry) { + args.push("--dry"); + } + + if (options.print) { + args.push("--print"); + } + + args.push("--verbose=2"); + args.push("--ignore-pattern=**/node_modules/**"); + + const parser: Parser = options.parser || answers.parser; + args.push("--parser", parser); + args.push(`--extensions=${parser === "tsx" ? "tsx,ts," : ""}jsx,js`); + + const transform: string = options.transform || answers.transform; + args.push("--transform", getTransformFile(transform)); + args.push(...files); + + // prefix with `node` because of a bug around: "env: node\r" + const command = `node ${jscodeshiftExecutable} ${args.join(" ")}`; + console.log(command); + execSync(command, { stdio: "inherit" }); +} + +transforms.forEach((transform) => { + program + .command(transform) + .argument( + "[files...]", + 'An optional glob or folder path to transform (default: ".")' + ) + .option("-d, --dry", "Dry run (no changes are made to files)", false) + .option("-p, --print", "Print transformed files to your terminal", false) + .addOption( + new Option("--parser ", "The file parser to use.") + .choices([...parsers, ""]) + .default("") + ) + .addOption( + new Option( + "--jscodeshift ", + "(Advanced) Pass options directly to jscodeshift" + ).default("") + ) + .action((files, { dry, print, parser }) => { + handleAction({ files, dry, print, parser, transform }); + }); +}); + +program.action(() => { + handleAction({ + dry: false, + print: false, + parser: "", + files: [], + transform: "", + }); +}); + +program.parse(process.argv); diff --git a/packages/codemod/transforms/utils/renameProps.ts b/packages/codemod/transforms/utils/renameProps.ts new file mode 100644 index 0000000000..ddc2ed6d36 --- /dev/null +++ b/packages/codemod/transforms/utils/renameProps.ts @@ -0,0 +1,27 @@ +import type { Collection, JSXElement } from "jscodeshift"; + +interface Options { + root: Collection; + props: Record; + component: string; +} + +export function renameProps({ + root, + props, + component, +}: Options): Collection { + const toRename = Object.keys(props); + + return root.findJSXElements(component).forEach((path) => { + path.node.openingElement.attributes?.forEach((node) => { + if ( + node.type === "JSXAttribute" && + typeof node.name.name === "string" && + toRename.includes(node.name.name) + ) { + node.name.name = props[node.name.name]; + } + }); + }); +} diff --git a/packages/codemod/transforms/v3-to-v4/__testfixtures__/javascript/rename-text-to-typography.input.js b/packages/codemod/transforms/v3-to-v4/__testfixtures__/javascript/rename-text-to-typography.input.js new file mode 100644 index 0000000000..4face2e500 --- /dev/null +++ b/packages/codemod/transforms/v3-to-v4/__testfixtures__/javascript/rename-text-to-typography.input.js @@ -0,0 +1,13 @@ +import { Text, TextContainer } from '@react-md/typography'; + +export default function Example() { + return ( + <> + Hello + + World! + Headline + + + ); +} diff --git a/packages/codemod/transforms/v3-to-v4/__testfixtures__/javascript/rename-text-to-typography.output.js b/packages/codemod/transforms/v3-to-v4/__testfixtures__/javascript/rename-text-to-typography.output.js new file mode 100644 index 0000000000..c2dbf2370a --- /dev/null +++ b/packages/codemod/transforms/v3-to-v4/__testfixtures__/javascript/rename-text-to-typography.output.js @@ -0,0 +1,11 @@ +import { Typography, TextContainer } from '@react-md/typography'; + +export default function Example() { + return <> + Hello + + World! + Headline + + ; +} diff --git a/packages/codemod/transforms/v3-to-v4/__testfixtures__/javascript/scale-transition-props.input.js b/packages/codemod/transforms/v3-to-v4/__testfixtures__/javascript/scale-transition-props.input.js new file mode 100644 index 0000000000..45c12bd754 --- /dev/null +++ b/packages/codemod/transforms/v3-to-v4/__testfixtures__/javascript/scale-transition-props.input.js @@ -0,0 +1,16 @@ +import { useState } from 'react'; +import { ScaleTransition } from '@react-md/transition'; + +export default function Example() { + const [visible, setVisible] = useState(false); + return ( + <> + + +
Something
+
+ + ); +} diff --git a/packages/codemod/transforms/v3-to-v4/__testfixtures__/javascript/scale-transition-props.output.js b/packages/codemod/transforms/v3-to-v4/__testfixtures__/javascript/scale-transition-props.output.js new file mode 100644 index 0000000000..20cea280ee --- /dev/null +++ b/packages/codemod/transforms/v3-to-v4/__testfixtures__/javascript/scale-transition-props.output.js @@ -0,0 +1,14 @@ +import { useState } from 'react'; +import { ScaleTransition } from '@react-md/transition'; + +export default function Example() { + const [visible, setVisible] = useState(false); + return <> + + +
Something
+
+ ; +} diff --git a/packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/rename-text-to-typography.input.tsx b/packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/rename-text-to-typography.input.tsx new file mode 100644 index 0000000000..9bc198a40c --- /dev/null +++ b/packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/rename-text-to-typography.input.tsx @@ -0,0 +1,43 @@ +import { + Text, + TextProps, + TextTypes, + TextRenderFunction, + TextElement, + TextContainer, +} from "@react-md/typography"; + +const renderer: TextRenderFunction = ({ className }) => ( +
+); + +const types: TextTypes[] = [ + "headline-1", + "headline-2", + "headline-3", + "headline-4", + "headline-5", + "headline-6", + "subtitle-1", + "subtitle-2", + "body-1", + "body-2", + "caption", + "overline", + "button", +]; + +const props: TextProps = {}; +let element: TextElement; + +export default function Example() { + return ( + <> + Hello + + World! + Headline + + + ); +} diff --git a/packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/rename-text-to-typography.output.tsx b/packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/rename-text-to-typography.output.tsx new file mode 100644 index 0000000000..95efed4ac5 --- /dev/null +++ b/packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/rename-text-to-typography.output.tsx @@ -0,0 +1,41 @@ +import { + Typography, + TypographyProps, + TypographyType, + TypographyRenderFunction, + TypographyHTMLElement, + TextContainer, +} from "@react-md/typography"; + +const renderer: TypographyRenderFunction = ({ className }) => ( +
+); + +const types: TypographyType[] = [ + "headline-1", + "headline-2", + "headline-3", + "headline-4", + "headline-5", + "headline-6", + "subtitle-1", + "subtitle-2", + "body-1", + "body-2", + "caption", + "overline", + "button", +]; + +const props: TypographyProps = {}; +let element: TypographyHTMLElement; + +export default function Example() { + return <> + Hello + + World! + Headline + + ; +} diff --git a/packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/scale-transition-props.input.tsx b/packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/scale-transition-props.input.tsx new file mode 100644 index 0000000000..4d9e2299ec --- /dev/null +++ b/packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/scale-transition-props.input.tsx @@ -0,0 +1,16 @@ +import { useState } from "react"; +import { ScaleTransition } from "@react-md/transition"; + +export default function Example() { + const [visible, setVisible] = useState(false); + return ( + <> + + +
Something
+
+ + ); +} diff --git a/packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/scale-transition-props.output.tsx b/packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/scale-transition-props.output.tsx new file mode 100644 index 0000000000..fc2c2bfe92 --- /dev/null +++ b/packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/scale-transition-props.output.tsx @@ -0,0 +1,14 @@ +import { useState } from "react"; +import { ScaleTransition } from "@react-md/transition"; + +export default function Example() { + const [visible, setVisible] = useState(false); + return <> + + +
Something
+
+ ; +} diff --git a/packages/codemod/transforms/v3-to-v4/__tests__/rename-text-to-typography.ts b/packages/codemod/transforms/v3-to-v4/__tests__/rename-text-to-typography.ts new file mode 100644 index 0000000000..3c9c354365 --- /dev/null +++ b/packages/codemod/transforms/v3-to-v4/__tests__/rename-text-to-typography.ts @@ -0,0 +1,11 @@ +import { defineTest } from "jscodeshift/src/testUtils"; + +const testName = "rename-text-to-typography"; + +["javascript", "typescript"].forEach((language) => { + describe(language, () => { + defineTest(__dirname, testName, null, `${language}/${testName}`, { + parser: language === "typescript" ? "tsx" : "babel", + }); + }); +}); diff --git a/packages/codemod/transforms/v3-to-v4/__tests__/scale-transition-props.ts b/packages/codemod/transforms/v3-to-v4/__tests__/scale-transition-props.ts new file mode 100644 index 0000000000..3bffdcdfa8 --- /dev/null +++ b/packages/codemod/transforms/v3-to-v4/__tests__/scale-transition-props.ts @@ -0,0 +1,11 @@ +import { defineTest } from "jscodeshift/src/testUtils"; + +const testName = "scale-transition-props"; + +["javascript", "typescript"].forEach((language) => { + describe(language, () => { + defineTest(__dirname, testName, null, `${language}/${testName}`, { + parser: language === "typescript" ? "tsx" : "babel", + }); + }); +}); diff --git a/packages/codemod/transforms/v3-to-v4/preset.ts b/packages/codemod/transforms/v3-to-v4/preset.ts new file mode 100644 index 0000000000..ad0f740f10 --- /dev/null +++ b/packages/codemod/transforms/v3-to-v4/preset.ts @@ -0,0 +1,18 @@ +import type { API, FileInfo, Options } from "jscodeshift"; + +import renameTextToTypography from "./rename-text-to-typography"; +import scaleTransitionProps from "./scale-transition-props"; + +const transformers = [renameTextToTypography, scaleTransitionProps] as const; + +export default function transformer( + file: FileInfo, + api: API, + options: Options +): string { + transformers.forEach((transformer) => { + file.source = transformer(file, api, options); + }); + + return file.source; +} diff --git a/packages/codemod/transforms/v3-to-v4/rename-text-to-typography.ts b/packages/codemod/transforms/v3-to-v4/rename-text-to-typography.ts new file mode 100644 index 0000000000..6e42965d14 --- /dev/null +++ b/packages/codemod/transforms/v3-to-v4/rename-text-to-typography.ts @@ -0,0 +1,35 @@ +import type { API, FileInfo, Options } from "jscodeshift"; + +export default function transformer( + file: FileInfo, + api: API, + options: Options +): string { + const j = api.jscodeshift; + const root = j(file.source); + const printOptions = options.printOptions; + + return root + .find(j.Identifier) + .forEach((path) => { + switch (path.value.name) { + case "Text": + j(path).replaceWith(j.identifier("Typography")); + break; + case "TextProps": + j(path).replaceWith(j.identifier("TypographyProps")); + break; + case "TextTypes": + j(path).replaceWith(j.identifier("TypographyType")); + break; + case "TextElement": + // this doesn't work for useRef for some reason.. + j(path).replaceWith(j.identifier("TypographyHTMLElement")); + break; + case "TextRenderFunction": + j(path).replaceWith(j.identifier("TypographyRenderFunction")); + break; + } + }) + .toSource(printOptions); +} diff --git a/packages/codemod/transforms/v3-to-v4/scale-transition-props.ts b/packages/codemod/transforms/v3-to-v4/scale-transition-props.ts new file mode 100644 index 0000000000..a6fa85019c --- /dev/null +++ b/packages/codemod/transforms/v3-to-v4/scale-transition-props.ts @@ -0,0 +1,20 @@ +import type { API, FileInfo, Options } from "jscodeshift"; +import { renameProps } from "../utils/renameProps"; + +export default function transformer( + file: FileInfo, + api: API, + options: Options +): string { + const j = api.jscodeshift; + const root = j(file.source); + const printOptions = options.printOptions; + + return renameProps({ + root, + component: "ScaleTransition", + props: { + visible: "transitionIn", + }, + }).toSource(printOptions); +} diff --git a/packages/codemod/tsconfig.build.json b/packages/codemod/tsconfig.build.json new file mode 100644 index 0000000000..5feaec52f4 --- /dev/null +++ b/packages/codemod/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["**/__tests__/**", "**/__testfixtures__/**"] +} diff --git a/packages/codemod/tsconfig.json b/packages/codemod/tsconfig.json new file mode 100644 index 0000000000..a213b3a5e2 --- /dev/null +++ b/packages/codemod/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "outDir": "./bin", + "target": "es5", + "module": "commonjs", + "jsx": "react-jsx", + "sourceMap": true, + "strict": true, + "skipLibCheck": true, + "esModuleInterop": true, + "moduleResolution": "node", + "resolveJsonModule": true, + "noFallthroughCasesInSwitch": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["esnext"] + }, + "include": ["**/*.ts", "**/*.tsx"], + "exclude": ["node_modules", "**/__testfixtures__/**"] +} diff --git a/packages/codemod/updateDocs.js b/packages/codemod/updateDocs.js new file mode 100644 index 0000000000..788f4baf95 --- /dev/null +++ b/packages/codemod/updateDocs.js @@ -0,0 +1,101 @@ +const glob = require('glob'); +const { join } = require('path'); +const { execSync, spawnSync } = require('child_process'); +const { readFileSync, writeFileSync, existsSync } = require('fs'); + +const codemod = 'node ./bin/rmd-codemod'; +const transforms = glob.sync('**/*.ts', { + cwd: 'transforms', + ignore: ['**/__tests__/**', '**/__testfixtures__/**', 'utils/**/*'], +}); + +const toTs = (fileName) => fileName.substring(0, fileName.length - 1); + +const getHelpText = (command = '') => { + const helpOutput = execSync(`${codemod} ${command} -h`).toString().trim(); + + const helpText = `\`\`\`sh +${helpOutput} +\`\`\``; + + if (command) { + const [folder, transformation] = command.split('/'); + const fixtures = join( + 'transforms', + folder, + '__testfixtures__', + 'typescript' + ); + + let input = join(fixtures, `${transformation}.input.tsx`); + let output = join(fixtures, `${transformation}.output.tsx`); + if (existsSync(toTs(input)) && existsSync(toTs(output))) { + input = toTs(input); + output = toTs(output); + } + + if (existsSync(input) && existsSync(output)) { + const args = [ + '--no-pager', + 'diff', + '--no-index', + '--ignore-all-space', + input, + output, + ]; + const diffLines = spawnSync('git', args).output.toString().split(/\r?\n/); + const diff = diffLines.reduce((diff, line, lineNumber) => { + // remove all this junk + // ,diff --git a/transforms/v3-to-v4/__testfixtures__/typescript/rename-text-to-typography.input.tsx b/transforms/v3-to-v4/__testfixtures__/typescript/rename-text-to-typography.output.tsx + // index 2bd814210..216d8b622 100644 + // --- a/transforms/v3-to-v4/__testfixtures__/typescript/rename-text-to-typography.input.tsx + // +++ b/transforms/v3-to-v4/__testfixtures__/typescript/rename-text-to-typography.output.tsx + // @@ -1,17 +1,17 @@ + if (lineNumber > 4) { + return `${diff ? `${diff}\n` : ''}${line}`; + } + + return diff; + }, ''); + + return `#### Changes + +\`\`\`diff +${diff} +\`\`\` + +${helpText}`; + } + } + + return helpText; +}; + +const README = 'README.md'; +const DOCS_TOKEN = ''; + +const contents = readFileSync(README, 'utf8'); +const prefix = contents.substring( + 0, + contents.indexOf(DOCS_TOKEN) + DOCS_TOKEN.length + 1 +); + +const updated = `${prefix} +## Usage + +${getHelpText()} + +### Transformations + +${transforms + .map((fileName) => { + const transform = fileName.replace(/\.(j|t)s$/, ''); + + return `### \`${transform}\` + +${getHelpText(transform)} +`; + }) + .join('\n\n')}`; + +writeFileSync(README, updated, 'utf8'); diff --git a/packages/dev-utils/src/clean.ts b/packages/dev-utils/src/clean.ts index 8f01973313..8fa402280c 100644 --- a/packages/dev-utils/src/clean.ts +++ b/packages/dev-utils/src/clean.ts @@ -2,7 +2,7 @@ import { dist, es, lib, types } from "./constants"; import { clean as remove, glob } from "./utils"; export async function clean(): Promise { - const pattern = `packages/!(dev-utils|documentation)/@(${es}|${lib}|${dist}|${types}|*.tsbuildinfo)`; + const pattern = `packages/!(dev-utils|documentation)/@(${es}|${lib}|${dist}|${types}|bin|*.tsbuildinfo)`; const files = await glob(pattern); return remove(files); diff --git a/packages/dev-utils/src/release.ts b/packages/dev-utils/src/release.ts index b6f190c55f..f6f603169a 100644 --- a/packages/dev-utils/src/release.ts +++ b/packages/dev-utils/src/release.ts @@ -109,6 +109,7 @@ A token can be created at: // have to run the build before updating the changelog data since it pulls // the variables from the react-md package run("yarn build"); + run("yarn workspace @react-md/codemod update-docs"); const updatedVariables = uncommittedFiles(); if (updatedVariables) { diff --git a/packages/dev-utils/src/utils/packages.ts b/packages/dev-utils/src/utils/packages.ts index f042d81682..e34406dcad 100644 --- a/packages/dev-utils/src/utils/packages.ts +++ b/packages/dev-utils/src/utils/packages.ts @@ -116,7 +116,7 @@ export function getPackages(type: PackageType = false): readonly string[] { packages = readdirSync(packagesRoot).filter( (file) => lstatSync(join(packagesRoot, file)).isDirectory() && - !/dev-utils|documentation|react-md/.test(file) + !/dev-utils|documentation|react-md|codemod/.test(file) ); } diff --git a/tsconfig.check.json b/tsconfig.check.json index 772c0d9d80..0192575f42 100644 --- a/tsconfig.check.json +++ b/tsconfig.check.json @@ -13,5 +13,6 @@ "utils/*": ["packages/documentation/src/utils/*"] } }, - "include": ["packages/*/src/**/*", "packages/dev-utils/@types"] + "include": ["packages/*/src/**/*", "packages/dev-utils/@types"], + "exclude": ["packages/codemod/transforms/__testfixtures__/**/*"] } diff --git a/tsconfig.typedoc.json b/tsconfig.typedoc.json index ca39704655..5703c4409f 100644 --- a/tsconfig.typedoc.json +++ b/tsconfig.typedoc.json @@ -8,6 +8,7 @@ "exclude": [ "packages/dev-utils/**", "packages/documentation/**", + "packages/codemod/**", "**/__tests__/**", "**/__mocks__/**" ] diff --git a/yarn.lock b/yarn.lock index 075ef0d854..61434311df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,7 +21,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.4.tgz#081d6bbc336ec5c2435c6346b2ae1fb98b5ac68e" integrity sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q== -"@babel/core@^7.1.0", "@babel/core@^7.16.0", "@babel/core@^7.7.2", "@babel/core@^7.7.5": +"@babel/core@^7.1.0", "@babel/core@^7.13.16", "@babel/core@^7.16.0", "@babel/core@^7.7.2", "@babel/core@^7.7.5": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.0.tgz#c4ff44046f5fe310525cc9eb4ef5147f0c5374d4" integrity sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ== @@ -160,6 +160,13 @@ dependencies: "@babel/types" "^7.16.0" +"@babel/helper-skip-transparent-expression-wrappers@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz#0ee3388070147c3ae051e487eca3ebb0e2e8bb09" + integrity sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-split-export-declaration@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz#29672f43663e936df370aaeb22beddb3baec7438" @@ -195,11 +202,36 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.16.0", "@babel/parser@^7.16.3", "@babel/parser@^7.7.2": +"@babel/parser@^7.1.0", "@babel/parser@^7.13.16", "@babel/parser@^7.16.0", "@babel/parser@^7.16.3", "@babel/parser@^7.7.2": version "7.16.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.4.tgz#d5f92f57cf2c74ffe9b37981c0e72fee7311372e" integrity sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng== +"@babel/plugin-proposal-class-properties@^7.13.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.0.tgz#c029618267ddebc7280fa286e0f8ca2a278a2d1a" + integrity sha512-mCF3HcuZSY9Fcx56Lbn+CGdT44ioBMMvjNVldpKtj8tpniETdLjnxdHI1+sDWXIM1nNt+EanJOZ3IG9lzVjs7A== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.16.0" + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.0.tgz#44e1cce08fe2427482cf446a91bb451528ed0596" + integrity sha512-3bnHA8CAFm7cG93v8loghDYyQ8r97Qydf63BeYiGgYbjKKB/XP53W15wfRC7dvKfoiJ34f6Rbyyx2btExc8XsQ== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + +"@babel/plugin-proposal-optional-chaining@^7.13.12": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.0.tgz#56dbc3970825683608e9efb55ea82c2a2d6c8dc0" + integrity sha512-Y4rFpkZODfHrVo70Uaj6cC1JJOt3Pp0MdWSwIKtb8z1/lsjl9AmnB7ErRFV+QNGIfcY1Eruc2UMx5KaRnXjMyg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" @@ -221,6 +253,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-syntax-flow@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.16.0.tgz#07427021d093ed77019408221beaf0272bbcfaec" + integrity sha512-dH91yCo0RyqfzWgoM5Ji9ir8fQ+uFbt9KHM3d2x4jZOuHS6wNA+CRmRUP/BWCsHG2bjc7A2Way6AvH1eQk0wig== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" @@ -298,7 +337,25 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-typescript@^7.16.1": +"@babel/plugin-transform-flow-strip-types@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.16.0.tgz#edd968dc2041c1b69e451a262e948d6654a79dc2" + integrity sha512-vs/F5roOaO/+WxKfp9PkvLsAyj0G+Q0zbFimHm9X2KDgabN2XmNFoAafmeGEYspUlIF9+MvVmyek9UyHiqeG/w== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-flow" "^7.16.0" + +"@babel/plugin-transform-modules-commonjs@^7.13.8": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.0.tgz#add58e638c8ddc4875bd9a9ecb5c594613f6c922" + integrity sha512-Dzi+NWqyEotgzk/sb7kgQPJQf7AJkQBWsVp1N6JWc1lBVo0vkElUnGdr1PzUBmfsCCN5OOFya3RtpeHk15oLKQ== + dependencies: + "@babel/helper-module-transforms" "^7.16.0" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-simple-access" "^7.16.0" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-typescript@^7.16.0", "@babel/plugin-transform-typescript@^7.16.1": version "7.16.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.16.1.tgz#cc0670b2822b0338355bc1b3d2246a42b8166409" integrity sha512-NO4XoryBng06jjw/qWEU2LhcLJr1tWkhpMam/H4eas/CDKMX/b2/Ylb6EI256Y7+FVPCawwSM1rrJNOpDiz+Lg== @@ -307,6 +364,35 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript" "^7.16.0" +"@babel/preset-flow@^7.13.13": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.16.0.tgz#9f1f6e72714d79460d48058cb5658fc87da7150b" + integrity sha512-e5NE1EoPMpoHFkyFkMSj2h9tu7OolARcUHki8mnBv4NiFK9so+UrhbvT9mV99tMJOUEx8BOj67T6dXvGcTeYeQ== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-validator-option" "^7.14.5" + "@babel/plugin-transform-flow-strip-types" "^7.16.0" + +"@babel/preset-typescript@^7.13.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.16.0.tgz#b0b4f105b855fb3d631ec036cdc9d1ffd1fa5eac" + integrity sha512-txegdrZYgO9DlPbv+9QOVpMnKbOtezsLHWsnsRF4AjbSIsVaujrq1qg8HK0mxQpWv0jnejt0yEoW1uWpvbrDTg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-validator-option" "^7.14.5" + "@babel/plugin-transform-typescript" "^7.16.0" + +"@babel/register@^7.13.16": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.16.0.tgz#f5d2aa14df37cf7146b9759f7c53818360f24ec6" + integrity sha512-lzl4yfs0zVXnooeLE0AAfYaT7F3SPA8yB2Bj4W1BiZwLbMS3MZH35ZvCWSRHvneUugwuM+Wsnrj7h0F7UmU3NQ== + dependencies: + clone-deep "^4.0.1" + find-cache-dir "^2.0.0" + make-dir "^2.1.0" + pirates "^4.0.0" + source-map-support "^0.5.16" + "@babel/runtime-corejs3@^7.10.2": version "7.10.3" resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.10.3.tgz#931ed6941d3954924a7aa967ee440e60c507b91a" @@ -1945,6 +2031,14 @@ resolved "https://registry.yarnpkg.com/@types/he/-/he-1.1.2.tgz#0c8b275f36d2b8b651104638e4d45693349c3953" integrity sha512-kSJPcLO1x+oolc0R89pUl2kozldQ/fVQ1C1p5mp8fPoLdF/ZcBvckaTC2M8xXh3GYendXvCpy5m/a2eSbfgNgw== +"@types/inquirer@^8.1.3": + version "8.1.3" + resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-8.1.3.tgz#dfda4c97cdbe304e4dceb378a80f79448ea5c8fe" + integrity sha512-AayK4ZL5ssPzR1OtnOLGAwpT0Dda3Xi/h1G0l1oJDNrowp7T1423q4Zb8/emr7tzRlCy4ssEri0LWVexAqHyKQ== + dependencies: + "@types/through" "*" + rxjs "^7.2.0" + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" @@ -1977,6 +2071,14 @@ resolved "https://registry.yarnpkg.com/@types/js-cookie/-/js-cookie-3.0.1.tgz#04aa743e2e0a85a22ee9aa61f6591a8bc19b5d68" integrity sha512-7wg/8gfHltklehP+oyJnZrz9XBuX5ZPP4zB6UsI84utdlkRYLnOm2HfpLXazTwZA+fpGn0ir8tGNgVnMEleBGQ== +"@types/jscodeshift@^0.11.3": + version "0.11.3" + resolved "https://registry.yarnpkg.com/@types/jscodeshift/-/jscodeshift-0.11.3.tgz#8dcab24ced39dcab1c8ff3461b3d171aafee3d48" + integrity sha512-pM0JD9kWVDH9DQp5Y6td16924V3MwZHei8P3cTeuFhXpzpk0K+iWraBZz8wF61QkFs9fZeAQNX0q8SG0+TFm2w== + dependencies: + ast-types "^0.14.1" + recast "^0.20.3" + "@types/json-schema@*", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.9": version "7.0.9" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" @@ -2118,6 +2220,13 @@ dependencies: "@types/jest" "*" +"@types/through@*": + version "0.0.30" + resolved "https://registry.yarnpkg.com/@types/through/-/through-0.0.30.tgz#e0e42ce77e897bd6aead6f6ea62aeb135b8a3895" + integrity sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg== + dependencies: + "@types/node" "*" + "@types/yargs-parser@*": version "15.0.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" @@ -2827,6 +2936,13 @@ ast-types-flow@^0.0.7: resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" integrity sha1-9wtzXGvKGlycItmCw+Oef+ujva0= +ast-types@0.14.2, ast-types@^0.14.1: + version "0.14.2" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd" + integrity sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA== + dependencies: + tslib "^2.0.1" + astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" @@ -2906,6 +3022,11 @@ axobject-query@^2.2.0: resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" integrity sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA== +babel-core@^7.0.0-bridge.0: + version "7.0.0-bridge.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" + integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg== + babel-jest@^27.3.1: version "27.3.1" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.3.1.tgz#0636a3404c68e07001e434ac4956d82da8a80022" @@ -2920,6 +3041,13 @@ babel-jest@^27.3.1: graceful-fs "^4.2.4" slash "^3.0.0" +babel-plugin-dynamic-import-node@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" + integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== + dependencies: + object.assign "^4.1.0" + babel-plugin-istanbul@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765" @@ -2985,7 +3113,7 @@ balanced-match@^2.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-2.0.0.tgz#dc70f920d78db8b858535795867bf48f820633d9" integrity sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA== -base64-js@^1.0.2: +base64-js@^1.0.2, base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -3050,6 +3178,15 @@ bl@^1.0.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" +bl@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + bluebird@^3.5.0, bluebird@^3.5.1: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" @@ -3283,6 +3420,14 @@ buffer@5.6.0, buffer@^5.2.1: base64-js "^1.0.2" ieee754 "^1.1.4" +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + builtin-modules@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" @@ -3545,6 +3690,14 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -3727,6 +3880,11 @@ cli-spinners@^1.0.1: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.3.1.tgz#002c1990912d0d59580c93bd36c056de99e4259a" integrity sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg== +cli-spinners@^2.5.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" + integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== + cli-truncate@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" @@ -3960,6 +4118,11 @@ colorette@^2.0.16: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== +colors@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + columnify@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" @@ -5528,7 +5691,7 @@ espree@^9.0.0, espree@^9.1.0: acorn-jsx "^5.3.1" eslint-visitor-keys "^3.1.0" -esprima@^4.0.0, esprima@^4.0.1: +esprima@^4.0.0, esprima@^4.0.1, 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== @@ -5932,6 +6095,15 @@ find-cache-dir@3.3.1: make-dir "^3.0.2" pkg-dir "^4.1.0" +find-cache-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + find-file-up@^0.1.2: version "0.1.3" resolved "https://registry.yarnpkg.com/find-file-up/-/find-file-up-0.1.3.tgz#cf68091bcf9f300a40da411b37da5cce5a2fbea0" @@ -6018,6 +6190,11 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.0.tgz#a5d06b4a8b01e3a63771daa5cb7a1903e2e57067" integrity sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA== +flow-parser@0.*: + version "0.165.1" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.165.1.tgz#e420c560d0c9bd0e546b9f1b79afed37174298c5" + integrity sha512-vz/5MZIePDCZO9FfnRaH398cc+XSwtgoUzR6pC5zbekpk5ttCaXOnxypho+hb0NzUyQNFV+6vpU8joRZ1llrCw== + flush-write-stream@^1.0.0, flush-write-stream@^1.0.2: version "1.1.1" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" @@ -7047,7 +7224,7 @@ identity-obj-proxy@^3.0.0: dependencies: harmony-reflect "^1.4.6" -ieee754@^1.1.4: +ieee754@^1.1.13, ieee754@^1.1.4: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -7206,6 +7383,26 @@ inquirer@^7.3.3: strip-ansi "^6.0.0" through "^2.3.6" +inquirer@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.0.tgz#f44f008dd344bbfc4b30031f45d984e034a3ac3a" + integrity sha512-0crLweprevJ02tTuA6ThpoAERAGyVILC4sS74uib58Xf/zSr1/ZWtmm7D5CI+bSQEaA04f0K7idaHpQbSWgiVQ== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.1" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.21" + mute-stream "0.0.8" + ora "^5.4.1" + run-async "^2.4.0" + rxjs "^7.2.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + internal-slot@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" @@ -7486,6 +7683,11 @@ is-installed-globally@^0.3.1: global-dirs "^2.0.1" is-path-inside "^3.0.1" +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + is-lambda@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" @@ -7734,6 +7936,10 @@ is-url-superb@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-url-superb/-/is-url-superb-4.0.0.tgz#b54d1d2499bb16792748ac967aa3ecb41a33a8c2" integrity sha512-GI+WjezhPPcbM+tqE9LnmsY5qqjwHzTvjJ36wxYX5ujNXefSUJ/T17r5bqDV8yLhcgB59KTPNOc9O9cmHTPWsA== +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== is-utf8@^0.2.0, is-utf8@^0.2.1: version "0.2.1" @@ -8338,6 +8544,31 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= +jscodeshift@^0.13.0: + version "0.13.0" + resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.13.0.tgz#4b3835c3755ea86bc4910ac80acd4acd230b53ee" + integrity sha512-FNHLuwh7TeI0F4EzNVIRwUSxSqsGWM5nTv596FK4NfBnEEKFpIcyFeG559DMFGHSTIYA5AY4Fqh2cBrJx0EAwg== + dependencies: + "@babel/core" "^7.13.16" + "@babel/parser" "^7.13.16" + "@babel/plugin-proposal-class-properties" "^7.13.0" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.13.8" + "@babel/plugin-proposal-optional-chaining" "^7.13.12" + "@babel/plugin-transform-modules-commonjs" "^7.13.8" + "@babel/preset-flow" "^7.13.13" + "@babel/preset-typescript" "^7.13.0" + "@babel/register" "^7.13.16" + babel-core "^7.0.0-bridge.0" + colors "^1.1.2" + flow-parser "0.*" + graceful-fs "^4.2.4" + micromatch "^3.1.10" + neo-async "^2.5.0" + node-dir "^0.1.17" + recast "^0.20.4" + temp "^0.8.4" + write-file-atomic "^2.3.0" + jsdom@^16.6.0: version "16.7.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" @@ -8994,6 +9225,14 @@ log-symbols@^2.1.0: dependencies: chalk "^2.0.1" +log-symbols@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + log-update@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" @@ -9095,7 +9334,7 @@ make-dir@^1.0.0: dependencies: pify "^3.0.0" -make-dir@^2.1.0: +make-dir@^2.0.0, make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== @@ -9678,7 +9917,7 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -neo-async@^2.6.0, neo-async@^2.6.2: +neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== @@ -9762,6 +10001,13 @@ no-case@^2.2.0: dependencies: lower-case "^1.1.1" +node-dir@^0.1.17: + version "0.1.17" + resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" + integrity sha1-X1Zl2TNRM1yqvvjxxVRRbPXx5OU= + dependencies: + minimatch "^3.0.2" + node-fetch-npm@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz#6507d0e17a9ec0be3bec516958a497cec54bf5a4" @@ -10134,7 +10380,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.0.4, object.assign@^4.1.2: +object.assign@^4.0.4, object.assign@^4.1.0, object.assign@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== @@ -10271,6 +10517,21 @@ ora@^1.3.0: cli-spinners "^1.0.1" log-symbols "^2.1.0" +ora@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" + integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== + dependencies: + bl "^4.1.0" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + is-unicode-supported "^0.1.0" + log-symbols "^4.1.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + ordered-read-streams@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e" @@ -10779,7 +11040,7 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= -pirates@^4.0.1: +pirates@^4.0.0, pirates@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== @@ -10793,6 +11054,13 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + pkg-dir@^4.1.0, pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -11821,7 +12089,7 @@ read@1, read@~1.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.5.0, readable-stream@^3.6.0: +readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -11873,6 +12141,16 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +recast@^0.20.3, recast@^0.20.4: + version "0.20.5" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.20.5.tgz#8e2c6c96827a1b339c634dd232957d230553ceae" + integrity sha512-E5qICoPoNL4yU0H0NoBDntNB0Q5oMSNh9usFctYniLBluTthi3RsQVBXIJNbApOlvSwW/RGxIuokPcAc59J5fQ== + dependencies: + ast-types "0.14.2" + esprima "~4.0.0" + source-map "~0.6.1" + tslib "^2.0.1" + rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" @@ -12204,7 +12482,7 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@2.*, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@2.*, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@~2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== @@ -12267,7 +12545,7 @@ rxjs@^6.4.0, rxjs@^6.6.0: dependencies: tslib "^1.9.0" -rxjs@^7.4.0: +rxjs@^7.2.0, rxjs@^7.4.0: version "7.4.0" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.4.0.tgz#a12a44d7eebf016f5ff2441b87f28c9a51cebc68" integrity sha512-7SQDi7xeTMCJpqViXh8gL/lebcwlp3d831F05+9B44A4B0WfsEwUQHR64gsH1kvJ+Ep/J9K2+n1hVl1CsGN23w== @@ -12755,6 +13033,14 @@ source-map-resolve@^0.6.0: atob "^2.1.2" decode-uri-component "^0.2.0" +source-map-support@^0.5.16: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-support@^0.5.6, source-map-support@~0.5.19: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" @@ -13489,6 +13775,13 @@ temp-write@^4.0.0: temp-dir "^1.0.0" uuid "^3.3.2" +temp@^0.8.4: + version "0.8.4" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.4.tgz#8c97a33a4770072e0a05f919396c7665a7dd59f2" + integrity sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg== + dependencies: + rimraf "~2.6.2" + term-size@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" @@ -13781,7 +14074,7 @@ tsconfig-paths@^3.11.0, tsconfig-paths@^3.9.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@2.3.1: +tslib@2.3.1, tslib@^2.0.1: version "2.3.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== @@ -14321,7 +14614,7 @@ watchpack@^2.2.0: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" -wcwidth@^1.0.0: +wcwidth@^1.0.0, wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= @@ -14514,7 +14807,7 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -write-file-atomic@^2.0.0, write-file-atomic@^2.4.2: +write-file-atomic@^2.0.0, write-file-atomic@^2.3.0, write-file-atomic@^2.4.2: version "2.4.3" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==