diff --git a/.eslintignore b/.eslintignore index 738ff5b35..98297ff30 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,3 +5,4 @@ jest.config.js packages/just-stack-monorepo/template/common/scripts packages/example-lib packages/documentation/website/build +packages/codemods/src/__testfixtures__ diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..f0b4d4864 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +#Ignore transforms test output files +**/src/__testfixtures__/*.output.tsx \ No newline at end of file diff --git a/change/@fluentui-react-native-checkbox-5a8debb3-4f5e-46aa-b0df-2e8e25597a2c.json b/change/@fluentui-react-native-checkbox-5a8debb3-4f5e-46aa-b0df-2e8e25597a2c.json new file mode 100644 index 000000000..2bca469cb --- /dev/null +++ b/change/@fluentui-react-native-checkbox-5a8debb3-4f5e-46aa-b0df-2e8e25597a2c.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Fix documentation", + "packageName": "@fluentui-react-native/checkbox", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-codemods-10770a1d-0217-481b-af0a-9df78950d931.json b/change/@fluentui-react-native-codemods-10770a1d-0217-481b-af0a-9df78950d931.json new file mode 100644 index 000000000..7fe403488 --- /dev/null +++ b/change/@fluentui-react-native-codemods-10770a1d-0217-481b-af0a-9df78950d931.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Add button-v0-to-button-v1 script", + "packageName": "@fluentui-react-native/codemods", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/codemods/README.md b/packages/codemods/README.md new file mode 100644 index 000000000..86a45b01e --- /dev/null +++ b/packages/codemods/README.md @@ -0,0 +1,26 @@ +# @fluentui-react-native/transforms + +This package supplies transforms that help with refactoring FURN code. The transforms are passed into [jscodeshift](https://github.com/facebook/jscodeshift) to transform code. + +## Usage + +1. Install jscodeshift using the instructions [here](https://github.com/facebook/jscodeshift#install) +2. Run the transforms using the following command: + +```cli +jscodeshift -t --parser=tsx --extensions=tsx +``` + +For example + +```cli +jscodeshift -t transforms/src/button-v0-to-v1.ts --parser=tsx --extensions=tsx apps/fluent-tester/src/TestComponents/Button/deprecated +``` + +## Tests + +Test files are named in the format `-test.ts`. The "defineTest" from [jscodeshift](https://github.com/facebook/jscodeshift) is used to run the test. +Each test has an input and output file under the `__testfixtures__` folder. The input is an example of code before the transform is run, and the output is what the code should look like after running the transform. +Using this, we can ensure that the codemod works the way we intend to. + +One caveat is that the codemod doesn't quite respect Prettier settings and doesn't seem to correctly format the output. So the output files are ignored by Prettier. diff --git a/packages/codemods/babel.config.js b/packages/codemods/babel.config.js new file mode 100644 index 000000000..e55017b16 --- /dev/null +++ b/packages/codemods/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@fluentui-react-native/scripts/babel.config'); diff --git a/packages/codemods/jest.config.js b/packages/codemods/jest.config.js new file mode 100644 index 000000000..b1f9d15ff --- /dev/null +++ b/packages/codemods/jest.config.js @@ -0,0 +1,2 @@ +const { configureJest } = require('@fluentui-react-native/scripts'); +module.exports = configureJest({ testRegex: '/__tests__/.*-test\\.ts$' }); diff --git a/packages/codemods/just.config.js b/packages/codemods/just.config.js new file mode 100644 index 000000000..4f26f8acb --- /dev/null +++ b/packages/codemods/just.config.js @@ -0,0 +1,3 @@ +const { preset } = require('@fluentui-react-native/scripts'); + +preset(); diff --git a/packages/codemods/package.json b/packages/codemods/package.json new file mode 100644 index 000000000..2fad9c219 --- /dev/null +++ b/packages/codemods/package.json @@ -0,0 +1,37 @@ +{ + "name": "@fluentui-react-native/codemods", + "version": "0.0.1", + "description": "Transform files to make refactoring FURN code easier", + "license": "MIT", + "author": "Microsoft ", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "main": "src/index.ts", + "module": "src/index.ts", + "typings": "lib/index.d.ts", + "scripts": { + "just": "fluentui-scripts", + "clean": "fluentui-scripts clean", + "depcheck": "fluentui-scripts depcheck", + "lint": "fluentui-scripts eslint", + "test": "fluentui-scripts jest", + "prettier": "fluentui-scripts prettier", + "prettier-fix": "fluentui-scripts prettier --fix true" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/codemods" + }, + "devDependencies": { + "@fluentui-react-native/eslint-config-rules": "^0.1.1", + "@fluentui-react-native/scripts": "^0.1.1", + "@fluentui-react-native/test-tools": ">=0.1.1 <1.0.0", + "@types/jscodeshift": "^0.11.5", + "jscodeshift": "^0.13.1" + }, + "depcheck": { + "ignorePatterns": [ + "src/__testfixtures__/*" + ] + } +} diff --git a/packages/codemods/src/__testfixtures__/button-v0-to-v1.input.tsx b/packages/codemods/src/__testfixtures__/button-v0-to-v1.input.tsx new file mode 100644 index 000000000..ed90ba559 --- /dev/null +++ b/packages/codemods/src/__testfixtures__/button-v0-to-v1.input.tsx @@ -0,0 +1,37 @@ +import { Button, PrimaryButton, StealthButton } from '@fluentui/react-native'; +import { IFocusable } from '@fluentui-react-native/interactive-hooks'; +import { Stack } from '@fluentui-react-native/stack'; +import * as React from 'react'; +import { SvgIconProps } from '@fluentui-react-native/icon'; + +export const ButtonFocusTest_deprecated: React.FunctionComponent = () => { + const [state, setState] = React.useState({ + focused: false, + }); + const buttonRef = React.useRef(null); + + const onFocus = React.useCallback(() => { + setState({ focused: !state.focused }); + if (buttonRef.current && !state.focused) { + buttonRef.current.focus(); + } + }, [state, setState]); + const testImage = require('./assets/icon_24x24.png'); + + const svgProps: SvgIconProps = { + viewBox: '0 0 500 500', + }; + const iconProps = { svgSource: svgProps, width: 20, height: 20 }; + + return ( + + + + + + + + + + ); +}; diff --git a/packages/codemods/src/__tests__/button-v0-to-v1-test.ts b/packages/codemods/src/__tests__/button-v0-to-v1-test.ts new file mode 100644 index 000000000..592f9f68d --- /dev/null +++ b/packages/codemods/src/__tests__/button-v0-to-v1-test.ts @@ -0,0 +1,7 @@ +import { defineTest } from 'jscodeshift/dist/testUtils'; + +jest.autoMockOff(); + +describe('button-v0-to-v1', () => { + defineTest(__dirname, 'button-v0-to-v1', null, 'button-v0-to-v1', { parser: 'tsx' }); +}); diff --git a/packages/codemods/src/button-v0-to-v1.ts b/packages/codemods/src/button-v0-to-v1.ts new file mode 100644 index 000000000..ba60e044c --- /dev/null +++ b/packages/codemods/src/button-v0-to-v1.ts @@ -0,0 +1,110 @@ +import { Transform, JSCodeshift, FileInfo, API, Options, ImportDeclaration, ASTPath, JSXElement } from 'jscodeshift'; + +export const transform: Transform = (fileInfo: FileInfo, api: API, options: Options) => { + const j: JSCodeshift = api.jscodeshift; + + const printOptions = options.printOptions || { + printWidth: 140, + quote: 'single', + tabWidth: 2, + trailingComma: true, + }; + + const root = j(fileInfo.source); + root + // Find all imports that import from '@fluentui/react-native' or '@fluentui-react-native/button' + .find( + j.ImportDeclaration, + (path: ImportDeclaration) => path.source.value === '@fluentui/react-native' || path.source.value === '@fluentui-react-native/button', + ) + .forEach((path: ASTPath) => { + if (!path.value.specifiers) { + return; + } + + // Find the first import specifier that imports Button, PrimaryButton or StealthButton. + const buttonSpecifier = path.value.specifiers.findIndex( + (specifier) => + specifier.type === 'ImportSpecifier' && + (specifier.imported.name === 'Button' || + specifier.imported.name === 'PrimaryButton' || + specifier.imported.name === 'StealthButton'), + ); + + // Change that import to be 'ButtonV1 as Button' + if (buttonSpecifier !== undefined && buttonSpecifier !== -1) { + path.value.specifiers[buttonSpecifier] = j.importSpecifier(j.identifier('ButtonV1'), j.identifier('Button')); + } + + // Filter out all other instances of importing Button, PrimaryButton, or StealthButton so that ButtonV1 is only imported once. + path.value.specifiers = path.value.specifiers.filter( + (specifier) => + specifier.type !== 'ImportSpecifier' || + (specifier.imported.name !== 'Button' && + specifier.imported.name !== 'PrimaryButton' && + specifier.imported.name !== 'StealthButton'), + ); + }); + + // Change JSX instances of previous buttons to new type of button + root.findJSXElements('PrimaryButton').forEach((path: ASTPath) => { + if (path.value.openingElement.name.type === 'JSXIdentifier') { + path.value.openingElement.name.name = 'Button'; + if (path.value.openingElement.attributes === undefined) { + path.value.openingElement.attributes = []; + } + path.value.openingElement.attributes.push(j.jsxAttribute(j.jsxIdentifier('appearance'), j.literal('primary'))); + } + }); + + root.findJSXElements('StealthButton').forEach((path) => { + if (path.value.openingElement.name.type === 'JSXIdentifier') { + path.value.openingElement.name.name = 'Button'; + + if (path.value.openingElement.attributes === undefined) { + path.value.openingElement.attributes = []; + } + path.value.openingElement.attributes.push(j.jsxAttribute(j.jsxIdentifier('appearance'), j.literal('subtle'))); + } + }); + + // Replace old props with new props + root.findJSXElements('Button').forEach((path) => { + let attributes = path.value.openingElement.attributes; + if (attributes === undefined) { + attributes = []; + } + + attributes.forEach((attribute) => { + if (attribute.type === 'JSXAttribute') { + if (attribute.name.name === 'startIcon') { + attribute.name.name = 'icon'; + + attributes!.push(j.jsxAttribute(j.jsxIdentifier('iconPosition'), j.literal('before'))); + } + + if (attribute.name.name === 'endIcon') { + attribute.name.name = 'icon'; + + attributes!.push(j.jsxAttribute(j.jsxIdentifier('iconPosition'), j.literal('after'))); + } + + if (attribute.name.name === 'content') { + path.value.openingElement.selfClosing = false; + path.value.closingElement = j.jsxClosingElement(j.jsxIdentifier('Button')); + + const child = attribute.value; + if (child) { + path.value.children = [child]; + } + } + } + }); + + path.value.openingElement.attributes = attributes.filter((path) => path.type === 'JSXSpreadAttribute' || path.name.name !== 'content'); + }); + + return root.toSource(printOptions); +}; + +export default transform; diff --git a/packages/codemods/tsconfig.json b/packages/codemods/tsconfig.json new file mode 100644 index 000000000..8c6817ed9 --- /dev/null +++ b/packages/codemods/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@fluentui-react-native/scripts/tsconfig.json", + "compilerOptions": { + "outDir": "lib", + "types": ["node", "jest"] + }, + "include": ["src"], + "exclude": ["src/__testfixtures__"] +} diff --git a/packages/components/Checkbox/MIGRATION.md b/packages/components/Checkbox/MIGRATION.md index 6b0345fcf..436e54728 100644 --- a/packages/components/Checkbox/MIGRATION.md +++ b/packages/components/Checkbox/MIGRATION.md @@ -27,7 +27,7 @@ import { CheckboxV1 as Checkbox } from '@fluentui-react-native/checkbox'; ### Props repurposed - `ariaLabel` => Use `accessibilityLabel` prop instead -- `boxSide` => Use `after` value for `labelPosition` prop instead of `start` or `before` value for `labelPosition` prop instead of `after` +- `boxSide` => Use `after` value for `labelPosition` prop instead of `start` or `before` value for `labelPosition` prop instead of `end` ### Props removed diff --git a/scripts/src/justPreset.ts b/scripts/src/justPreset.ts index 1ed7c66a8..a8f55b868 100644 --- a/scripts/src/justPreset.ts +++ b/scripts/src/justPreset.ts @@ -12,6 +12,7 @@ const { ts } = require('./tasks/ts'); const { eslint } = require('./tasks/eslint'); const { depcheckTask } = require('./tasks/depcheck'); const { checkForModifiedFiles } = require('./tasks/checkForModifiedFilesTask'); +const { findGitRoot } = require('workspace-tools'); export function preset() { // this add s a resolve path for the build tooling deps like TS from the scripts folder @@ -35,7 +36,11 @@ export function preset() { task('ts:esm', ts.esm); task('eslint', eslint); task('ts:commonjs-only', ts.commonjsOnly); - task('prettier', () => (argv().fix ? prettierTask({ files: ['src/.'] }) : prettierCheckTask({ files: ['src/.'] }))); + task('prettier', () => + argv().fix + ? prettierTask({ files: ['src/.'], ignorePath: path.join(findGitRoot(process.cwd()), '.prettierignore') }) + : prettierCheckTask({ files: ['src/.'], ignorePath: path.join(findGitRoot(process.cwd()), '.prettierignore') }), + ); task('checkForModifiedFiles', checkForModifiedFiles); task('tsall', parallel('ts:commonjs', 'ts:esm')); task( diff --git a/yarn.lock b/yarn.lock index 23c83903a..b2f09d76d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -292,7 +292,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.1.tgz#72d647b4ff6a4f82878d184613353af1dd0290f9" integrity sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg== -"@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.12.3", "@babel/core@^7.14.0", "@babel/core@^7.15.5", "@babel/core@^7.7.2", "@babel/core@^7.8.0": +"@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.12.3", "@babel/core@^7.13.16", "@babel/core@^7.14.0", "@babel/core@^7.15.5", "@babel/core@^7.7.2", "@babel/core@^7.8.0": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.1.tgz#c8fa615c5e88e272564ace3d42fbc8b17bfeb22b" integrity sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw== @@ -637,7 +637,7 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.4.tgz#d5f92f57cf2c74ffe9b37981c0e72fee7311372e" integrity sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng== -"@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.14.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.4", "@babel/parser@^7.18.10", "@babel/parser@^7.19.1", "@babel/parser@^7.4.3", "@babel/parser@^7.9.4": +"@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.13.16", "@babel/parser@^7.14.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.4", "@babel/parser@^7.18.10", "@babel/parser@^7.19.1", "@babel/parser@^7.4.3", "@babel/parser@^7.9.4": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.1.tgz#6f6d6c2e621aad19a92544cc217ed13f1aac5b4c" integrity sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A== @@ -668,7 +668,7 @@ "@babel/helper-remap-async-to-generator" "^7.18.9" "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.1.0", "@babel/plugin-proposal-class-properties@^7.18.6": +"@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.1.0", "@babel/plugin-proposal-class-properties@^7.13.0", "@babel/plugin-proposal-class-properties@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== @@ -725,7 +725,7 @@ "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.0.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.1.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": +"@babel/plugin-proposal-nullish-coalescing-operator@^7.0.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.1.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8", "@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== @@ -760,7 +760,7 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-proposal-optional-chaining@^7.0.0", "@babel/plugin-proposal-optional-chaining@^7.1.0", "@babel/plugin-proposal-optional-chaining@^7.18.9": +"@babel/plugin-proposal-optional-chaining@^7.0.0", "@babel/plugin-proposal-optional-chaining@^7.1.0", "@babel/plugin-proposal-optional-chaining@^7.13.12", "@babel/plugin-proposal-optional-chaining@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz#e8e8fe0723f2563960e4bf5e9690933691915993" integrity sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w== @@ -851,6 +851,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-syntax-flow@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.18.6.tgz#774d825256f2379d06139be0c723c4dd444f3ca1" + integrity sha512-LUbR+KNTBWCUAqRG9ex5Gnzu2IOkt8jRJbHHXFT9q+L9zm7M/QQbEqXyw1n1pohYvOyWC8CjeyjrSaIwiYjK7A== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-import-assertions@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz#cd6190500a4fa2fe31990a963ffab4b63e4505e4" @@ -1046,6 +1053,14 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-flow" "^7.16.7" +"@babel/plugin-transform-flow-strip-types@^7.18.6": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.19.0.tgz#e9e8606633287488216028719638cbbb2f2dde8f" + integrity sha512-sgeMlNaQVbCSpgLSKP4ZZKfsJVnFnNQlUSk6gPYzR/q7tzCgQF2t8RBKAP6cKJeZdveei7Q7Jm527xepI8lNLg== + dependencies: + "@babel/helper-plugin-utils" "^7.19.0" + "@babel/plugin-syntax-flow" "^7.18.6" + "@babel/plugin-transform-for-of@^7.0.0", "@babel/plugin-transform-for-of@^7.18.8": version "7.18.8" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" @@ -1085,7 +1100,7 @@ "@babel/helper-plugin-utils" "^7.18.6" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.1.0", "@babel/plugin-transform-modules-commonjs@^7.18.6": +"@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.1.0", "@babel/plugin-transform-modules-commonjs@^7.13.8", "@babel/plugin-transform-modules-commonjs@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz#afd243afba166cca69892e24a8fd8c9f2ca87883" integrity sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q== @@ -1382,6 +1397,15 @@ "@babel/helper-validator-option" "^7.16.7" "@babel/plugin-transform-flow-strip-types" "^7.16.7" +"@babel/preset-flow@^7.13.13": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.18.6.tgz#83f7602ba566e72a9918beefafef8ef16d2810cb" + integrity sha512-E7BDhL64W6OUqpuyHnSroLnqyRTcG6ZdOBl1OKI/QK/HJfplqK/S3sq1Cckx7oTodJ5yOXyfw7rEADJ6UjoQDQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-validator-option" "^7.18.6" + "@babel/plugin-transform-flow-strip-types" "^7.18.6" + "@babel/preset-modules@^0.1.5": version "0.1.5" resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" @@ -1405,7 +1429,7 @@ "@babel/plugin-transform-react-jsx-development" "^7.18.6" "@babel/plugin-transform-react-pure-annotations" "^7.18.6" -"@babel/preset-typescript@^7.0.0", "@babel/preset-typescript@^7.1.0", "@babel/preset-typescript@^7.8.0": +"@babel/preset-typescript@^7.0.0", "@babel/preset-typescript@^7.1.0", "@babel/preset-typescript@^7.13.0", "@babel/preset-typescript@^7.8.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz#ce64be3e63eddc44240c6358daefac17b3186399" integrity sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ== @@ -1425,6 +1449,17 @@ pirates "^4.0.5" source-map-support "^0.5.16" +"@babel/register@^7.13.16": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.18.9.tgz#1888b24bc28d5cc41c412feb015e9ff6b96e439c" + integrity sha512-ZlbnXDcNYHMR25ITwwNKT88JiaukkdVj/nG7r3wnuXkOTHc60Uy05PwMCPre0hSkY68E6zK3xz+vUJSP2jWmcw== + dependencies: + clone-deep "^4.0.1" + find-cache-dir "^2.0.0" + make-dir "^2.1.0" + pirates "^4.0.5" + source-map-support "^0.5.16" + "@babel/runtime@7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" @@ -3165,6 +3200,14 @@ jest-diff "^26.0.0" pretty-format "^26.0.0" +"@types/jscodeshift@^0.11.5": + version "0.11.5" + resolved "https://registry.yarnpkg.com/@types/jscodeshift/-/jscodeshift-0.11.5.tgz#51198aa72ceb66d36ceba3918e1ab445b868f29b" + integrity sha512-7JV0qdblTeWFigevmwFUgROXX395F+MQx6v0YqPn8Bx0B4Sng6alEejz9PENzgLYpG+zL0O4tGdBzc4gKZH8XA== + dependencies: + ast-types "^0.14.1" + recast "^0.20.3" + "@types/jsftp@2.1.2": version "2.1.2" resolved "https://registry.yarnpkg.com/@types/jsftp/-/jsftp-2.1.2.tgz#4acfe315d7d2d73de84309554a8d1374bba37d4e" @@ -4610,7 +4653,7 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= -ast-types@0.14.2: +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== @@ -9416,6 +9459,31 @@ jscodeshift@^0.11.0: temp "^0.8.1" write-file-atomic "^2.3.0" +jscodeshift@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.13.1.tgz#69bfe51e54c831296380585c6d9e733512aecdef" + integrity sha512-lGyiEbGOvmMRKgWk4vf+lUrCWO/8YR8sUR3FKF1Cq5fovjZDlIcw3Hu5ppLHAnEXshVffvaM0eyuY/AbOeYpnQ== + 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" + chalk "^4.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" + jsdoc-plugin-typescript@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/jsdoc-plugin-typescript/-/jsdoc-plugin-typescript-2.1.0.tgz#6fc1c192e5f31e4ded9e266d7a17cc378c7560d5" @@ -12251,7 +12319,7 @@ realpath-native@^1.1.0: dependencies: util.promisify "^1.0.0" -recast@^0.20.3: +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== @@ -13399,7 +13467,7 @@ temp@0.8.3: os-tmpdir "^1.0.0" rimraf "~2.2.6" -temp@^0.8.1: +temp@^0.8.1, 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==