From 447e3e302a06913606dddbe453606ede24153ca0 Mon Sep 17 00:00:00 2001 From: Sasha Mysak Date: Wed, 20 Mar 2024 22:15:29 +0100 Subject: [PATCH] feat: introduce react v19 codemods and upgrade jscodeshift --- .gitignore | 1 + .../remove-context-provider/.codemodrc.json | 13 + codemods-v2/remove-context-provider/README.md | 35 + .../__testfixtures__/fixture1.input.jsx | 9 + .../__testfixtures__/fixture1.output.jsx | 9 + .../__testfixtures__/fixture2.input.jsx | 9 + .../__testfixtures__/fixture2.output.jsx | 9 + .../__testfixtures__/fixture3.input.jsx | 9 + .../__testfixtures__/fixture3.output.jsx | 9 + .../__testfixtures__/fixture4.input.tsx | 9 + .../__testfixtures__/fixture4.output.tsx | 9 + .../__testfixtures__/fixture5.input.tsx | 9 + .../__testfixtures__/fixture5.output.tsx | 9 + .../__testfixtures__/fixture6.input.tsx | 9 + .../__testfixtures__/fixture6.output.tsx | 9 + .../remove-context-provider/index.d.ts | 3 + .../remove-context-provider/src/index.ts | 37 + .../remove-context-provider/test/test.ts | 129 ++ .../remove-forward-ref/.codemodrc.json | 14 + codemods-v2/remove-forward-ref/README.md | 25 + .../__testfixtures__/fixture1.input.jsx | 5 + .../__testfixtures__/fixture1.output.jsx | 4 + .../__testfixtures__/fixture2.input.jsx | 5 + .../__testfixtures__/fixture2.output.jsx | 4 + .../__testfixtures__/fixture3.input.jsx | 5 + .../__testfixtures__/fixture3.output.jsx | 4 + .../__testfixtures__/fixture4.input.tsx | 6 + .../__testfixtures__/fixture4.output.tsx | 7 + .../__testfixtures__/fixture5.input.jsx | 5 + .../__testfixtures__/fixture5.output.jsx | 6 + .../__testfixtures__/fixture6.input.jsx | 5 + .../__testfixtures__/fixture6.output.jsx | 3 + .../__testfixtures__/fixture7.input.jsx | 5 + .../__testfixtures__/fixture7.output.jsx | 4 + .../__testfixtures__/fixture8.input.tsx | 6 + .../__testfixtures__/fixture8.output.tsx | 5 + .../__testfixtures__/fixture9.input.tsx | 8 + .../__testfixtures__/fixture9.output.tsx | 6 + codemods-v2/remove-forward-ref/index.d.ts | 3 + codemods-v2/remove-forward-ref/src/index.ts | 248 ++++ codemods-v2/remove-forward-ref/test/test.ts | 174 +++ .../remove-memoization-hooks/.codemodrc.json | 13 + .../remove-memoization-hooks/README.md | 5 + .../__testfixtures__/fixture1.input.jsx | 8 + .../__testfixtures__/fixture1.output.jsx | 6 + .../__testfixtures__/fixture2.input.jsx | 8 + .../__testfixtures__/fixture2.output.jsx | 6 + .../__testfixtures__/fixture3.input.jsx | 7 + .../__testfixtures__/fixture3.output.jsx | 5 + .../__testfixtures__/fixture4.input.jsx | 21 + .../__testfixtures__/fixture4.output.jsx | 21 + .../__testfixtures__/fixture5.input.tsx | 8 + .../__testfixtures__/fixture5.output.tsx | 6 + .../__testfixtures__/fixture6.input.tsx | 8 + .../__testfixtures__/fixture6.output.tsx | 6 + .../__testfixtures__/fixture7.input.tsx | 7 + .../__testfixtures__/fixture7.output.tsx | 7 + .../__testfixtures__/fixture8.input.tsx | 21 + .../__testfixtures__/fixture8.output.tsx | 21 + .../remove-memoization-hooks/index.d.ts | 3 + .../remove-memoization-hooks/src/index.ts | 56 + .../remove-memoization-hooks/test/test.ts | 163 +++ codemods-v2/use-context-hook/.codemodrc.json | 13 + codemods-v2/use-context-hook/README.md | 25 + .../__testfixtures__/fixture1.input.jsx | 4 + .../__testfixtures__/fixture1.output.jsx | 4 + .../__testfixtures__/fixture2.input.jsx | 4 + .../__testfixtures__/fixture2.output.jsx | 4 + .../__testfixtures__/fixture3.input.jsx | 1 + .../__testfixtures__/fixture3.output.jsx | 1 + .../__testfixtures__/fixture4.input.tsx | 11 + .../__testfixtures__/fixture4.output.tsx | 11 + .../__testfixtures__/fixture5.input.tsx | 11 + .../__testfixtures__/fixture5.output.tsx | 11 + .../__testfixtures__/fixture6.input.tsx | 8 + .../__testfixtures__/fixture6.output.tsx | 8 + codemods-v2/use-context-hook/index.d.ts | 3 + codemods-v2/use-context-hook/src/index.ts | 69 + codemods-v2/use-context-hook/test/test.ts | 141 ++ package.json | 9 +- ...-element-to-jsx-preserve-comments.input.js | 16 - ...element-to-jsx-preserve-comments.output.js | 16 - ...class.tsx.input.js => class.tsx.input.tsx} | 0 ...ass.tsx.output.js => class.tsx.output.tsx} | 0 ...named-imports-react-not-removed.input.tsx} | 0 ...amed-imports-react-not-removed.output.tsx} | 0 ...ure-named-imports-variable-used.input.tsx} | 0 ...re-named-imports-variable-used.output.tsx} | 0 ...js => destructure-named-imports.input.tsx} | 0 ...s => destructure-named-imports.output.tsx} | 0 ...ifiers-import-react-variable.tsx.input.tsx | 5 + ...fiers-import-react-variable.tsx.output.tsx | 6 + ...d-multiple-specifiers-import.tsx.input.tsx | 3 + ...-multiple-specifiers-import.tsx.output.tsx | 3 + ...tsx.input.js => jsx-element.tsx.input.tsx} | 0 ...x.output.js => jsx-element.tsx.output.tsx} | 0 ...sx.input.js => jsx-fragment.tsx.input.tsx} | 0 ....output.js => jsx-fragment.tsx.output.tsx} | 0 ...input.js => leading-comment.tsx.input.tsx} | 0 ...tput.js => leading-comment.tsx.output.tsx} | 0 ...s => preserve-types-default.tsx.input.tsx} | 0 ... => preserve-types-default.tsx.output.tsx} | 0 ...=> preserve-types-namespace.tsx.input.tsx} | 0 ...> preserve-types-namespace.tsx.output.tsx} | 0 ...t-already-used-named-export.tsx.input.tsx} | 0 ...-already-used-named-export.tsx.output.tsx} | 0 ...-jsx-element-react-variable.tsx.input.tsx} | 0 ...jsx-element-react-variable.tsx.output.tsx} | 0 ...-default-export-jsx-element.tsx.input.tsx} | 0 ...default-export-jsx-element.tsx.output.tsx} | 0 ... react-basic-default-export.tsx.input.tsx} | 0 ...react-basic-default-export.tsx.output.tsx} | 0 ...react-jsx-member-expression.tsx.input.tsx} | 0 ...eact-jsx-member-expression.tsx.output.tsx} | 0 ...put.js => react-not-removed.tsx.input.tsx} | 0 ...ut.js => react-not-removed.tsx.output.tsx} | 0 ...js => variable-already-used.tsx.input.tsx} | 0 ...s => variable-already-used.tsx.output.tsx} | 0 tsconfig.json | 39 + vitest.config.ts | 7 + yarn.lock | 1294 ++++++++++++++++- 121 files changed, 2910 insertions(+), 106 deletions(-) create mode 100644 codemods-v2/remove-context-provider/.codemodrc.json create mode 100644 codemods-v2/remove-context-provider/README.md create mode 100644 codemods-v2/remove-context-provider/__testfixtures__/fixture1.input.jsx create mode 100644 codemods-v2/remove-context-provider/__testfixtures__/fixture1.output.jsx create mode 100644 codemods-v2/remove-context-provider/__testfixtures__/fixture2.input.jsx create mode 100644 codemods-v2/remove-context-provider/__testfixtures__/fixture2.output.jsx create mode 100644 codemods-v2/remove-context-provider/__testfixtures__/fixture3.input.jsx create mode 100644 codemods-v2/remove-context-provider/__testfixtures__/fixture3.output.jsx create mode 100644 codemods-v2/remove-context-provider/__testfixtures__/fixture4.input.tsx create mode 100644 codemods-v2/remove-context-provider/__testfixtures__/fixture4.output.tsx create mode 100644 codemods-v2/remove-context-provider/__testfixtures__/fixture5.input.tsx create mode 100644 codemods-v2/remove-context-provider/__testfixtures__/fixture5.output.tsx create mode 100644 codemods-v2/remove-context-provider/__testfixtures__/fixture6.input.tsx create mode 100644 codemods-v2/remove-context-provider/__testfixtures__/fixture6.output.tsx create mode 100644 codemods-v2/remove-context-provider/index.d.ts create mode 100644 codemods-v2/remove-context-provider/src/index.ts create mode 100644 codemods-v2/remove-context-provider/test/test.ts create mode 100644 codemods-v2/remove-forward-ref/.codemodrc.json create mode 100644 codemods-v2/remove-forward-ref/README.md create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture1.input.jsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture1.output.jsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture2.input.jsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture2.output.jsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture3.input.jsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture3.output.jsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture4.input.tsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture4.output.tsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture5.input.jsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture5.output.jsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture6.input.jsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture6.output.jsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture7.input.jsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture7.output.jsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture8.input.tsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture8.output.tsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture9.input.tsx create mode 100644 codemods-v2/remove-forward-ref/__testfixtures__/fixture9.output.tsx create mode 100644 codemods-v2/remove-forward-ref/index.d.ts create mode 100644 codemods-v2/remove-forward-ref/src/index.ts create mode 100644 codemods-v2/remove-forward-ref/test/test.ts create mode 100644 codemods-v2/remove-memoization-hooks/.codemodrc.json create mode 100644 codemods-v2/remove-memoization-hooks/README.md create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture1.input.jsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture1.output.jsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture2.input.jsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture2.output.jsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture3.input.jsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture3.output.jsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture4.input.jsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture4.output.jsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture5.input.tsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture5.output.tsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture6.input.tsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture6.output.tsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture7.input.tsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture7.output.tsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture8.input.tsx create mode 100644 codemods-v2/remove-memoization-hooks/__testfixtures__/fixture8.output.tsx create mode 100644 codemods-v2/remove-memoization-hooks/index.d.ts create mode 100644 codemods-v2/remove-memoization-hooks/src/index.ts create mode 100644 codemods-v2/remove-memoization-hooks/test/test.ts create mode 100644 codemods-v2/use-context-hook/.codemodrc.json create mode 100644 codemods-v2/use-context-hook/README.md create mode 100644 codemods-v2/use-context-hook/__testfixtures__/fixture1.input.jsx create mode 100644 codemods-v2/use-context-hook/__testfixtures__/fixture1.output.jsx create mode 100644 codemods-v2/use-context-hook/__testfixtures__/fixture2.input.jsx create mode 100644 codemods-v2/use-context-hook/__testfixtures__/fixture2.output.jsx create mode 100644 codemods-v2/use-context-hook/__testfixtures__/fixture3.input.jsx create mode 100644 codemods-v2/use-context-hook/__testfixtures__/fixture3.output.jsx create mode 100644 codemods-v2/use-context-hook/__testfixtures__/fixture4.input.tsx create mode 100644 codemods-v2/use-context-hook/__testfixtures__/fixture4.output.tsx create mode 100644 codemods-v2/use-context-hook/__testfixtures__/fixture5.input.tsx create mode 100644 codemods-v2/use-context-hook/__testfixtures__/fixture5.output.tsx create mode 100644 codemods-v2/use-context-hook/__testfixtures__/fixture6.input.tsx create mode 100644 codemods-v2/use-context-hook/__testfixtures__/fixture6.output.tsx create mode 100644 codemods-v2/use-context-hook/index.d.ts create mode 100644 codemods-v2/use-context-hook/src/index.ts create mode 100644 codemods-v2/use-context-hook/test/test.ts rename transforms/__testfixtures__/rename-unsafe-lifecycles/typescript/{class.tsx.input.js => class.tsx.input.tsx} (100%) rename transforms/__testfixtures__/rename-unsafe-lifecycles/typescript/{class.tsx.output.js => class.tsx.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/{destructure-named-imports-react-not-removed.input.js => destructure-named-imports-react-not-removed.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/{destructure-named-imports-react-not-removed.output.js => destructure-named-imports-react-not-removed.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/{destructure-named-imports-variable-used.input.js => destructure-named-imports-variable-used.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/{destructure-named-imports-variable-used.output.js => destructure-named-imports-variable-used.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/{destructure-named-imports.input.js => destructure-named-imports.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/{destructure-named-imports.output.js => destructure-named-imports.output.tsx} (100%) create mode 100644 transforms/__testfixtures__/update-react-imports/typescript/default-and-multiple-specifiers-import-react-variable.tsx.input.tsx create mode 100644 transforms/__testfixtures__/update-react-imports/typescript/default-and-multiple-specifiers-import-react-variable.tsx.output.tsx create mode 100644 transforms/__testfixtures__/update-react-imports/typescript/default-and-multiple-specifiers-import.tsx.input.tsx create mode 100644 transforms/__testfixtures__/update-react-imports/typescript/default-and-multiple-specifiers-import.tsx.output.tsx rename transforms/__testfixtures__/update-react-imports/typescript/{jsx-element.tsx.input.js => jsx-element.tsx.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{jsx-element.tsx.output.js => jsx-element.tsx.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{jsx-fragment.tsx.input.js => jsx-fragment.tsx.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{jsx-fragment.tsx.output.js => jsx-fragment.tsx.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{leading-comment.tsx.input.js => leading-comment.tsx.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{leading-comment.tsx.output.js => leading-comment.tsx.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{preserve-types-default.tsx.input.js => preserve-types-default.tsx.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{preserve-types-default.tsx.output.js => preserve-types-default.tsx.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{preserve-types-namespace.tsx.input.js => preserve-types-namespace.tsx.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{preserve-types-namespace.tsx.output.js => preserve-types-namespace.tsx.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{react-already-used-named-export.tsx.input.js => react-already-used-named-export.tsx.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{react-already-used-named-export.tsx.output.js => react-already-used-named-export.tsx.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{react-basic-default-export-jsx-element-react-variable.tsx.input.js => react-basic-default-export-jsx-element-react-variable.tsx.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{react-basic-default-export-jsx-element-react-variable.tsx.output.js => react-basic-default-export-jsx-element-react-variable.tsx.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{react-basic-default-export-jsx-element.tsx.input.js => react-basic-default-export-jsx-element.tsx.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{react-basic-default-export-jsx-element.tsx.output.js => react-basic-default-export-jsx-element.tsx.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{react-basic-default-export.tsx.input.js => react-basic-default-export.tsx.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{react-basic-default-export.tsx.output.js => react-basic-default-export.tsx.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{react-jsx-member-expression.tsx.input.js => react-jsx-member-expression.tsx.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{react-jsx-member-expression.tsx.output.js => react-jsx-member-expression.tsx.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{react-not-removed.tsx.input.js => react-not-removed.tsx.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{react-not-removed.tsx.output.js => react-not-removed.tsx.output.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{variable-already-used.tsx.input.js => variable-already-used.tsx.input.tsx} (100%) rename transforms/__testfixtures__/update-react-imports/typescript/{variable-already-used.tsx.output.js => variable-already-used.tsx.output.tsx} (100%) create mode 100644 tsconfig.json create mode 100644 vitest.config.ts diff --git a/.gitignore b/.gitignore index f928a640..3a2a90d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_STORE +dist node_modules npm-debug.log diff --git a/codemods-v2/remove-context-provider/.codemodrc.json b/codemods-v2/remove-context-provider/.codemodrc.json new file mode 100644 index 00000000..2e1c68d2 --- /dev/null +++ b/codemods-v2/remove-context-provider/.codemodrc.json @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "name": "react/19/remove-context-provider", + "private": false, + "engine": "jscodeshift", + "meta": { + "tags": ["react"], + "useCaseCategory": "migration" + }, + "applicability": { + "from": [["react", "<=", "^18.0.0"]] + } +} diff --git a/codemods-v2/remove-context-provider/README.md b/codemods-v2/remove-context-provider/README.md new file mode 100644 index 00000000..fa1b733d --- /dev/null +++ b/codemods-v2/remove-context-provider/README.md @@ -0,0 +1,35 @@ +# Change Context.Provider to Context + +## Description + +This codemod will remove the usage of `Provider` for contexts; e.g., Context.Provider to Context + +## Example + +### Before: + +```tsx +function App() { + const [theme, setTheme] = useState('light'); + // ... + return ( + + + + ); +} +``` + +### After: + +```tsx +function App() { + const [theme, setTheme] = useState('light'); + // ... + return ( + + + + ); +} +``` \ No newline at end of file diff --git a/codemods-v2/remove-context-provider/__testfixtures__/fixture1.input.jsx b/codemods-v2/remove-context-provider/__testfixtures__/fixture1.input.jsx new file mode 100644 index 00000000..a066cc86 --- /dev/null +++ b/codemods-v2/remove-context-provider/__testfixtures__/fixture1.input.jsx @@ -0,0 +1,9 @@ +function App() { + const [theme, setTheme] = useState('light'); + + return ( + + + + ); +} \ No newline at end of file diff --git a/codemods-v2/remove-context-provider/__testfixtures__/fixture1.output.jsx b/codemods-v2/remove-context-provider/__testfixtures__/fixture1.output.jsx new file mode 100644 index 00000000..84f317b8 --- /dev/null +++ b/codemods-v2/remove-context-provider/__testfixtures__/fixture1.output.jsx @@ -0,0 +1,9 @@ +function App() { + const [theme, setTheme] = useState('light'); + + return ( + + + + ); +} \ No newline at end of file diff --git a/codemods-v2/remove-context-provider/__testfixtures__/fixture2.input.jsx b/codemods-v2/remove-context-provider/__testfixtures__/fixture2.input.jsx new file mode 100644 index 00000000..18cb6e6c --- /dev/null +++ b/codemods-v2/remove-context-provider/__testfixtures__/fixture2.input.jsx @@ -0,0 +1,9 @@ +function App() { + const [theme, setTheme] = useState('light'); + + return ( + + + + ); +} \ No newline at end of file diff --git a/codemods-v2/remove-context-provider/__testfixtures__/fixture2.output.jsx b/codemods-v2/remove-context-provider/__testfixtures__/fixture2.output.jsx new file mode 100644 index 00000000..9ef65738 --- /dev/null +++ b/codemods-v2/remove-context-provider/__testfixtures__/fixture2.output.jsx @@ -0,0 +1,9 @@ +function App() { + const [theme, setTheme] = useState('light'); + + return ( + + + + ); +} \ No newline at end of file diff --git a/codemods-v2/remove-context-provider/__testfixtures__/fixture3.input.jsx b/codemods-v2/remove-context-provider/__testfixtures__/fixture3.input.jsx new file mode 100644 index 00000000..9ef65738 --- /dev/null +++ b/codemods-v2/remove-context-provider/__testfixtures__/fixture3.input.jsx @@ -0,0 +1,9 @@ +function App() { + const [theme, setTheme] = useState('light'); + + return ( + + + + ); +} \ No newline at end of file diff --git a/codemods-v2/remove-context-provider/__testfixtures__/fixture3.output.jsx b/codemods-v2/remove-context-provider/__testfixtures__/fixture3.output.jsx new file mode 100644 index 00000000..9ef65738 --- /dev/null +++ b/codemods-v2/remove-context-provider/__testfixtures__/fixture3.output.jsx @@ -0,0 +1,9 @@ +function App() { + const [theme, setTheme] = useState('light'); + + return ( + + + + ); +} \ No newline at end of file diff --git a/codemods-v2/remove-context-provider/__testfixtures__/fixture4.input.tsx b/codemods-v2/remove-context-provider/__testfixtures__/fixture4.input.tsx new file mode 100644 index 00000000..97872054 --- /dev/null +++ b/codemods-v2/remove-context-provider/__testfixtures__/fixture4.input.tsx @@ -0,0 +1,9 @@ +function App({ url }: { url: string }) { + const [theme, setTheme] = useState<'light' | 'dark'>('light'); + + return ( + + + + ); +} \ No newline at end of file diff --git a/codemods-v2/remove-context-provider/__testfixtures__/fixture4.output.tsx b/codemods-v2/remove-context-provider/__testfixtures__/fixture4.output.tsx new file mode 100644 index 00000000..f1d45694 --- /dev/null +++ b/codemods-v2/remove-context-provider/__testfixtures__/fixture4.output.tsx @@ -0,0 +1,9 @@ +function App({ url }: { url: string }) { + const [theme, setTheme] = useState<'light' | 'dark'>('light'); + + return ( + + + + ); +} \ No newline at end of file diff --git a/codemods-v2/remove-context-provider/__testfixtures__/fixture5.input.tsx b/codemods-v2/remove-context-provider/__testfixtures__/fixture5.input.tsx new file mode 100644 index 00000000..b8d72610 --- /dev/null +++ b/codemods-v2/remove-context-provider/__testfixtures__/fixture5.input.tsx @@ -0,0 +1,9 @@ +function App({ url }: { url: string }) { + const [theme, setTheme] = useState<'light' | 'dark'>('light'); + + return ( + + + + ); +} \ No newline at end of file diff --git a/codemods-v2/remove-context-provider/__testfixtures__/fixture5.output.tsx b/codemods-v2/remove-context-provider/__testfixtures__/fixture5.output.tsx new file mode 100644 index 00000000..357cc7c7 --- /dev/null +++ b/codemods-v2/remove-context-provider/__testfixtures__/fixture5.output.tsx @@ -0,0 +1,9 @@ +function App({ url }: { url: string }) { + const [theme, setTheme] = useState<'light' | 'dark'>('light'); + + return ( + + + + ); +} \ No newline at end of file diff --git a/codemods-v2/remove-context-provider/__testfixtures__/fixture6.input.tsx b/codemods-v2/remove-context-provider/__testfixtures__/fixture6.input.tsx new file mode 100644 index 00000000..357cc7c7 --- /dev/null +++ b/codemods-v2/remove-context-provider/__testfixtures__/fixture6.input.tsx @@ -0,0 +1,9 @@ +function App({ url }: { url: string }) { + const [theme, setTheme] = useState<'light' | 'dark'>('light'); + + return ( + + + + ); +} \ No newline at end of file diff --git a/codemods-v2/remove-context-provider/__testfixtures__/fixture6.output.tsx b/codemods-v2/remove-context-provider/__testfixtures__/fixture6.output.tsx new file mode 100644 index 00000000..357cc7c7 --- /dev/null +++ b/codemods-v2/remove-context-provider/__testfixtures__/fixture6.output.tsx @@ -0,0 +1,9 @@ +function App({ url }: { url: string }) { + const [theme, setTheme] = useState<'light' | 'dark'>('light'); + + return ( + + + + ); +} \ No newline at end of file diff --git a/codemods-v2/remove-context-provider/index.d.ts b/codemods-v2/remove-context-provider/index.d.ts new file mode 100644 index 00000000..f1be7f8f --- /dev/null +++ b/codemods-v2/remove-context-provider/index.d.ts @@ -0,0 +1,3 @@ +import type { API, FileInfo } from "jscodeshift"; + +export default function transform(file: FileInfo, api: API): string; diff --git a/codemods-v2/remove-context-provider/src/index.ts b/codemods-v2/remove-context-provider/src/index.ts new file mode 100644 index 00000000..0930d844 --- /dev/null +++ b/codemods-v2/remove-context-provider/src/index.ts @@ -0,0 +1,37 @@ +import type { API, FileInfo } from 'jscodeshift'; + +export default function transform( + file: FileInfo, + api: API, +): string | undefined { + const j = api.jscodeshift; + const root = j(file.source); + + root.findJSXElements().forEach((elementPath) => { + const { value } = elementPath; + const elements = [value.openingElement, value.closingElement]; + elements.forEach((element) => { + if (!element) { + return; + } + if ( + !j.JSXMemberExpression.check(element.name) || + !j.JSXIdentifier.check(element.name.object) + ) { + return; + } + + const objectName = element.name.object.name; + const propertyName = element.name.property.name; + + if ( + objectName.toLocaleLowerCase().includes('context') && + propertyName === 'Provider' + ) { + element.name = element.name.object; + } + }); + }); + + return root.toSource(); +} diff --git a/codemods-v2/remove-context-provider/test/test.ts b/codemods-v2/remove-context-provider/test/test.ts new file mode 100644 index 00000000..407601e2 --- /dev/null +++ b/codemods-v2/remove-context-provider/test/test.ts @@ -0,0 +1,129 @@ +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; +import { join } from 'node:path'; +import jscodeshift, { API, FileInfo } from 'jscodeshift'; +import { describe, it } from 'vitest'; +import transform from '../src/index'; + +export const buildApi = (parser: string | undefined): API => ({ + j: parser ? jscodeshift.withParser(parser) : jscodeshift, + jscodeshift: parser ? jscodeshift.withParser(parser) : jscodeshift, + stats: () => { + console.error( + 'The stats function was called, which is not supported on purpose', + ); + }, + report: () => { + console.error( + 'The report function was called, which is not supported on purpose', + ); + }, +}); + +describe('Context.Provider -> Context', () => { + describe('javascript code', () => { + it('should replace ThemeContext.Provider with ThemeContext', async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture1.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture1.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: 'index.ts', + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi('js')); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ''), + OUTPUT.replace(/\W/gm, ''), + ); + }); + + it('should replace Context.Provider with Context', async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture2.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture2.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: 'index.ts', + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi('js')); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ''), + OUTPUT.replace(/\W/gm, '') + ); + }); + + it('should do nothing if .Provider does not exist', async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture3.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture3.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: 'index.ts', + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi('js')); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ''), + OUTPUT.replace(/\W/gm, '') + ); + }); + }); + + describe('typescript code', () => { + it('should replace ThemeContext.Provider with ThemeContext', async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture4.input.tsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture4.output.tsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: 'index.ts', + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi('tsx')); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ''), + OUTPUT.replace(/\W/gm, '') + ); + }); + + it('should replace Context.Provider with Context', async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture5.input.tsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture5.output.tsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: 'index.ts', + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi('tsx')); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ''), + OUTPUT.replace(/\W/gm, '') + ); + }); + + it('should do nothing if .Provider does not exist', async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture6.input.tsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture6.output.tsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: 'index.ts', + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi('tsx')); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ''), + OUTPUT.replace(/\W/gm, '') + ); + }); + }); +}); diff --git a/codemods-v2/remove-forward-ref/.codemodrc.json b/codemods-v2/remove-forward-ref/.codemodrc.json new file mode 100644 index 00000000..15061891 --- /dev/null +++ b/codemods-v2/remove-forward-ref/.codemodrc.json @@ -0,0 +1,14 @@ +{ + "version": "1.0.0", + "private": false, + "name": "react/19/remove-forward-ref", + "description": "Codemod to remove React.forwardRef function that will be deprecated in next major React release", + "engine": "jscodeshift", + "meta": { + "tags": ["react"], + "useCaseCategory": "migration" + }, + "applicability": { + "from": [["react", "<=", "^18.0.0"]] + } +} diff --git a/codemods-v2/remove-forward-ref/README.md b/codemods-v2/remove-forward-ref/README.md new file mode 100644 index 00000000..484713f7 --- /dev/null +++ b/codemods-v2/remove-forward-ref/README.md @@ -0,0 +1,25 @@ +# Replace forwardRef with ref prop + +## Description + +React.forwardRef will be deprecated for Function Components in near future. This codemod removes forwardRef function. + +## Example + +### Before: + +```jsx +import { forwardRef } from 'react'; + +const MyInput = forwardRef(function MyInput(props, ref) { + // ... +}); +``` + +### After: + +```tsx +const MyInput = function MyInput({ ref, ...otherProps }) { + // ... +}; +``` diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture1.input.jsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture1.input.jsx new file mode 100644 index 00000000..faf9c4c9 --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture1.input.jsx @@ -0,0 +1,5 @@ +import { forwardRef } from 'react'; + +const MyInput = forwardRef((props, ref) => { + return null; +}); \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture1.output.jsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture1.output.jsx new file mode 100644 index 00000000..30d50bcb --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture1.output.jsx @@ -0,0 +1,4 @@ +const MyInput = props => { + const { ref } = props; + return null; +}; \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture2.input.jsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture2.input.jsx new file mode 100644 index 00000000..ee8f84e0 --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture2.input.jsx @@ -0,0 +1,5 @@ +import { forwardRef } from 'react'; + +const MyInput = forwardRef(function A(props, ref) { + return null; +}); \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture2.output.jsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture2.output.jsx new file mode 100644 index 00000000..f60690b3 --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture2.output.jsx @@ -0,0 +1,4 @@ +const MyInput = function A(props) { + const { ref } = props; + return null; +}; \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture3.input.jsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture3.input.jsx new file mode 100644 index 00000000..aa2f3cc8 --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture3.input.jsx @@ -0,0 +1,5 @@ +import { forwardRef } from 'react'; + +const MyInput = forwardRef(function MyInput(props, ref) { + return null; +}); \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture3.output.jsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture3.output.jsx new file mode 100644 index 00000000..20c8ac77 --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture3.output.jsx @@ -0,0 +1,4 @@ +const MyInput = function MyInput(props) { + const { ref } = props; + return null; +}; \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture4.input.tsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture4.input.tsx new file mode 100644 index 00000000..91f3728b --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture4.input.tsx @@ -0,0 +1,6 @@ +import type { X } from 'react'; +import { forwardRef, type Y } from 'react'; + +const MyInput = forwardRef(function MyInput(props, ref) { + return null; +}); \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture4.output.tsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture4.output.tsx new file mode 100644 index 00000000..2f8d6eb1 --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture4.output.tsx @@ -0,0 +1,7 @@ +import type { X } from 'react'; +import { type Y } from 'react'; + +const MyInput = function MyInput(props) { + const { ref } = props; + return null; +}; \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture5.input.jsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture5.input.jsx new file mode 100644 index 00000000..e6675dc4 --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture5.input.jsx @@ -0,0 +1,5 @@ +import { forwardRef, useState } from 'react'; + +const MyInput = forwardRef(function MyInput(props, ref) { + return null; +}); \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture5.output.jsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture5.output.jsx new file mode 100644 index 00000000..aa1f8a5e --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture5.output.jsx @@ -0,0 +1,6 @@ +import { useState } from 'react'; + +const MyInput = function MyInput(props) { + const { ref } = props; + return null; +}; \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture6.input.jsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture6.input.jsx new file mode 100644 index 00000000..b7bb0d7f --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture6.input.jsx @@ -0,0 +1,5 @@ +import { forwardRef } from 'react'; + +const MyInput = forwardRef(function MyInput({ onChange }, ref) { + return +}); \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture6.output.jsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture6.output.jsx new file mode 100644 index 00000000..78f5ef78 --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture6.output.jsx @@ -0,0 +1,3 @@ +const MyInput = function MyInput({ ref, onChange }) { + return +}; \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture7.input.jsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture7.input.jsx new file mode 100644 index 00000000..2d66977d --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture7.input.jsx @@ -0,0 +1,5 @@ +import { forwardRef } from 'react'; + +const MyInput = forwardRef(function MyInput(props, ref) { + return +}); \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture7.output.jsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture7.output.jsx new file mode 100644 index 00000000..13b6383f --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture7.output.jsx @@ -0,0 +1,4 @@ +const MyInput = function MyInput(props) { + const { ref } = props; + return +}; \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture8.input.tsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture8.input.tsx new file mode 100644 index 00000000..2a045b63 --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture8.input.tsx @@ -0,0 +1,6 @@ +import { forwardRef } from 'react'; +type Props = { a: 1 }; + +const MyInput = forwardRef((props, ref) => { + return null; +}); \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture8.output.tsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture8.output.tsx new file mode 100644 index 00000000..3f9eafba --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture8.output.tsx @@ -0,0 +1,5 @@ +type Props = { a: 1 }; +const MyInput = (props: Props & { ref: React.RefObject; }) => { + const { ref } = props; + return null; +}; \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture9.input.tsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture9.input.tsx new file mode 100644 index 00000000..cae62026 --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture9.input.tsx @@ -0,0 +1,8 @@ +import { forwardRef } from 'react'; + +const MyComponent = forwardRef(function Component( + myProps: Props, + myRef: React.ForwardedRef + ) { + return null; +}); \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/__testfixtures__/fixture9.output.tsx b/codemods-v2/remove-forward-ref/__testfixtures__/fixture9.output.tsx new file mode 100644 index 00000000..78e73af3 --- /dev/null +++ b/codemods-v2/remove-forward-ref/__testfixtures__/fixture9.output.tsx @@ -0,0 +1,6 @@ +const MyComponent = function Component( + myProps: Props & { ref: React.RefObject; } +) { + const { ref: myRef } = myProps; + return null; +}; \ No newline at end of file diff --git a/codemods-v2/remove-forward-ref/index.d.ts b/codemods-v2/remove-forward-ref/index.d.ts new file mode 100644 index 00000000..e10deea5 --- /dev/null +++ b/codemods-v2/remove-forward-ref/index.d.ts @@ -0,0 +1,3 @@ +import type { API, FileInfo } from 'jscodeshift'; + +export default function transform(file: FileInfo, api: API): string; diff --git a/codemods-v2/remove-forward-ref/src/index.ts b/codemods-v2/remove-forward-ref/src/index.ts new file mode 100644 index 00000000..94ea9ee1 --- /dev/null +++ b/codemods-v2/remove-forward-ref/src/index.ts @@ -0,0 +1,248 @@ +import type { + API, + BlockStatement, + FileInfo, + Identifier, + JSCodeshift, + TSTypeReference, + Transform, +} from "jscodeshift"; + +// Props & { ref: React.RefObject} +const buildPropsAndRefIntersectionTypeAnnotation = ( + j: JSCodeshift, + propType: TSTypeReference, + refType: TSTypeReference, +) => + j.tsTypeAnnotation( + j.tsIntersectionType([ + propType, + j.tsTypeLiteral([ + j.tsPropertySignature.from({ + key: j.identifier("ref"), + typeAnnotation: j.tsTypeAnnotation( + j.tsTypeReference.from({ + typeName: j.tsQualifiedName( + j.identifier("React"), + j.identifier("RefObject"), + ), + typeParameters: j.tsTypeParameterInstantiation([refType]), + }), + ), + }), + ]), + ]), + ); + +// const { ref } = props; +const buildRefArgVariableDeclaration = ( + j: JSCodeshift, + refArgName: string, + propArgName: string, +) => + j.variableDeclaration("const", [ + j.variableDeclarator( + j.objectPattern([ + j.objectProperty.from({ + shorthand: true, + key: j.identifier("ref"), + value: j.identifier(refArgName), + }), + ]), + j.identifier(propArgName), + ), + ]); + +// React.ForwardedRef => HTMLButtonElement +const getRefTypeFromRefArg = (j: JSCodeshift, refArg: Identifier) => { + const typeReference = refArg.typeAnnotation?.typeAnnotation; + + if ( + !j.TSTypeReference.check(typeReference) || + !j.TSQualifiedName.check(typeReference.typeName) + ) { + return null; + } + + const { right } = typeReference.typeName; + + if (!j.Identifier.check(right) || right.name === "forwardedRef") { + return null; + } + + const [firstTypeParameter] = typeReference.typeParameters?.params ?? []; + + if (!j.TSTypeReference.check(firstTypeParameter)) { + return null; + } + + return firstTypeParameter; +}; + +export default function transform(file: FileInfo, api: API) { + const { j } = api; + + const root = j(file.source); + + let dirtyFlag = false; + + root + .find(j.CallExpression, { + callee: { + type: "Identifier", + name: "forwardRef", + }, + }) + .replaceWith((callExpressionPath) => { + const [renderFunctionArg] = callExpressionPath.node.arguments; + + if ( + !j.FunctionExpression.check(renderFunctionArg) && + !j.ArrowFunctionExpression.check(renderFunctionArg) + ) { + return null; + } + + const [propsArg, refArg] = renderFunctionArg.params; + + if (!j.Identifier.check(refArg) || propsArg === undefined) { + return null; + } + + const refArgTypeReference = getRefTypeFromRefArg(j, refArg); + + // remove refArg + renderFunctionArg.params.splice(1, 1); + + const refArgName = refArg.name; + + // if props are ObjectPattern, push ref as ObjectProperty + if (j.ObjectPattern.check(propsArg)) { + propsArg.properties.unshift( + j.objectProperty.from({ + shorthand: true, + key: j.identifier(refArgName), + value: j.identifier(refArgName), + }), + ); + + // update prop arg type + const propsArgTypeReference = propsArg.typeAnnotation?.typeAnnotation; + + if ( + j.TSTypeReference.check(propsArgTypeReference) && + j.TSTypeReference.check(refArgTypeReference) + ) { + propsArg.typeAnnotation = buildPropsAndRefIntersectionTypeAnnotation( + j, + propsArgTypeReference, + refArgTypeReference, + ); + } + } + + // if props arg is Identifier, push ref variable declaration to the function body + if (j.Identifier.check(propsArg)) { + // if we have arrow function with implicit return, we want to wrap it with BlockStatement + if ( + j.ArrowFunctionExpression.check(renderFunctionArg) && + !j.BlockStatement.check(renderFunctionArg.body) + ) { + renderFunctionArg.body = j.blockStatement.from({ + body: [j.returnStatement(renderFunctionArg.body)], + }); + } + + const newDeclaration = buildRefArgVariableDeclaration( + j, + refArg.name, + propsArg.name, + ); + + (renderFunctionArg.body as BlockStatement).body.unshift(newDeclaration); + + const propsArgTypeReference = propsArg.typeAnnotation?.typeAnnotation; + + if ( + j.TSTypeReference.check(propsArgTypeReference) && + j.TSTypeReference.check(refArgTypeReference) + ) { + propsArg.typeAnnotation = buildPropsAndRefIntersectionTypeAnnotation( + j, + propsArgTypeReference, + refArgTypeReference, + ); + } + } + + /** + * Transform ts types: forwardRef type arguments are used + */ + + // @ts-expect-error Property 'typeParameters' does not exist on type 'CallExpression'. + const typeParameters = callExpressionPath.node.typeParameters; + + // if typeParameters are used in forwardRef generic, reuse them to annotate props type + // forwardRef((props) => { ... }) ====> (props: Props & { ref: React.RefObject }) => { ... } + if ( + j.TSTypeParameterInstantiation.check(typeParameters) && + propsArg !== undefined && + "typeAnnotation" in propsArg + ) { + const [refType, propType] = typeParameters.params; + + if ( + j.TSTypeReference.check(refType) && + j.TSTypeReference.check(propType) + ) { + propsArg.typeAnnotation = buildPropsAndRefIntersectionTypeAnnotation( + j, + propType, + refType, + ); + } + } + + dirtyFlag = true; + return renderFunctionArg; + }); + + /** + * handle import + */ + if (dirtyFlag) { + root + .find(j.ImportDeclaration, { + source: { + value: "react", + }, + }) + .forEach((importDeclarationPath) => { + const { specifiers, importKind } = importDeclarationPath.node; + + if (importKind !== "value") { + return; + } + + if (specifiers === undefined) { + return; + } + + const forwardRefImportSpecifierIndex = specifiers.findIndex( + (s) => j.ImportSpecifier.check(s) && s.imported.name === "forwardRef", + ); + + specifiers.splice(forwardRefImportSpecifierIndex, 1); + }) + .filter((importDeclarationPath) => { + const { specifiers } = importDeclarationPath.node; + // remove the import if there are no more specifiers left after removing forwardRef + return specifiers === undefined || specifiers.length === 0; + }) + .remove(); + } + + return root.toSource(); +} + +transform satisfies Transform; diff --git a/codemods-v2/remove-forward-ref/test/test.ts b/codemods-v2/remove-forward-ref/test/test.ts new file mode 100644 index 00000000..a02cbd5d --- /dev/null +++ b/codemods-v2/remove-forward-ref/test/test.ts @@ -0,0 +1,174 @@ +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; +import { join } from 'node:path'; +import jscodeshift, { API, FileInfo } from 'jscodeshift'; +import { describe, it } from "vitest"; +import transform from "../src/index"; + +export const buildApi = (parser: string | undefined): API => ({ + j: parser ? jscodeshift.withParser(parser) : jscodeshift, + jscodeshift: parser ? jscodeshift.withParser(parser) : jscodeshift, + stats: () => { + console.error( + 'The stats function was called, which is not supported on purpose', + ); + }, + report: () => { + console.error( + 'The report function was called, which is not supported on purpose', + ); + }, +}); + +describe("react/remove-forward-ref", () => { + it("Unwraps the render function: render function is ArrowFunctionExpression", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture1.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture1.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.js", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx")); + + assert.deepEqual( + actualOutput?.replace(/\s/gm, ""), + OUTPUT.replace(/\s/gm, ""), + ); + }); + + it("Unwraps the render function: render function is FunctionExpression", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture2.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture2.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.js", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx")); + + assert.deepEqual( + actualOutput?.replace(/\s/gm, ""), + OUTPUT.replace(/\s/gm, ""), + ); + }); + + it("forwardRef import: removes the import when only forwardRef is a single specifier", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture3.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture3.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.js", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx")); + + assert.deepEqual( + actualOutput?.replace(/\s/gm, ""), + OUTPUT.replace(/\s/gm, ""), + ); + }); + + it("forwardRef import: should not remove type imports", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture4.input.tsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture4.output.tsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.js", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx")); + + assert.deepEqual( + actualOutput?.replace(/\s/gm, ""), + OUTPUT.replace(/\s/gm, ""), + ); + }); + + it("forwardRef import: removes forwardRef specifier", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture5.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture5.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.js", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx")); + + assert.deepEqual( + actualOutput?.replace(/\s/gm, ""), + OUTPUT.replace(/\s/gm, ""), + ); + }); + + it("Replaces the second arg of the render function: props are ObjectPattern", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture6.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture6.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.js", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx")); + + assert.deepEqual( + actualOutput?.replace(/\s/gm, ""), + OUTPUT.replace(/\s/gm, ""), + ); + }); + + it("Replaces the second arg of the render function: props are Identifier", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture7.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture7.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.js", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx")); + + assert.deepEqual( + actualOutput?.replace(/\s/gm, ""), + OUTPUT.replace(/\s/gm, ""), + ); + }); + + it("Typescript: reuses forwardRef typeArguments", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture8.input.tsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture8.output.tsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.js", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx")); + assert.deepEqual( + actualOutput?.replace(/\s/gm, ""), + OUTPUT.replace(/\s/gm, ""), + ); + }); + + it("Typescript: reuses wrapped function type arguments", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture9.input.tsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture9.output.tsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.js", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx")); + assert.deepEqual( + actualOutput?.replace(/\s/gm, ""), + OUTPUT.replace(/\s/gm, ""), + ); + }); +}); diff --git a/codemods-v2/remove-memoization-hooks/.codemodrc.json b/codemods-v2/remove-memoization-hooks/.codemodrc.json new file mode 100644 index 00000000..45e8e567 --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/.codemodrc.json @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "name": "react/19/remove-memoization", + "private": false, + "engine": "jscodeshift", + "meta": { + "tags": ["react"], + "useCaseCategory": "migration" + }, + "applicability": { + "from": [["react", "<=", "18"]] + } +} diff --git a/codemods-v2/remove-memoization-hooks/README.md b/codemods-v2/remove-memoization-hooks/README.md new file mode 100644 index 00000000..c505093e --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/README.md @@ -0,0 +1,5 @@ +# Remove Manual Memoization Hooks + +## Description + +This codemod will remove manual memoization hooks: `useCallback`, `useMemo` and `memo`. This codemod goes hand in hand with React Compiler. diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture1.input.jsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture1.input.jsx new file mode 100644 index 00000000..b85ec059 --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture1.input.jsx @@ -0,0 +1,8 @@ +import { useCallback } from 'react'; + +function Component() { + const selectedDateMin3DaysDifference = useCallback(() => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }, [today, selectedDate]); +} \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture1.output.jsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture1.output.jsx new file mode 100644 index 00000000..494a4238 --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture1.output.jsx @@ -0,0 +1,6 @@ +function Component() { + const selectedDateMin3DaysDifference = () => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }; +} \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture2.input.jsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture2.input.jsx new file mode 100644 index 00000000..8a9f3e5a --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture2.input.jsx @@ -0,0 +1,8 @@ +import { useMemo } from 'react'; + +function Component() { + const selectedDateMin3DaysDifference = useMemo(() => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }, [today, selectedDate]); +} \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture2.output.jsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture2.output.jsx new file mode 100644 index 00000000..494a4238 --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture2.output.jsx @@ -0,0 +1,6 @@ +function Component() { + const selectedDateMin3DaysDifference = () => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }; +} \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture3.input.jsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture3.input.jsx new file mode 100644 index 00000000..a2809f30 --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture3.input.jsx @@ -0,0 +1,7 @@ +import { memo } from 'react'; + +const MyComponent = ({ name }) => { + return
Hello, {name}!
; +}; + +const MemoizedMyComponent = memo(MyComponent); \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture3.output.jsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture3.output.jsx new file mode 100644 index 00000000..6e0f9111 --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture3.output.jsx @@ -0,0 +1,5 @@ +const MyComponent = ({ name }) => { + return
Hello, {name}!
; +}; + +const MemoizedMyComponent = MyComponent; \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture4.input.jsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture4.input.jsx new file mode 100644 index 00000000..a175d188 --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture4.input.jsx @@ -0,0 +1,21 @@ +import React from 'react'; + +function Component() { + const state = React.useState(); + + const example1 = React.useMemo(() => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }, [today, selectedDate]); + + const example2 = React.useCallback(() => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }, [today, selectedDate]); +} + +const MyComponent = ({ name }) => { + return
Hello, {name}!
; +}; + +const MemoizedMyComponent = React.memo(MyComponent); \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture4.output.jsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture4.output.jsx new file mode 100644 index 00000000..aa4e313a --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture4.output.jsx @@ -0,0 +1,21 @@ +import React from 'react'; + +function Component() { + const state = React.useState(); + + const example1 = () => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }; + + const example2 = () => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }; +} + +const MyComponent = ({ name }) => { + return
Hello, {name}!
; +}; + +const MemoizedMyComponent = MyComponent; diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture5.input.tsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture5.input.tsx new file mode 100644 index 00000000..63437ccc --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture5.input.tsx @@ -0,0 +1,8 @@ +import { useCallback } from 'react'; + +function Component({ url }: { url: string }) { + const selectedDateMin3DaysDifference = useCallback(() => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }, [today, selectedDate]); +} \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture5.output.tsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture5.output.tsx new file mode 100644 index 00000000..9ed5b475 --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture5.output.tsx @@ -0,0 +1,6 @@ +function Component({ url }: { url: string }) { + const selectedDateMin3DaysDifference = () => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }; +} \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture6.input.tsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture6.input.tsx new file mode 100644 index 00000000..522b68bd --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture6.input.tsx @@ -0,0 +1,8 @@ +import { useMemo } from 'react'; + +function Component({ url }: { url: string }) { + const selectedDateMin3DaysDifference = useMemo(() => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }, [today, selectedDate]); +} \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture6.output.tsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture6.output.tsx new file mode 100644 index 00000000..9ed5b475 --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture6.output.tsx @@ -0,0 +1,6 @@ +function Component({ url }: { url: string }) { + const selectedDateMin3DaysDifference = () => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }; +} \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture7.input.tsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture7.input.tsx new file mode 100644 index 00000000..c329931e --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture7.input.tsx @@ -0,0 +1,7 @@ +import React, { memo, type ReactNode } from 'react'; + +const MyComponent = ({ name } : { name: string }) => { + return
Hello, {name}!
; +}; + +const MemoizedMyComponent: ReactNode = memo(MyComponent); \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture7.output.tsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture7.output.tsx new file mode 100644 index 00000000..4eecfd65 --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture7.output.tsx @@ -0,0 +1,7 @@ +import React, { type ReactNode } from 'react'; + +const MyComponent = ({ name } : { name: string }) => { + return
Hello, {name}!
; +}; + +const MemoizedMyComponent: ReactNode = MyComponent; \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture8.input.tsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture8.input.tsx new file mode 100644 index 00000000..1fd3598a --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture8.input.tsx @@ -0,0 +1,21 @@ +import React from 'react'; + +function Component({ url }: { url: string }) { + const state = React.useState(); + + const example1 = React.useMemo(() => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }, [today, selectedDate]); + + const example2 = React.useCallback(() => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }, [today, selectedDate]); +} + +const MyComponent = ({ name } : { name: string }) => { + return
Hello, {name}!
; +}; + +const MemoizedMyComponent: React.ReactNode = React.memo(MyComponent); \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture8.output.tsx b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture8.output.tsx new file mode 100644 index 00000000..875c0753 --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/__testfixtures__/fixture8.output.tsx @@ -0,0 +1,21 @@ +import React from 'react'; + +function Component({ url }: { url: string }) { + const state = React.useState(); + + const example1 = () => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }; + + const example2 = () => { + const diff = today.diff(selectedDate, "days"); + return diff > 3 || diff < -3; + }; +} + +const MyComponent = ({ name } : { name: string }) => { + return
Hello, {name}!
; +}; + +const MemoizedMyComponent: React.ReactNode = MyComponent; \ No newline at end of file diff --git a/codemods-v2/remove-memoization-hooks/index.d.ts b/codemods-v2/remove-memoization-hooks/index.d.ts new file mode 100644 index 00000000..f1be7f8f --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/index.d.ts @@ -0,0 +1,3 @@ +import type { API, FileInfo } from "jscodeshift"; + +export default function transform(file: FileInfo, api: API): string; diff --git a/codemods-v2/remove-memoization-hooks/src/index.ts b/codemods-v2/remove-memoization-hooks/src/index.ts new file mode 100644 index 00000000..c4e660a1 --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/src/index.ts @@ -0,0 +1,56 @@ +import type { API, FileInfo } from "jscodeshift"; + +export default function transform( + file: FileInfo, + api: API, +): string | undefined { + const j = api.jscodeshift; + const root = j(file.source); + + const hooksToRemove = ["useMemo", "useCallback", "memo"]; + + root.find(j.ImportDeclaration).forEach((path) => { + if (path.node.specifiers?.length === 0) { + return; + } + + const specifiers = + path.node.specifiers?.filter((specifier) => { + if (specifier.type === "ImportSpecifier") { + return !hooksToRemove.includes(specifier.imported.name); + } + return specifier; + }) ?? []; + + if (specifiers.length === 0) { + j(path).remove(); + } else { + path.node.specifiers = specifiers; + } + }); + + hooksToRemove.forEach((hook) => { + root + .find(j.CallExpression, { + callee: { + type: "Identifier", + name: hook, + }, + }) + .replaceWith((path) => path.value.arguments[0]); + }); + + hooksToRemove.forEach((hook) => { + root + .find(j.CallExpression, { + callee: { + type: "MemberExpression", + object: { name: "React" }, + property: { name: hook }, + }, + }) + .replaceWith((path) => path.value.arguments[0]); + }); + + return root.toSource(); +} diff --git a/codemods-v2/remove-memoization-hooks/test/test.ts b/codemods-v2/remove-memoization-hooks/test/test.ts new file mode 100644 index 00000000..fa0e9eb6 --- /dev/null +++ b/codemods-v2/remove-memoization-hooks/test/test.ts @@ -0,0 +1,163 @@ +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; +import { join } from 'node:path'; +import jscodeshift, { API, FileInfo } from 'jscodeshift'; +import { describe, it } from "vitest"; +import transform from "../src/index"; + +export const buildApi = (parser: string | undefined): API => ({ + j: parser ? jscodeshift.withParser(parser) : jscodeshift, + jscodeshift: parser ? jscodeshift.withParser(parser) : jscodeshift, + stats: () => { + console.error( + 'The stats function was called, which is not supported on purpose', + ); + }, + report: () => { + console.error( + 'The report function was called, which is not supported on purpose', + ); + }, +}); + +describe("react/19/remove-memoization-hooks", () => { + describe("javascript code", () => { + it("should remove useCallback", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture1.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture1.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("js")); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + + it("should remove useMemo", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture2.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture2.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("js")); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + + it("should remove memo", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture3.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture3.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("js")); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + + it("should remove React.useMemo, React.useCallback, React.memo", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture4.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture4.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("js")); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + }); + + describe("typescript code", () => { + it("should remove useCallback", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture5.input.tsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture5.output.tsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx")); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + + it("should remove useMemo", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture6.input.tsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture6.output.tsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx")); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + + it("should remove memo", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture7.input.tsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture7.output.tsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx")); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + + it("should remove React.useMemo, React.useCallback, React.memo", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture8.input.tsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture8.output.tsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx")); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + }); +}); diff --git a/codemods-v2/use-context-hook/.codemodrc.json b/codemods-v2/use-context-hook/.codemodrc.json new file mode 100644 index 00000000..92bb5b08 --- /dev/null +++ b/codemods-v2/use-context-hook/.codemodrc.json @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "name": "react/19/use-context-hook", + "private": false, + "engine": "jscodeshift", + "meta": { + "tags": ["react"], + "useCaseCategory": "migration" + }, + "applicability": { + "from": [["react", "<=", "18"]] + } +} diff --git a/codemods-v2/use-context-hook/README.md b/codemods-v2/use-context-hook/README.md new file mode 100644 index 00000000..14b6f004 --- /dev/null +++ b/codemods-v2/use-context-hook/README.md @@ -0,0 +1,25 @@ +# Change useContext usage to use hook + +## Description + +This codemod will convert the usage of `useContext` to the new hook format, introduced in React v19. + +## Example + +### Before: + +```tsx +import { useContext } from "react"; +import ThemeContext from "./ThemeContext"; + +const theme = useContext(ThemeContext); +``` + +### After: + +```tsx +import { use } from "react"; +import ThemeContext from "./ThemeContext"; + +const theme = use(ThemeContext); +``` diff --git a/codemods-v2/use-context-hook/__testfixtures__/fixture1.input.jsx b/codemods-v2/use-context-hook/__testfixtures__/fixture1.input.jsx new file mode 100644 index 00000000..979a8e47 --- /dev/null +++ b/codemods-v2/use-context-hook/__testfixtures__/fixture1.input.jsx @@ -0,0 +1,4 @@ +import { useContext } from "react"; +import ThemeContext from "./ThemeContext"; + +const theme = useContext(ThemeContext); \ No newline at end of file diff --git a/codemods-v2/use-context-hook/__testfixtures__/fixture1.output.jsx b/codemods-v2/use-context-hook/__testfixtures__/fixture1.output.jsx new file mode 100644 index 00000000..e251b573 --- /dev/null +++ b/codemods-v2/use-context-hook/__testfixtures__/fixture1.output.jsx @@ -0,0 +1,4 @@ +import { use } from "react"; +import ThemeContext from "./ThemeContext"; + +const theme = use(ThemeContext); \ No newline at end of file diff --git a/codemods-v2/use-context-hook/__testfixtures__/fixture2.input.jsx b/codemods-v2/use-context-hook/__testfixtures__/fixture2.input.jsx new file mode 100644 index 00000000..67718d98 --- /dev/null +++ b/codemods-v2/use-context-hook/__testfixtures__/fixture2.input.jsx @@ -0,0 +1,4 @@ +import React from "react"; +import ThemeContext from "./ThemeContext"; + +const theme = React.useContext(ThemeContext); \ No newline at end of file diff --git a/codemods-v2/use-context-hook/__testfixtures__/fixture2.output.jsx b/codemods-v2/use-context-hook/__testfixtures__/fixture2.output.jsx new file mode 100644 index 00000000..f7f504f5 --- /dev/null +++ b/codemods-v2/use-context-hook/__testfixtures__/fixture2.output.jsx @@ -0,0 +1,4 @@ +import React from "react"; +import ThemeContext from "./ThemeContext"; + +const theme = React.use(ThemeContext); \ No newline at end of file diff --git a/codemods-v2/use-context-hook/__testfixtures__/fixture3.input.jsx b/codemods-v2/use-context-hook/__testfixtures__/fixture3.input.jsx new file mode 100644 index 00000000..75bfeb59 --- /dev/null +++ b/codemods-v2/use-context-hook/__testfixtures__/fixture3.input.jsx @@ -0,0 +1 @@ +const theme = trpc.useContext(); \ No newline at end of file diff --git a/codemods-v2/use-context-hook/__testfixtures__/fixture3.output.jsx b/codemods-v2/use-context-hook/__testfixtures__/fixture3.output.jsx new file mode 100644 index 00000000..75bfeb59 --- /dev/null +++ b/codemods-v2/use-context-hook/__testfixtures__/fixture3.output.jsx @@ -0,0 +1 @@ +const theme = trpc.useContext(); \ No newline at end of file diff --git a/codemods-v2/use-context-hook/__testfixtures__/fixture4.input.tsx b/codemods-v2/use-context-hook/__testfixtures__/fixture4.input.tsx new file mode 100644 index 00000000..74640584 --- /dev/null +++ b/codemods-v2/use-context-hook/__testfixtures__/fixture4.input.tsx @@ -0,0 +1,11 @@ +import { useContext } from "react"; +import ThemeContext from "./ThemeContext"; + +function Component({ + appUrl, +}: { + appUrl: string; +}) { + const theme = useContext(ThemeContext); + return
; +}; \ No newline at end of file diff --git a/codemods-v2/use-context-hook/__testfixtures__/fixture4.output.tsx b/codemods-v2/use-context-hook/__testfixtures__/fixture4.output.tsx new file mode 100644 index 00000000..d44d7ae8 --- /dev/null +++ b/codemods-v2/use-context-hook/__testfixtures__/fixture4.output.tsx @@ -0,0 +1,11 @@ +import { use } from "react"; +import ThemeContext from "./ThemeContext"; + +function Component({ + appUrl, +}: { + appUrl: string; +}) { + const theme = use(ThemeContext); + return
; +}; \ No newline at end of file diff --git a/codemods-v2/use-context-hook/__testfixtures__/fixture5.input.tsx b/codemods-v2/use-context-hook/__testfixtures__/fixture5.input.tsx new file mode 100644 index 00000000..062dab59 --- /dev/null +++ b/codemods-v2/use-context-hook/__testfixtures__/fixture5.input.tsx @@ -0,0 +1,11 @@ +import React from "react"; +import ThemeContext from "./ThemeContext"; + +function Component({ + appUrl, +}: { + appUrl: string; +}) { + const theme = React.useContext(ThemeContext); + return
; +}; \ No newline at end of file diff --git a/codemods-v2/use-context-hook/__testfixtures__/fixture5.output.tsx b/codemods-v2/use-context-hook/__testfixtures__/fixture5.output.tsx new file mode 100644 index 00000000..a873ec9a --- /dev/null +++ b/codemods-v2/use-context-hook/__testfixtures__/fixture5.output.tsx @@ -0,0 +1,11 @@ +import React from "react"; +import ThemeContext from "./ThemeContext"; + +function Component({ + appUrl, +}: { + appUrl: string; +}) { + const theme = React.use(ThemeContext); + return
; +}; \ No newline at end of file diff --git a/codemods-v2/use-context-hook/__testfixtures__/fixture6.input.tsx b/codemods-v2/use-context-hook/__testfixtures__/fixture6.input.tsx new file mode 100644 index 00000000..88397ec8 --- /dev/null +++ b/codemods-v2/use-context-hook/__testfixtures__/fixture6.input.tsx @@ -0,0 +1,8 @@ +function Component({ + appUrl, +}: { + appUrl: string; +}) { + const theme = trpc.useContext(); + return
; +}; \ No newline at end of file diff --git a/codemods-v2/use-context-hook/__testfixtures__/fixture6.output.tsx b/codemods-v2/use-context-hook/__testfixtures__/fixture6.output.tsx new file mode 100644 index 00000000..88397ec8 --- /dev/null +++ b/codemods-v2/use-context-hook/__testfixtures__/fixture6.output.tsx @@ -0,0 +1,8 @@ +function Component({ + appUrl, +}: { + appUrl: string; +}) { + const theme = trpc.useContext(); + return
; +}; \ No newline at end of file diff --git a/codemods-v2/use-context-hook/index.d.ts b/codemods-v2/use-context-hook/index.d.ts new file mode 100644 index 00000000..f1be7f8f --- /dev/null +++ b/codemods-v2/use-context-hook/index.d.ts @@ -0,0 +1,3 @@ +import type { API, FileInfo } from "jscodeshift"; + +export default function transform(file: FileInfo, api: API): string; diff --git a/codemods-v2/use-context-hook/src/index.ts b/codemods-v2/use-context-hook/src/index.ts new file mode 100644 index 00000000..fcf38f82 --- /dev/null +++ b/codemods-v2/use-context-hook/src/index.ts @@ -0,0 +1,69 @@ +import type { API, FileInfo, Options } from "jscodeshift"; + +export default function transform( + file: FileInfo, + api: API, + options?: Options, +): string | undefined { + const j = api.jscodeshift; + const root = j(file.source); + + // Get default import from react + const defaultReactImport = + root + .find(j.ImportDeclaration, { + source: { value: "react" }, + specifiers: [{ type: "ImportDefaultSpecifier" }], + }) + .paths() + .at(0) + ?.node.specifiers?.at(0)?.local?.name ?? "React"; + + // For usages like `import React from 'react'; React.useContext(ThemeContext)` + root + .find(j.MemberExpression, { + object: { name: defaultReactImport }, + property: { name: "useContext" }, + }) + .forEach((path) => { + const identifierPath = j(path) + .find(j.Identifier, { name: "useContext" }) + .paths() + .at(0); + + const newIdentifier = j.identifier.from({ name: "use" }); + + identifierPath?.replace(newIdentifier); + }); + + // Get useContext import name + const useContextImport = root + .find(j.ImportDeclaration, { + source: { value: "react" }, + specifiers: [ + { type: "ImportSpecifier", imported: { name: "useContext" } }, + ], + }) + .paths() + .at(0) + ?.node.specifiers?.at(0)?.local?.name; + + if (useContextImport) { + // For usages like `import { useContext } from 'react'; useContext(ThemeContext)` + root.find(j.Identifier, { name: useContextImport }).forEach((path) => { + // If parent is a member expression, we don't want that change, we handle React.useContext separately + if (path.parentPath.node.type === "MemberExpression") { + return; + } + + // In all other cases, replace usages of imported useContext with use + if (path.node.type === "Identifier") { + const newIdentifier = j.identifier.from({ name: "use" }); + + path.replace(newIdentifier); + } + }); + } + + return root.toSource(); +} diff --git a/codemods-v2/use-context-hook/test/test.ts b/codemods-v2/use-context-hook/test/test.ts new file mode 100644 index 00000000..1aa8454e --- /dev/null +++ b/codemods-v2/use-context-hook/test/test.ts @@ -0,0 +1,141 @@ +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; +import { join } from 'node:path'; +import jscodeshift, { API, FileInfo } from 'jscodeshift'; +import { describe, it } from "vitest"; +import transform from "../src/index"; + +export const buildApi = (parser: string | undefined): API => ({ + j: parser ? jscodeshift.withParser(parser) : jscodeshift, + jscodeshift: parser ? jscodeshift.withParser(parser) : jscodeshift, + stats: () => { + console.error( + 'The stats function was called, which is not supported on purpose', + ); + }, + report: () => { + console.error( + 'The report function was called, which is not supported on purpose', + ); + }, +}); + +describe("react/19/use-context-hook: useContext -> use", () => { + describe("javascript code", () => { + it("should replace useContext with use", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture1.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture1.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("js"), { + quote: "single", + }); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + + it("should replace React.useContext with use", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture2.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture2.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("js"), { + quote: "single", + }); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + + it("should not replace any.useContext() with use", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture3.input.jsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture3.output.jsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("js"), { + quote: "single", + }); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + }); + + describe("typescript code", () => { + it("should replace useContext with use", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture4.input.tsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture4.output.tsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx"), { + quote: "single", + }); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + + it("should replace React.useContext with use", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture5.input.tsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture5.output.tsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx"), { + quote: "single", + }); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + + it("should not replace any.useContext() with use", async () => { + const INPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture6.input.tsx'), 'utf-8'); + const OUTPUT = await readFile(join(__dirname, '..', '__testfixtures__/fixture6.output.tsx'), 'utf-8'); + + const fileInfo: FileInfo = { + path: "index.ts", + source: INPUT, + }; + + const actualOutput = transform(fileInfo, buildApi("tsx"), { + quote: "single", + }); + + assert.deepEqual( + actualOutput?.replace(/\W/gm, ""), + OUTPUT.replace(/\W/gm, ""), + ); + }); + }); +}); diff --git a/package.json b/package.json index dfe2d52d..9acd7f5c 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "repository": "reactjs/react-codemod", "scripts": { "test": "jest", + "test:v2": "vitest run codemods-v2", "lint": "eslint .", "prepublish": "npm run lint && npm run test", "jscodeshift": "jscodeshift" @@ -17,7 +18,7 @@ "globby": "^10.0.1", "inquirer": "^7.0.0", "is-git-clean": "^1.1.0", - "jscodeshift": "^0.11.0", + "jscodeshift": "^0.15.1", "meow": "^5.0.0" }, "jest": { @@ -34,12 +35,16 @@ "@babel/core": "^7.6.4", "@babel/plugin-proposal-object-rest-spread": "^7.6.2", "@babel/preset-env": "^7.6.3", + "@types/jscodeshift": "^0.11.10", + "@types/node": "^20.11.30", "babel-eslint": "^10.0.3", "babel-jest": "^24.9.0", "eslint": "^6.6.0", "eslint-plugin-react": "^7.16.0", "fbjs-scripts": "^0.7.1", - "jest": "^24.9.0" + "jest": "^24.9.0", + "typescript": "^5.2.2", + "vitest": "^1.0.1" }, "resolutions": { "colors": "1.3.3" diff --git a/transforms/__testfixtures__/create-element-to-jsx-preserve-comments.input.js b/transforms/__testfixtures__/create-element-to-jsx-preserve-comments.input.js index 2e161ff5..2059d5fe 100644 --- a/transforms/__testfixtures__/create-element-to-jsx-preserve-comments.input.js +++ b/transforms/__testfixtures__/create-element-to-jsx-preserve-comments.input.js @@ -1,21 +1,5 @@ var React = require('react'); -const render = () => { - return /*1*/React/*2*/./*3*/createElement/*4*/( - /*5*/'div'/*6*/,/*7*/ - { - /*8*/className/*9*/: /*10*/'foo'/*11*/,/*12*/ - /*13*/onClick/*14*/:/*15*/ this.handleClick/*16*/, //17 - }/*18*/, - /*19*/React.createElement(/*20*/TodoList/*21*/./*22*/Item/*23*/)/*24*/, //25 - React.createElement( - 'span', - /*26*/getProps()/*27*/ - ), - React.createElement('input', /*28*/null/*29*/) - ); -}; - const render2 = () => { return React.createElement( 'div', { diff --git a/transforms/__testfixtures__/create-element-to-jsx-preserve-comments.output.js b/transforms/__testfixtures__/create-element-to-jsx-preserve-comments.output.js index 28ca5ff2..b7082e2b 100644 --- a/transforms/__testfixtures__/create-element-to-jsx-preserve-comments.output.js +++ b/transforms/__testfixtures__/create-element-to-jsx-preserve-comments.output.js @@ -1,21 +1,5 @@ var React = require('react'); -const render = () => { - return ( - /*1*//*4*//*2*//*3*/
- {/*19*///25 - /*24*//*20*//*23*//*21*//*22*//*20*//*23*//*21*//*22*//*21*//*22*/} - - { /*28*//*29*/} -
- /*5*//*6*//*7*//*18*/ - ); -}; - const render2 = () => { return (
Hi
; diff --git a/transforms/__testfixtures__/update-react-imports/typescript/default-and-multiple-specifiers-import-react-variable.tsx.output.tsx b/transforms/__testfixtures__/update-react-imports/typescript/default-and-multiple-specifiers-import-react-variable.tsx.output.tsx new file mode 100644 index 00000000..41bcef48 --- /dev/null +++ b/transforms/__testfixtures__/update-react-imports/typescript/default-and-multiple-specifiers-import-react-variable.tsx.output.tsx @@ -0,0 +1,6 @@ +import { createElement, useState } from "react"; +import * as React from "react"; + +React.createElement('div', {}); + +
Hi
; diff --git a/transforms/__testfixtures__/update-react-imports/typescript/default-and-multiple-specifiers-import.tsx.input.tsx b/transforms/__testfixtures__/update-react-imports/typescript/default-and-multiple-specifiers-import.tsx.input.tsx new file mode 100644 index 00000000..e2b936aa --- /dev/null +++ b/transforms/__testfixtures__/update-react-imports/typescript/default-and-multiple-specifiers-import.tsx.input.tsx @@ -0,0 +1,3 @@ +import React, { createElement, useState } from "react"; + +
Hi
; diff --git a/transforms/__testfixtures__/update-react-imports/typescript/default-and-multiple-specifiers-import.tsx.output.tsx b/transforms/__testfixtures__/update-react-imports/typescript/default-and-multiple-specifiers-import.tsx.output.tsx new file mode 100644 index 00000000..51ebe952 --- /dev/null +++ b/transforms/__testfixtures__/update-react-imports/typescript/default-and-multiple-specifiers-import.tsx.output.tsx @@ -0,0 +1,3 @@ +import { createElement, useState } from "react"; + +
Hi
; diff --git a/transforms/__testfixtures__/update-react-imports/typescript/jsx-element.tsx.input.js b/transforms/__testfixtures__/update-react-imports/typescript/jsx-element.tsx.input.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/jsx-element.tsx.input.js rename to transforms/__testfixtures__/update-react-imports/typescript/jsx-element.tsx.input.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/jsx-element.tsx.output.js b/transforms/__testfixtures__/update-react-imports/typescript/jsx-element.tsx.output.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/jsx-element.tsx.output.js rename to transforms/__testfixtures__/update-react-imports/typescript/jsx-element.tsx.output.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/jsx-fragment.tsx.input.js b/transforms/__testfixtures__/update-react-imports/typescript/jsx-fragment.tsx.input.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/jsx-fragment.tsx.input.js rename to transforms/__testfixtures__/update-react-imports/typescript/jsx-fragment.tsx.input.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/jsx-fragment.tsx.output.js b/transforms/__testfixtures__/update-react-imports/typescript/jsx-fragment.tsx.output.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/jsx-fragment.tsx.output.js rename to transforms/__testfixtures__/update-react-imports/typescript/jsx-fragment.tsx.output.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/leading-comment.tsx.input.js b/transforms/__testfixtures__/update-react-imports/typescript/leading-comment.tsx.input.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/leading-comment.tsx.input.js rename to transforms/__testfixtures__/update-react-imports/typescript/leading-comment.tsx.input.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/leading-comment.tsx.output.js b/transforms/__testfixtures__/update-react-imports/typescript/leading-comment.tsx.output.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/leading-comment.tsx.output.js rename to transforms/__testfixtures__/update-react-imports/typescript/leading-comment.tsx.output.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/preserve-types-default.tsx.input.js b/transforms/__testfixtures__/update-react-imports/typescript/preserve-types-default.tsx.input.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/preserve-types-default.tsx.input.js rename to transforms/__testfixtures__/update-react-imports/typescript/preserve-types-default.tsx.input.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/preserve-types-default.tsx.output.js b/transforms/__testfixtures__/update-react-imports/typescript/preserve-types-default.tsx.output.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/preserve-types-default.tsx.output.js rename to transforms/__testfixtures__/update-react-imports/typescript/preserve-types-default.tsx.output.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/preserve-types-namespace.tsx.input.js b/transforms/__testfixtures__/update-react-imports/typescript/preserve-types-namespace.tsx.input.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/preserve-types-namespace.tsx.input.js rename to transforms/__testfixtures__/update-react-imports/typescript/preserve-types-namespace.tsx.input.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/preserve-types-namespace.tsx.output.js b/transforms/__testfixtures__/update-react-imports/typescript/preserve-types-namespace.tsx.output.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/preserve-types-namespace.tsx.output.js rename to transforms/__testfixtures__/update-react-imports/typescript/preserve-types-namespace.tsx.output.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/react-already-used-named-export.tsx.input.js b/transforms/__testfixtures__/update-react-imports/typescript/react-already-used-named-export.tsx.input.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/react-already-used-named-export.tsx.input.js rename to transforms/__testfixtures__/update-react-imports/typescript/react-already-used-named-export.tsx.input.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/react-already-used-named-export.tsx.output.js b/transforms/__testfixtures__/update-react-imports/typescript/react-already-used-named-export.tsx.output.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/react-already-used-named-export.tsx.output.js rename to transforms/__testfixtures__/update-react-imports/typescript/react-already-used-named-export.tsx.output.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element-react-variable.tsx.input.js b/transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element-react-variable.tsx.input.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element-react-variable.tsx.input.js rename to transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element-react-variable.tsx.input.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element-react-variable.tsx.output.js b/transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element-react-variable.tsx.output.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element-react-variable.tsx.output.js rename to transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element-react-variable.tsx.output.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element.tsx.input.js b/transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element.tsx.input.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element.tsx.input.js rename to transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element.tsx.input.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element.tsx.output.js b/transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element.tsx.output.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element.tsx.output.js rename to transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export-jsx-element.tsx.output.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export.tsx.input.js b/transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export.tsx.input.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export.tsx.input.js rename to transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export.tsx.input.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export.tsx.output.js b/transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export.tsx.output.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export.tsx.output.js rename to transforms/__testfixtures__/update-react-imports/typescript/react-basic-default-export.tsx.output.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/react-jsx-member-expression.tsx.input.js b/transforms/__testfixtures__/update-react-imports/typescript/react-jsx-member-expression.tsx.input.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/react-jsx-member-expression.tsx.input.js rename to transforms/__testfixtures__/update-react-imports/typescript/react-jsx-member-expression.tsx.input.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/react-jsx-member-expression.tsx.output.js b/transforms/__testfixtures__/update-react-imports/typescript/react-jsx-member-expression.tsx.output.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/react-jsx-member-expression.tsx.output.js rename to transforms/__testfixtures__/update-react-imports/typescript/react-jsx-member-expression.tsx.output.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/react-not-removed.tsx.input.js b/transforms/__testfixtures__/update-react-imports/typescript/react-not-removed.tsx.input.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/react-not-removed.tsx.input.js rename to transforms/__testfixtures__/update-react-imports/typescript/react-not-removed.tsx.input.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/react-not-removed.tsx.output.js b/transforms/__testfixtures__/update-react-imports/typescript/react-not-removed.tsx.output.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/react-not-removed.tsx.output.js rename to transforms/__testfixtures__/update-react-imports/typescript/react-not-removed.tsx.output.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/variable-already-used.tsx.input.js b/transforms/__testfixtures__/update-react-imports/typescript/variable-already-used.tsx.input.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/variable-already-used.tsx.input.js rename to transforms/__testfixtures__/update-react-imports/typescript/variable-already-used.tsx.input.tsx diff --git a/transforms/__testfixtures__/update-react-imports/typescript/variable-already-used.tsx.output.js b/transforms/__testfixtures__/update-react-imports/typescript/variable-already-used.tsx.output.tsx similarity index 100% rename from transforms/__testfixtures__/update-react-imports/typescript/variable-already-used.tsx.output.js rename to transforms/__testfixtures__/update-react-imports/typescript/variable-already-used.tsx.output.tsx diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..e81f910a --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Default", + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "module": "NodeNext", + "moduleResolution": "NodeNext", + "skipLibCheck": true, + + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "isolatedModules": true, + "jsx": "react-jsx", + "outDir": "dist", + + "noFallthroughCasesInSwitch": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "preserveWatchOutput": true, + "strict": true, + "strictNullChecks": true, + "allowJs": true, + "incremental": true, + "noUncheckedIndexedAccess": true, + "noPropertyAccessFromIndexSignature": false + }, + "include": [ + "codemods-v2/**/*.ts", + "codemods-v2/**/*.js", + "codemods-v2/**/*.tsx", + "codemods-v2/**/*.jsx" + ], + "exclude": ["**/node_modules/**/*", "**/dist/**/*"], + "ts-node": { + "transpileOnly": true + } +} diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 00000000..07e070f7 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,7 @@ +import { configDefaults, defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + include: [...configDefaults.include, '**/test/*.ts'], + }, +}); diff --git a/yarn.lock b/yarn.lock index 03cceba7..e8e2cef9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,14 @@ # yarn lockfile v1 +"@ampproject/remapping@^2.2.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" + integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" @@ -9,6 +17,14 @@ dependencies: "@babel/highlight" "^7.10.4" +"@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.1", "@babel/code-frame@^7.24.2": + version "7.24.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" + integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== + dependencies: + "@babel/highlight" "^7.24.2" + picocolors "^1.0.0" + "@babel/compat-data@^7.10.4", "@babel/compat-data@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.11.0.tgz#e9f73efe09af1355b723a7f39b11bad637d7c99c" @@ -18,7 +34,12 @@ invariant "^2.2.4" semver "^5.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.6.4": +"@babel/compat-data@^7.23.5": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.1.tgz#31c1f66435f2a9c329bb5716a6d6186c516c3742" + integrity sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA== + +"@babel/core@^7.1.0", "@babel/core@^7.6.4": version "7.11.6" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.6.tgz#3a9455dc7387ff1bac45770650bc13ba04a15651" integrity sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg== @@ -40,6 +61,27 @@ semver "^5.4.1" source-map "^0.5.0" +"@babel/core@^7.23.0": + version "7.24.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.3.tgz#568864247ea10fbd4eff04dda1e05f9e2ea985c3" + integrity sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.24.2" + "@babel/generator" "^7.24.1" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helpers" "^7.24.1" + "@babel/parser" "^7.24.1" + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.1" + "@babel/types" "^7.24.0" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/generator@^7.11.5", "@babel/generator@^7.11.6", "@babel/generator@^7.4.0": version "7.11.6" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.6.tgz#b868900f81b163b4d464ea24545c61cbac4dc620" @@ -49,6 +91,16 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.1.tgz#e67e06f68568a4ebf194d1c6014235344f0476d0" + integrity sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A== + dependencies: + "@babel/types" "^7.24.0" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" @@ -56,6 +108,13 @@ dependencies: "@babel/types" "^7.10.4" +"@babel/helper-annotate-as-pure@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" + integrity sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-builder-binary-assignment-operator-visitor@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz#bb0b75f31bf98cbf9ff143c1ae578b87274ae1a3" @@ -75,7 +134,18 @@ levenary "^1.1.1" semver "^5.5.0" -"@babel/helper-create-class-features-plugin@^7.10.4", "@babel/helper-create-class-features-plugin@^7.10.5": +"@babel/helper-compilation-targets@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz#4d79069b16cbcf1461289eccfbbd81501ae39991" + integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== + dependencies: + "@babel/compat-data" "^7.23.5" + "@babel/helper-validator-option" "^7.23.5" + browserslist "^4.22.2" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-create-class-features-plugin@^7.10.4": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz#9f61446ba80e8240b0a5c85c6fdac8459d6f259d" integrity sha512-0nkdeijB7VlZoLT3r/mY3bUkw3T8WG/hNw+FATs/6+pG2039IJWjTYL0VTISqsNHMUTEnwbVnc89WIJX9Qed0A== @@ -87,6 +157,21 @@ "@babel/helper-replace-supers" "^7.10.4" "@babel/helper-split-export-declaration" "^7.10.4" +"@babel/helper-create-class-features-plugin@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.1.tgz#db58bf57137b623b916e24874ab7188d93d7f68f" + integrity sha512-1yJa9dX9g//V6fDebXoEfEsxkZHk3Hcbm+zLhyu6qVgYFLvmTALTeV+jNU9e5RnYtioBrGEOdoI2joMSNQ/+aA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-member-expression-to-functions" "^7.23.0" + "@babel/helper-optimise-call-expression" "^7.22.5" + "@babel/helper-replace-supers" "^7.24.1" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + semver "^6.3.1" + "@babel/helper-create-regexp-features-plugin@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz#fdd60d88524659a0b6959c0579925e425714f3b8" @@ -105,6 +190,11 @@ "@babel/types" "^7.10.5" lodash "^4.17.19" +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== + "@babel/helper-explode-assignable-expression@^7.10.4": version "7.11.4" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.11.4.tgz#2d8e3470252cc17aba917ede7803d4a7a276a41b" @@ -121,6 +211,14 @@ "@babel/template" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== + dependencies: + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" + "@babel/helper-get-function-arity@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" @@ -135,6 +233,13 @@ dependencies: "@babel/types" "^7.10.4" +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-member-expression-to-functions@^7.10.4", "@babel/helper-member-expression-to-functions@^7.10.5": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz#ae69c83d84ee82f4b42f96e2a09410935a8f26df" @@ -142,6 +247,13 @@ dependencies: "@babel/types" "^7.11.0" +"@babel/helper-member-expression-to-functions@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz#9263e88cc5e41d39ec18c9a3e0eced59a3e7d366" + integrity sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA== + dependencies: + "@babel/types" "^7.23.0" + "@babel/helper-module-imports@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz#4c5c54be04bd31670a7382797d75b9fa2e5b5620" @@ -149,6 +261,13 @@ dependencies: "@babel/types" "^7.10.4" +"@babel/helper-module-imports@^7.22.15": + version "7.24.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz#6ac476e6d168c7c23ff3ba3cf4f7841d46ac8128" + integrity sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg== + dependencies: + "@babel/types" "^7.24.0" + "@babel/helper-module-transforms@^7.10.4", "@babel/helper-module-transforms@^7.10.5", "@babel/helper-module-transforms@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz#b16f250229e47211abdd84b34b64737c2ab2d359" @@ -162,6 +281,17 @@ "@babel/types" "^7.11.0" lodash "^4.17.19" +"@babel/helper-module-transforms@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz#d7d12c3c5d30af5b3c0fcab2a6d5217773e2d0f1" + integrity sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== + dependencies: + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-simple-access" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/helper-validator-identifier" "^7.22.20" + "@babel/helper-optimise-call-expression@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz#50dc96413d594f995a77905905b05893cd779673" @@ -169,11 +299,23 @@ dependencies: "@babel/types" "^7.10.4" +"@babel/helper-optimise-call-expression@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz#f21531a9ccbff644fdd156b4077c16ff0c3f609e" + integrity sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== +"@babel/helper-plugin-utils@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz#945681931a52f15ce879fd5b86ce2dae6d3d7f2a" + integrity sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w== + "@babel/helper-regex@^7.10.4": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.10.5.tgz#32dfbb79899073c415557053a19bd055aae50ae0" @@ -201,6 +343,15 @@ "@babel/traverse" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helper-replace-supers@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.24.1.tgz#7085bd19d4a0b7ed8f405c1ed73ccb70f323abc1" + integrity sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ== + dependencies: + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-member-expression-to-functions" "^7.23.0" + "@babel/helper-optimise-call-expression" "^7.22.5" + "@babel/helper-simple-access@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz#0f5ccda2945277a2a7a2d3a821e15395edcf3461" @@ -209,6 +360,13 @@ "@babel/template" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helper-simple-access@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" + integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.11.0.tgz#eec162f112c2f58d3af0af125e3bb57665146729" @@ -216,6 +374,13 @@ dependencies: "@babel/types" "^7.11.0" +"@babel/helper-skip-transparent-expression-wrappers@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz#007f15240b5751c537c40e77abb4e89eeaaa8847" + integrity sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f" @@ -223,11 +388,33 @@ dependencies: "@babel/types" "^7.11.0" +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-string-parser@^7.23.4": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz#f99c36d3593db9540705d0739a1f10b5e20c696e" + integrity sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ== + "@babel/helper-validator-identifier@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + +"@babel/helper-validator-option@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" + integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== + "@babel/helper-wrap-function@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.10.4.tgz#8a6f701eab0ff39f765b5a1cfef409990e624b87" @@ -247,6 +434,15 @@ "@babel/traverse" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helpers@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.1.tgz#183e44714b9eba36c3038e442516587b1e0a1a94" + integrity sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg== + dependencies: + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.1" + "@babel/types" "^7.24.0" + "@babel/highlight@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" @@ -256,11 +452,26 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.10.4", "@babel/parser@^7.11.5", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0": +"@babel/highlight@^7.24.2": + version "7.24.2" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.2.tgz#3f539503efc83d3c59080a10e6634306e0370d26" + integrity sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.5", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.5.tgz#c7ff6303df71080ec7a4f5b8c003c58f1cf51037" integrity sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q== +"@babel/parser@^7.23.0", "@babel/parser@^7.24.0", "@babel/parser@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.1.tgz#1e416d3627393fab1cb5b0f2f1796a100ae9133a" + integrity sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg== + "@babel/plugin-proposal-async-generator-functions@^7.10.4": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.5.tgz#3491cabf2f7c179ab820606cec27fed15e0e8558" @@ -270,7 +481,7 @@ "@babel/helper-remap-async-to-generator" "^7.10.4" "@babel/plugin-syntax-async-generators" "^7.8.0" -"@babel/plugin-proposal-class-properties@^7.1.0", "@babel/plugin-proposal-class-properties@^7.10.4": +"@babel/plugin-proposal-class-properties@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.4.tgz#a33bf632da390a59c7a8c570045d1115cd778807" integrity sha512-vhwkEROxzcHGNu2mzUC0OFFNXdZ4M23ib8aRRcJSsW8BZK9pQMD7QB7csl97NBbgGZO7ZyHUyKDnxzOaP4IrCg== @@ -310,7 +521,7 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.1.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.10.4": +"@babel/plugin-proposal-nullish-coalescing-operator@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.4.tgz#02a7e961fc32e6d5b2db0649e01bf80ddee7e04a" integrity sha512-wq5n1M3ZUlHl9sqT2ok1T2/MTt6AXE0e1Lz4WzWBr95LsAZ5qDXe4KnFuauYyEyLiohvXFMdbsOTMyLZs91Zlw== @@ -343,7 +554,7 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" -"@babel/plugin-proposal-optional-chaining@^7.1.0", "@babel/plugin-proposal-optional-chaining@^7.11.0": +"@babel/plugin-proposal-optional-chaining@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.11.0.tgz#de5866d0646f6afdaab8a566382fe3a221755076" integrity sha512-v9fZIu3Y8562RRwhm1BbMRxtqZNFmFA2EG+pT2diuU8PT3H6T/KXoZ54KgYisfOFZHV6PfvAiBIZ9Rcz+/JCxA== @@ -396,12 +607,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-flow@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.10.4.tgz#53351dd7ae01995e567d04ce42af1a6e0ba846a6" - integrity sha512-yxQsX1dJixF4qEEdzVbst3SZQ58Nrooz8NV9Z9GL4byTE25BvJgl5lf0RECUf0fh28rZBb/RYTWn/eeKwCMrZQ== +"@babel/plugin-syntax-flow@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.24.1.tgz#875c25e3428d7896c87589765fc8b9d32f24bd8d" + integrity sha512-sxi2kLTI5DeW5vDtMUsk4mTPwvlUDbjOnoWayhynCwrw4QXRld4QEYwqzY8JmQXaJUtgUuCIurtSRH5sn4c7mA== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-plugin-utils" "^7.24.0" "@babel/plugin-syntax-json-strings@^7.8.0": version "7.8.3" @@ -410,6 +621,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" +"@babel/plugin-syntax-jsx@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz#3f6ca04b8c841811dbc3c5c5f837934e0d626c10" + integrity sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.0" + "@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" @@ -417,7 +635,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0": +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0", "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== @@ -445,7 +663,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-optional-chaining@^7.8.0": +"@babel/plugin-syntax-optional-chaining@^7.8.0", "@babel/plugin-syntax-optional-chaining@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== @@ -459,12 +677,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-typescript@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.10.4.tgz#2f55e770d3501e83af217d782cb7517d7bb34d25" - integrity sha512-oSAEz1YkBCAKr5Yiq8/BNtvSAPwkp/IyUnwZogd8p+F0RuYQQrLeRUzIQhueQTTBy/F+a40uS7OFKxnkRvmvFQ== +"@babel/plugin-syntax-typescript@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz#b3bcc51f396d15f3591683f90239de143c076844" + integrity sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-plugin-utils" "^7.24.0" "@babel/plugin-transform-arrow-functions@^7.10.4": version "7.10.4" @@ -496,6 +714,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-class-properties@^7.22.5": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.1.tgz#bcbf1aef6ba6085cfddec9fc8d58871cf011fc29" + integrity sha512-OMLCXi0NqvJfORTaPQBwqLXHhb93wkBKZ4aNwMl6WtehO7ar+cmp+89iPEQPqxAnxsOKTaMcs3POz3rKayJ72g== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.24.1" + "@babel/helper-plugin-utils" "^7.24.0" + "@babel/plugin-transform-classes@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.4.tgz#405136af2b3e218bc4a1926228bc917ab1a0adc7" @@ -547,13 +773,13 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-flow-strip-types@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.10.4.tgz#c497957f09e86e3df7296271e9eb642876bf7788" - integrity sha512-XTadyuqNst88UWBTdLjM+wEY7BFnY2sYtPyAidfC7M/QaZnSuIZpMvLxqGT7phAcnGyWh/XQFLKcGf04CnvxSQ== +"@babel/plugin-transform-flow-strip-types@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.24.1.tgz#fa8d0a146506ea195da1671d38eed459242b2dcc" + integrity sha512-iIYPIWt3dUmUKKE10s3W+jsQ3icFkw0JyRVyY1B7G4yK/nngAOHLVx8xlhA6b/Jzl/Y0nis8gjqhqKtRDQqHWQ== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-flow" "^7.10.4" + "@babel/helper-plugin-utils" "^7.24.0" + "@babel/plugin-syntax-flow" "^7.24.1" "@babel/plugin-transform-for-of@^7.10.4": version "7.10.4" @@ -593,7 +819,7 @@ "@babel/helper-plugin-utils" "^7.10.4" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.1.0", "@babel/plugin-transform-modules-commonjs@^7.10.4": +"@babel/plugin-transform-modules-commonjs@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.4.tgz#66667c3eeda1ebf7896d41f1f16b17105a2fbca0" integrity sha512-Xj7Uq5o80HDLlW64rVfDBhao6OX89HKUmb+9vWYaLXBZOma4gA6tw4Ni1O5qVDoZWUV0fxMYA0aYzOawz0l+1w== @@ -603,6 +829,15 @@ "@babel/helper-simple-access" "^7.10.4" babel-plugin-dynamic-import-node "^2.3.3" +"@babel/plugin-transform-modules-commonjs@^7.23.0", "@babel/plugin-transform-modules-commonjs@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.1.tgz#e71ba1d0d69e049a22bf90b3867e263823d3f1b9" + integrity sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw== + dependencies: + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helper-plugin-utils" "^7.24.0" + "@babel/helper-simple-access" "^7.22.5" + "@babel/plugin-transform-modules-systemjs@^7.10.4": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.5.tgz#6270099c854066681bae9e05f87e1b9cadbe8c85" @@ -635,6 +870,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-nullish-coalescing-operator@^7.22.11": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.1.tgz#0cd494bb97cb07d428bd651632cb9d4140513988" + integrity sha512-iQ+caew8wRrhCikO5DrUYx0mrmdhkaELgFa+7baMcVuhxIkN7oxt06CZ51D65ugIb1UWRQ8oQe+HXAVM6qHFjw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-transform-object-super@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.4.tgz#d7146c4d139433e7a6526f888c667e314a093894" @@ -643,6 +886,15 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/helper-replace-supers" "^7.10.4" +"@babel/plugin-transform-optional-chaining@^7.23.0": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.1.tgz#26e588acbedce1ab3519ac40cc748e380c5291e6" + integrity sha512-n03wmDt+987qXwAgcBlnUUivrZBPZ8z1plL0YvgQalLm+ZE5BMhGm94jhxXtA1wzv1Cu2aaOv1BM9vbVttrzSg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.0" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-transform-parameters@^7.10.4": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.5.tgz#59d339d58d0b1950435f4043e74e2510005e2c4a" @@ -651,6 +903,14 @@ "@babel/helper-get-function-arity" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-private-methods@^7.22.5": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.1.tgz#a0faa1ae87eff077e1e47a5ec81c3aef383dc15a" + integrity sha512-tGvisebwBO5em4PaYNqt4fkw56K2VALsAbAakY0FjTYqJp7gfdrgr7YX76Or8/cpik0W6+tj3rZ0uHU9Oil4tw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.24.1" + "@babel/helper-plugin-utils" "^7.24.0" + "@babel/plugin-transform-property-literals@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.4.tgz#f6fe54b6590352298785b83edd815d214c42e3c0" @@ -710,14 +970,15 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-typescript@^7.10.4": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.11.0.tgz#2b4879676af37342ebb278216dd090ac67f13abb" - integrity sha512-edJsNzTtvb3MaXQwj8403B7mZoGu9ElDJQZOKjGUnvilquxBA3IQoEIOvkX/1O8xfAsnHS/oQhe2w/IXrr+w0w== +"@babel/plugin-transform-typescript@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.1.tgz#5c05e28bb76c7dfe7d6c5bed9951324fd2d3ab07" + integrity sha512-liYSESjX2fZ7JyBFkYG78nfvHlMKE6IpNdTVnxmlYUR+j5ZLsitFbaAE+eJSK2zPPkNWNw4mXL51rQ8WrvdK0w== dependencies: - "@babel/helper-create-class-features-plugin" "^7.10.5" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-typescript" "^7.10.4" + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-create-class-features-plugin" "^7.24.1" + "@babel/helper-plugin-utils" "^7.24.0" + "@babel/plugin-syntax-typescript" "^7.24.1" "@babel/plugin-transform-unicode-escapes@^7.10.4": version "7.10.4" @@ -808,13 +1069,14 @@ levenary "^1.1.1" semver "^5.5.0" -"@babel/preset-flow@^7.0.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.10.4.tgz#e0d9c72f8cb02d1633f6a5b7b16763aa2edf659f" - integrity sha512-XI6l1CptQCOBv+ZKYwynyswhtOKwpZZp5n0LG1QKCo8erRhqjoQV6nvx61Eg30JHpysWQSBwA2AWRU3pBbSY5g== +"@babel/preset-flow@^7.22.15": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.24.1.tgz#da7196c20c2d7dd4e98cfd8b192fe53b5eb6f0bb" + integrity sha512-sWCV2G9pcqZf+JHyv/RyqEIpFypxdCSxWIxQjpdaQxenNog7cN1pr76hg8u0Fz8Qgg0H4ETkGcJnXL8d4j0PPA== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-transform-flow-strip-types" "^7.10.4" + "@babel/helper-plugin-utils" "^7.24.0" + "@babel/helper-validator-option" "^7.23.5" + "@babel/plugin-transform-flow-strip-types" "^7.24.1" "@babel/preset-modules@^0.1.3": version "0.1.4" @@ -827,23 +1089,26 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-typescript@^7.1.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.10.4.tgz#7d5d052e52a682480d6e2cc5aa31be61c8c25e36" - integrity sha512-SdYnvGPv+bLlwkF2VkJnaX/ni1sMNetcGI1+nThF1gyv6Ph8Qucc4ZZAjM5yZcE/AKRXIOTZz7eSRDWOEjPyRQ== +"@babel/preset-typescript@^7.23.0": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.24.1.tgz#89bdf13a3149a17b3b2a2c9c62547f06db8845ec" + integrity sha512-1DBaMmRDpuYQBPWD8Pf/WEwCrtgRHxsZnP4mIy9G/X+hFfbI47Q2G4t1Paakld84+qsk2fSsUPMKg71jkoOOaQ== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-transform-typescript" "^7.10.4" + "@babel/helper-plugin-utils" "^7.24.0" + "@babel/helper-validator-option" "^7.23.5" + "@babel/plugin-syntax-jsx" "^7.24.1" + "@babel/plugin-transform-modules-commonjs" "^7.24.1" + "@babel/plugin-transform-typescript" "^7.24.1" -"@babel/register@^7.0.0": - version "7.11.5" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.11.5.tgz#79becf89e0ddd0fba8b92bc279bc0f5d2d7ce2ea" - integrity sha512-CAml0ioKX+kOAvBQDHa/+t1fgOt3qkTIz0TrRtRAT6XY0m5qYZXR85k6/sLCNPMGhYDlCFHCYuU0ybTJbvlC6w== +"@babel/register@^7.22.15": + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.23.7.tgz#485a5e7951939d21304cae4af1719fdb887bc038" + integrity sha512-EjJeB6+kvpk+Y5DAkEAmbOBEFkh9OASx0huoEkqYTFxAZHzOAX2Oh5uwAUuL2rUddqfM0SA+KPXV2TbzoZ2kvQ== dependencies: + clone-deep "^4.0.1" find-cache-dir "^2.0.0" - lodash "^4.17.19" make-dir "^2.1.0" - pirates "^4.0.0" + pirates "^4.0.6" source-map-support "^0.5.16" "@babel/runtime@^7.8.4": @@ -862,6 +1127,15 @@ "@babel/parser" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/template@^7.22.15", "@babel/template@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.0.tgz#c6a524aa93a4a05d66aaf31654258fae69d87d50" + integrity sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA== + dependencies: + "@babel/code-frame" "^7.23.5" + "@babel/parser" "^7.24.0" + "@babel/types" "^7.24.0" + "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.5", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.5.tgz#be777b93b518eb6d76ee2e1ea1d143daa11e61c3" @@ -877,6 +1151,22 @@ globals "^11.1.0" lodash "^4.17.19" +"@babel/traverse@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.1.tgz#d65c36ac9dd17282175d1e4a3c49d5b7988f530c" + integrity sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ== + dependencies: + "@babel/code-frame" "^7.24.1" + "@babel/generator" "^7.24.1" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.24.1" + "@babel/types" "^7.24.0" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.11.5", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.5.tgz#d9de577d01252d77c6800cee039ee64faf75662d" @@ -886,6 +1176,15 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" +"@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.0.tgz#3b951f435a92e7333eba05b7566fd297960ea1bf" + integrity sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w== + dependencies: + "@babel/helper-string-parser" "^7.23.4" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + "@cnakazawa/watch@^1.0.3": version "1.0.4" resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" @@ -894,6 +1193,121 @@ exec-sh "^0.3.2" minimist "^1.2.0" +"@esbuild/aix-ppc64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz#a70f4ac11c6a1dfc18b8bbb13284155d933b9537" + integrity sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g== + +"@esbuild/android-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz#db1c9202a5bc92ea04c7b6840f1bbe09ebf9e6b9" + integrity sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg== + +"@esbuild/android-arm@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.20.2.tgz#3b488c49aee9d491c2c8f98a909b785870d6e995" + integrity sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w== + +"@esbuild/android-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.20.2.tgz#3b1628029e5576249d2b2d766696e50768449f98" + integrity sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg== + +"@esbuild/darwin-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz#6e8517a045ddd86ae30c6608c8475ebc0c4000bb" + integrity sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA== + +"@esbuild/darwin-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz#90ed098e1f9dd8a9381695b207e1cff45540a0d0" + integrity sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA== + +"@esbuild/freebsd-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz#d71502d1ee89a1130327e890364666c760a2a911" + integrity sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw== + +"@esbuild/freebsd-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz#aa5ea58d9c1dd9af688b8b6f63ef0d3d60cea53c" + integrity sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw== + +"@esbuild/linux-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz#055b63725df678379b0f6db9d0fa85463755b2e5" + integrity sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A== + +"@esbuild/linux-arm@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz#76b3b98cb1f87936fbc37f073efabad49dcd889c" + integrity sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg== + +"@esbuild/linux-ia32@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz#c0e5e787c285264e5dfc7a79f04b8b4eefdad7fa" + integrity sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig== + +"@esbuild/linux-loong64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz#a6184e62bd7cdc63e0c0448b83801001653219c5" + integrity sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ== + +"@esbuild/linux-mips64el@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz#d08e39ce86f45ef8fc88549d29c62b8acf5649aa" + integrity sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA== + +"@esbuild/linux-ppc64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz#8d252f0b7756ffd6d1cbde5ea67ff8fd20437f20" + integrity sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg== + +"@esbuild/linux-riscv64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz#19f6dcdb14409dae607f66ca1181dd4e9db81300" + integrity sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg== + +"@esbuild/linux-s390x@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz#3c830c90f1a5d7dd1473d5595ea4ebb920988685" + integrity sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ== + +"@esbuild/linux-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz#86eca35203afc0d9de0694c64ec0ab0a378f6fff" + integrity sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw== + +"@esbuild/netbsd-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz#e771c8eb0e0f6e1877ffd4220036b98aed5915e6" + integrity sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ== + +"@esbuild/openbsd-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz#9a795ae4b4e37e674f0f4d716f3e226dd7c39baf" + integrity sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ== + +"@esbuild/sunos-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz#7df23b61a497b8ac189def6e25a95673caedb03f" + integrity sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w== + +"@esbuild/win32-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz#f1ae5abf9ca052ae11c1bc806fb4c0f519bacf90" + integrity sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ== + +"@esbuild/win32-ia32@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz#241fe62c34d8e8461cd708277813e1d0ba55ce23" + integrity sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ== + +"@esbuild/win32-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz#9c907b21e30a52db959ba4f80bb01a0cc403d5cc" + integrity sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ== + "@jest/console@^24.7.1", "@jest/console@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0" @@ -983,6 +1397,13 @@ source-map "^0.6.0" string-length "^2.0.0" +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== + dependencies: + "@sinclair/typebox" "^0.27.8" + "@jest/source-map@^24.3.0", "@jest/source-map@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.9.0.tgz#0e263a94430be4b41da683ccc1e6bffe2a191714" @@ -1042,6 +1463,38 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^13.0.0" +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@nodelib/fs.scandir@2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" @@ -1063,6 +1516,76 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@rollup/rollup-android-arm-eabi@4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.0.tgz#b98786c1304b4ff8db3a873180b778649b5dff2b" + integrity sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg== + +"@rollup/rollup-android-arm64@4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.0.tgz#8833679af11172b1bf1ab7cb3bad84df4caf0c9e" + integrity sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q== + +"@rollup/rollup-darwin-arm64@4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.0.tgz#ef02d73e0a95d406e0eb4fd61a53d5d17775659b" + integrity sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g== + +"@rollup/rollup-darwin-x64@4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.0.tgz#3ce5b9bcf92b3341a5c1c58a3e6bcce0ea9e7455" + integrity sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg== + +"@rollup/rollup-linux-arm-gnueabihf@4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.0.tgz#3d3d2c018bdd8e037c6bfedd52acfff1c97e4be4" + integrity sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ== + +"@rollup/rollup-linux-arm64-gnu@4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.0.tgz#5fc8cc978ff396eaa136d7bfe05b5b9138064143" + integrity sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w== + +"@rollup/rollup-linux-arm64-musl@4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.0.tgz#f2ae7d7bed416ffa26d6b948ac5772b520700eef" + integrity sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw== + +"@rollup/rollup-linux-riscv64-gnu@4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.0.tgz#303d57a328ee9a50c85385936f31cf62306d30b6" + integrity sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA== + +"@rollup/rollup-linux-x64-gnu@4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz#f672f6508f090fc73f08ba40ff76c20b57424778" + integrity sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA== + +"@rollup/rollup-linux-x64-musl@4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.0.tgz#d2f34b1b157f3e7f13925bca3288192a66755a89" + integrity sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw== + +"@rollup/rollup-win32-arm64-msvc@4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.0.tgz#8ffecc980ae4d9899eb2f9c4ae471a8d58d2da6b" + integrity sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA== + +"@rollup/rollup-win32-ia32-msvc@4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.0.tgz#a7505884f415662e088365b9218b2b03a88fc6f2" + integrity sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw== + +"@rollup/rollup-win32-x64-msvc@4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.0.tgz#6abd79db7ff8d01a58865ba20a63cfd23d9e2a10" + integrity sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw== + +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== + "@types/babel__core@^7.1.0": version "7.1.9" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.9.tgz#77e59d438522a6fb898fa43dc3455c6e72f3963d" @@ -1101,6 +1624,11 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== +"@types/estree@1.0.5", "@types/estree@^1.0.0": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + "@types/glob@^7.1.1": version "7.1.3" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" @@ -1129,6 +1657,14 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" +"@types/jscodeshift@^0.11.10": + version "0.11.11" + resolved "https://registry.yarnpkg.com/@types/jscodeshift/-/jscodeshift-0.11.11.tgz#30d7c986f372cd63c670017371da8fbced2b7acf" + integrity sha512-d7CAfFGOupj5qCDqMODXxNz2/NwCv/Lha78ZFbnr6qpk3K98iSB8I+ig9ERE2+EeYML352VMRsjPyOpeA+04eQ== + dependencies: + ast-types "^0.14.1" + recast "^0.20.3" + "@types/minimatch@*": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -1139,6 +1675,13 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.1.tgz#56af902ad157e763f9ba63d671c39cda3193c835" integrity sha512-oTQgnd0hblfLsJ6BvJzzSL+Inogp3lq9fGgqRkMB/ziKMgEUaFl801OncOzUmalfzt14N0oPHMK47ipl+wbTIw== +"@types/node@^20.11.30": + version "20.11.30" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.30.tgz#9c33467fc23167a347e73834f788f4b9f399d66f" + integrity sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw== + dependencies: + undici-types "~5.26.4" + "@types/stack-utils@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" @@ -1156,6 +1699,50 @@ dependencies: "@types/yargs-parser" "*" +"@vitest/expect@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-1.4.0.tgz#d64e17838a20007fecd252397f9b96a1ca81bfb0" + integrity sha512-Jths0sWCJZ8BxjKe+p+eKsoqev1/T8lYcrjavEaz8auEJ4jAVY0GwW3JKmdVU4mmNPLPHixh4GNXP7GFtAiDHA== + dependencies: + "@vitest/spy" "1.4.0" + "@vitest/utils" "1.4.0" + chai "^4.3.10" + +"@vitest/runner@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-1.4.0.tgz#907c2d17ad5975b70882c25ab7a13b73e5a28da9" + integrity sha512-EDYVSmesqlQ4RD2VvWo3hQgTJ7ZrFQ2VSJdfiJiArkCerDAGeyF1i6dHkmySqk573jLp6d/cfqCN+7wUB5tLgg== + dependencies: + "@vitest/utils" "1.4.0" + p-limit "^5.0.0" + pathe "^1.1.1" + +"@vitest/snapshot@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-1.4.0.tgz#2945b3fb53767a3f4f421919e93edfef2935b8bd" + integrity sha512-saAFnt5pPIA5qDGxOHxJ/XxhMFKkUSBJmVt5VgDsAqPTX6JP326r5C/c9UuCMPoXNzuudTPsYDZCoJ5ilpqG2A== + dependencies: + magic-string "^0.30.5" + pathe "^1.1.1" + pretty-format "^29.7.0" + +"@vitest/spy@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-1.4.0.tgz#cf953c93ae54885e801cbe6b408a547ae613f26c" + integrity sha512-Ywau/Qs1DzM/8Uc+yA77CwSegizMlcgTJuYGAi0jujOteJOUf1ujunHThYo243KG9nAyWT3L9ifPYZ5+As/+6Q== + dependencies: + tinyspy "^2.2.0" + +"@vitest/utils@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-1.4.0.tgz#ea6297e0d329f9ff0a106f4e1f6daf3ff6aad3f0" + integrity sha512-mx3Yd1/6e2Vt/PUC98DcqTirtfxUyAZ32uK82r8rZzbtBeBo+nqgnjx/LvqQdWsrvNtm14VmurNgcf4nqY5gJg== + dependencies: + diff-sequences "^29.6.3" + estree-walker "^3.0.3" + loupe "^2.3.7" + pretty-format "^29.7.0" + abab@^2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" @@ -1179,6 +1766,11 @@ acorn-walk@^6.0.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== +acorn-walk@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" + integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== + acorn@^5.5.3: version "5.7.4" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" @@ -1194,6 +1786,11 @@ acorn@^7.1.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c" integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== +acorn@^8.11.3: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3: version "6.12.5" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.5.tgz#19b0e8bae8f476e5ba666300387775fb1a00a4da" @@ -1263,6 +1860,11 @@ ansi-styles@^4.1.0: "@types/color-name" "^1.1.1" color-convert "^2.0.1" +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + ansi-wrap@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" @@ -1370,6 +1972,11 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -1382,6 +1989,20 @@ ast-types@0.14.1: dependencies: tslib "^2.0.1" +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" + +ast-types@^0.16.1: + version "0.16.1" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.16.1.tgz#7a9da1617c9081bc121faafe91711b4c8bb81da2" + integrity sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg== + dependencies: + tslib "^2.0.1" + astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" @@ -1953,7 +2574,7 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" -braces@^3.0.1: +braces@^3.0.1, braces@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -1982,6 +2603,16 @@ browserslist@^4.12.0, browserslist@^4.8.5: escalade "^3.1.0" node-releases "^1.1.61" +browserslist@^4.22.2: + version "4.23.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== + dependencies: + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" + bser@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" @@ -1994,6 +2625,11 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== +cac@^6.7.14: + version "6.7.14" + resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" + integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -2038,6 +2674,11 @@ caniuse-lite@^1.0.30001131: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001133.tgz#ec564c5495311299eb05245e252d589a84acd95e" integrity sha512-s3XAUFaC/ntDb1O3lcw9K8MPeOW7KO3z9+GzAoBxfz1B0VdacXPMKgFUtG4KIsgmnbexmi013s9miVu4h+qMHw== +caniuse-lite@^1.0.30001587: + version "1.0.30001599" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001599.tgz#571cf4f3f1506df9bf41fcbb6d10d5d017817bce" + integrity sha512-LRAQHZ4yT1+f9LemSMeqdMpMxZcc4RMWdj4tiFe3G8tNkWK+E58g+/tzotb5cU6TbcVJLr4fySiAW7XmxQvZQA== + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -2050,6 +2691,19 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= +chai@^4.3.10: + version "4.4.1" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.1.tgz#3603fa6eba35425b0f2ac91a009fe924106e50d1" + integrity sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.3" + deep-eql "^4.1.3" + get-func-name "^2.0.2" + loupe "^2.3.6" + pathval "^1.1.1" + type-detect "^4.0.8" + chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -2078,11 +2732,26 @@ chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^4.1.2: + 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" + chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +check-error@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== + dependencies: + get-func-name "^2.0.2" + ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" @@ -2119,6 +2788,15 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + clone-stats@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" @@ -2205,6 +2883,11 @@ convert-source-map@^1.4.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: dependencies: safe-buffer "~5.1.1" +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" @@ -2260,7 +2943,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0: +cross-spawn@^7.0.0, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -2323,6 +3006,13 @@ debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: dependencies: ms "2.1.2" +debug@^4.3.1, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + decamelize-keys@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" @@ -2341,6 +3031,13 @@ decode-uri-component@^0.2.0: resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= +deep-eql@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" + integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== + dependencies: + type-detect "^4.0.0" + deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -2397,6 +3094,11 @@ diff-sequences@^24.9.0: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.9.0.tgz#5715d6244e2aa65f48bba0bc972db0b0b11e95b5" integrity sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew== +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -2445,6 +3147,11 @@ electron-to-chromium@^1.3.570: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.570.tgz#3f5141cc39b4e3892a276b4889980dabf1d29c7f" integrity sha512-Y6OCoVQgFQBP5py6A/06+yWxUZHDlNr/gNDGatjH8AZqXl8X0tE4LfjLJsXGz/JmWJz8a6K7bR1k+QzZ+k//fg== +electron-to-chromium@^1.4.668: + version "1.4.712" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.712.tgz#2117ea2f4f95e8e0ec96c33dd345134ac00e57ed" + integrity sha512-ncfPC8UnGIyGFrPE03J5Xn6yTZ6R+clkcZbuG1PJbjAaZBFS4Kn3UKfzu8eilzru6SfC8TPsHuwv0p0eYVu+ww== + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -2513,11 +3220,45 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +esbuild@^0.20.1: + version "0.20.2" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.20.2.tgz#9d6b2386561766ee6b5a55196c6d766d28c87ea1" + integrity sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g== + optionalDependencies: + "@esbuild/aix-ppc64" "0.20.2" + "@esbuild/android-arm" "0.20.2" + "@esbuild/android-arm64" "0.20.2" + "@esbuild/android-x64" "0.20.2" + "@esbuild/darwin-arm64" "0.20.2" + "@esbuild/darwin-x64" "0.20.2" + "@esbuild/freebsd-arm64" "0.20.2" + "@esbuild/freebsd-x64" "0.20.2" + "@esbuild/linux-arm" "0.20.2" + "@esbuild/linux-arm64" "0.20.2" + "@esbuild/linux-ia32" "0.20.2" + "@esbuild/linux-loong64" "0.20.2" + "@esbuild/linux-mips64el" "0.20.2" + "@esbuild/linux-ppc64" "0.20.2" + "@esbuild/linux-riscv64" "0.20.2" + "@esbuild/linux-s390x" "0.20.2" + "@esbuild/linux-x64" "0.20.2" + "@esbuild/netbsd-x64" "0.20.2" + "@esbuild/openbsd-x64" "0.20.2" + "@esbuild/sunos-x64" "0.20.2" + "@esbuild/win32-arm64" "0.20.2" + "@esbuild/win32-ia32" "0.20.2" + "@esbuild/win32-x64" "0.20.2" + escalade@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.0.tgz#e8e2d7c7a8b76f6ee64c2181d6b8151441602d4e" integrity sha512-mAk+hPSO8fLDkhV7V0dXazH5pDc6MrjBTPyD3VeKzxnVFjH1MIxbCdqGZB9O8+EwWakZs3ZCbDS4IpRt79V1ig== +escalade@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -2653,6 +3394,13 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== +estree-walker@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-3.0.3.tgz#67c3e549ec402a487b4fc193d1953a524752340d" + integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== + dependencies: + "@types/estree" "^1.0.0" + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -2704,6 +3452,21 @@ execa@^3.2.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c" + integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^8.0.1" + human-signals "^5.0.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^4.1.0" + strip-final-newline "^3.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -2969,6 +3732,11 @@ fsevents@^1.2.7: bindings "^1.5.0" nan "^2.12.1" +fsevents@~2.3.2, fsevents@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -2984,11 +3752,21 @@ gensync@^1.0.0-beta.1: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + get-caller-file@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-func-name@^2.0.1, get-func-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" + integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== + get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -3003,6 +3781,11 @@ get-stream@^5.0.0: dependencies: pump "^3.0.0" +get-stream@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" + integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -3232,6 +4015,11 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== +human-signals@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" + integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== + iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -3500,6 +4288,11 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + is-string@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" @@ -3968,6 +4761,11 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= +js-tokens@^8.0.2: + version "8.0.3" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-8.0.3.tgz#1c407ec905643603b38b6be6977300406ec48775" + integrity sha512-UfJMcSJc+SEXEl9lH/VLHSZbThQyLpw1vLO1Lb+j4RWDvG3N2f7yj3PVQA3cmkTBNldJ9eFnM+xEXxHIXrYiJw== + js-yaml@^3.13.1: version "3.14.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" @@ -3981,29 +4779,30 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jscodeshift@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.11.0.tgz#4f95039408f3f06b0e39bb4d53bc3139f5330e2f" - integrity sha512-SdRK2C7jjs4k/kT2mwtO07KJN9RnjxtKn03d9JVj6c3j9WwaLcFYsICYDnLAzY0hp+wG2nxl+Cm2jWLiNVYb8g== - dependencies: - "@babel/core" "^7.1.6" - "@babel/parser" "^7.1.6" - "@babel/plugin-proposal-class-properties" "^7.1.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.1.0" - "@babel/plugin-proposal-optional-chaining" "^7.1.0" - "@babel/plugin-transform-modules-commonjs" "^7.1.0" - "@babel/preset-flow" "^7.0.0" - "@babel/preset-typescript" "^7.1.0" - "@babel/register" "^7.0.0" +jscodeshift@^0.15.1: + version "0.15.2" + resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.15.2.tgz#145563860360b4819a558c75c545f39683e5a0be" + integrity sha512-FquR7Okgmc4Sd0aEDwqho3rEiKR3BdvuG9jfdHjLJ6JQoWSMpavug3AoIfnfWhxFlf+5pzQh8qjqz0DWFrNQzA== + dependencies: + "@babel/core" "^7.23.0" + "@babel/parser" "^7.23.0" + "@babel/plugin-transform-class-properties" "^7.22.5" + "@babel/plugin-transform-modules-commonjs" "^7.23.0" + "@babel/plugin-transform-nullish-coalescing-operator" "^7.22.11" + "@babel/plugin-transform-optional-chaining" "^7.23.0" + "@babel/plugin-transform-private-methods" "^7.22.5" + "@babel/preset-flow" "^7.22.15" + "@babel/preset-typescript" "^7.23.0" + "@babel/register" "^7.22.15" babel-core "^7.0.0-bridge.0" - colors "^1.1.2" + chalk "^4.1.2" flow-parser "0.*" graceful-fs "^4.2.4" - micromatch "^3.1.10" + micromatch "^4.0.4" neo-async "^2.5.0" node-dir "^0.1.17" - recast "^0.20.3" - temp "^0.8.1" + recast "^0.23.3" + temp "^0.8.4" write-file-atomic "^2.3.0" jsdom@^11.5.1: @@ -4090,6 +4889,16 @@ json5@^2.1.2: dependencies: minimist "^1.2.5" +json5@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +jsonc-parser@^3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" + integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== + jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -4172,6 +4981,14 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" +local-pkg@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.5.0.tgz#093d25a346bae59a99f80e75f6e9d36d7e8c925c" + integrity sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg== + dependencies: + mlly "^1.4.2" + pkg-types "^1.0.3" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -4312,6 +5129,13 @@ loud-rejection@^1.0.0: currently-unhandled "^0.4.1" signal-exit "^3.0.0" +loupe@^2.3.6, loupe@^2.3.7: + version "2.3.7" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" + integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== + dependencies: + get-func-name "^2.0.1" + lru-cache@^4.0.0, lru-cache@^4.0.1: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" @@ -4320,6 +5144,20 @@ lru-cache@^4.0.0, lru-cache@^4.0.1: pseudomap "^1.0.2" yallist "^2.1.2" +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +magic-string@^0.30.5: + version "0.30.8" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.8.tgz#14e8624246d2bedba70d5462aa99ac9681844613" + integrity sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.15" + 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" @@ -4409,6 +5247,14 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + mime-db@1.44.0: version "1.44.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" @@ -4426,6 +5272,11 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -4461,6 +5312,16 @@ mkdirp@^0.5.1: dependencies: minimist "^1.2.5" +mlly@^1.2.0, mlly@^1.4.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.6.1.tgz#0983067dc3366d6314fc5e12712884e6978d028f" + integrity sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA== + dependencies: + acorn "^8.11.3" + pathe "^1.1.2" + pkg-types "^1.0.3" + ufo "^1.3.2" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -4498,6 +5359,11 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== +nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -4563,6 +5429,11 @@ node-releases@^1.1.61: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.61.tgz#707b0fca9ce4e11783612ba4a2fcba09047af16e" integrity sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g== +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== + normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -4601,6 +5472,13 @@ npm-run-path@^4.0.0: dependencies: path-key "^3.0.0" +npm-run-path@^5.1.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.3.0.tgz#e23353d0ebb9317f174e93417e4a4d82d0249e9f" + integrity sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ== + dependencies: + path-key "^4.0.0" + nwsapi@^2.0.7: version "2.2.0" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" @@ -4715,6 +5593,13 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + optionator@^0.8.1, optionator@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -4768,6 +5653,13 @@ p-limit@^2.0.0: dependencies: p-try "^2.0.0" +p-limit@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-5.0.0.tgz#6946d5b7140b649b7a33a027d89b4c625b3a5985" + integrity sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ== + dependencies: + yocto-queue "^1.0.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -4852,6 +5744,11 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" @@ -4869,16 +5766,36 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +pathe@^1.1.0, pathe@^1.1.1, pathe@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" + integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + picomatch@^2.0.5, picomatch@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" @@ -4889,13 +5806,18 @@ pify@^4.0.1: resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== -pirates@^4.0.0, pirates@^4.0.1: +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== dependencies: node-modules-regexp "^1.0.0" +pirates@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -4903,6 +5825,15 @@ pkg-dir@^3.0.0: dependencies: find-up "^3.0.0" +pkg-types@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.0.3.tgz#988b42ab19254c01614d13f4f65a2cfc7880f868" + integrity sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A== + dependencies: + jsonc-parser "^3.2.0" + mlly "^1.2.0" + pathe "^1.1.0" + pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" @@ -4913,6 +5844,15 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +postcss@^8.4.36: + version "8.4.37" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.37.tgz#4505f992cd0c20e03d25f13b31901640b2db731a" + integrity sha512-7iB/v/r7Woof0glKLH8b1SPHrsX7uhdO+Geb41QpF/+mWZHU3uxxSlN+UXGVit1PawOYDToO+AbZzhBzWRDwbQ== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.0" + source-map-js "^1.2.0" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -4928,6 +5868,15 @@ pretty-format@^24.9.0: ansi-styles "^3.2.0" react-is "^16.8.4" +pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -4998,6 +5947,11 @@ react-is@^16.8.1, react-is@^16.8.4: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-is@^18.0.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== + read-pkg-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" @@ -5064,6 +6018,17 @@ recast@^0.20.3: source-map "~0.6.1" tslib "^2.0.1" +recast@^0.23.3: + version "0.23.6" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.23.6.tgz#198fba74f66143a30acc81929302d214ce4e3bfa" + integrity sha512-9FHoNjX1yjuesMwuthAmPKabxYQdOgihFYmT5ebXfYGBcnqXZf3WOVz+5foEZ8Y83P4ZY6yQD5GMmtV+pgCCAQ== + dependencies: + ast-types "^0.16.1" + esprima "~4.0.0" + source-map "~0.6.1" + tiny-invariant "^1.3.3" + tslib "^2.0.1" + redent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" @@ -5291,6 +6256,28 @@ rimraf@^2.5.4, rimraf@^2.6.3: dependencies: glob "^7.1.3" +rollup@^4.13.0: + version "4.13.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.13.0.tgz#dd2ae144b4cdc2ea25420477f68d4937a721237a" + integrity sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg== + dependencies: + "@types/estree" "1.0.5" + optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.13.0" + "@rollup/rollup-android-arm64" "4.13.0" + "@rollup/rollup-darwin-arm64" "4.13.0" + "@rollup/rollup-darwin-x64" "4.13.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.13.0" + "@rollup/rollup-linux-arm64-gnu" "4.13.0" + "@rollup/rollup-linux-arm64-musl" "4.13.0" + "@rollup/rollup-linux-riscv64-gnu" "4.13.0" + "@rollup/rollup-linux-x64-gnu" "4.13.0" + "@rollup/rollup-linux-x64-musl" "4.13.0" + "@rollup/rollup-win32-arm64-msvc" "4.13.0" + "@rollup/rollup-win32-ia32-msvc" "4.13.0" + "@rollup/rollup-win32-x64-msvc" "4.13.0" + fsevents "~2.3.2" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -5370,6 +6357,11 @@ semver@^6.0.0, semver@^6.1.2, semver@^6.2.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -5385,6 +6377,13 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -5422,11 +6421,21 @@ side-channel@^1.0.2: es-abstract "^1.18.0-next.0" object-inspect "^1.8.0" +siginfo@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" + integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== +signal-exit@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + sisteransi@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -5486,6 +6495,11 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" +source-map-js@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" + integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== + source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" @@ -5590,6 +6604,11 @@ stack-utils@^1.0.1: resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== +stackback@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" + integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== + static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -5598,6 +6617,11 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" +std-env@^3.5.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" + integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== + stealthy-require@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" @@ -5712,6 +6736,11 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +strip-final-newline@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + strip-indent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" @@ -5722,6 +6751,13 @@ strip-json-comments@^3.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +strip-literal@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-2.0.0.tgz#5d063580933e4e03ebb669b12db64d2200687527" + integrity sha512-f9vHgsCWBq2ugHAkGMiiYY+AYG0D/cbloKKg0nhaaaSNsujdGIpVXCNsrJpCKr5M0f4aI31mr13UjY6GAuXCKA== + dependencies: + js-tokens "^8.0.2" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -5763,7 +6799,7 @@ table@^5.2.3: slice-ansi "^2.1.0" string-width "^3.0.0" -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== @@ -5808,6 +6844,26 @@ time-stamp@^1.0.0: resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= +tiny-invariant@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127" + integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg== + +tinybench@^2.5.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.6.0.tgz#1423284ee22de07c91b3752c048d2764714b341b" + integrity sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA== + +tinypool@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.8.2.tgz#84013b03dc69dacb322563a475d4c0a9be00f82a" + integrity sha512-SUszKYe5wgsxnNOVlBYO6IC+8VGWdVGZWAqUxp3UErNBtptZvWbwyUOyzNL59zigz2rCA92QiL3wvG+JDSdJdQ== + +tinyspy@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-2.2.1.tgz#117b2342f1f38a0dbdcc73a50a454883adf861d1" + integrity sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -5916,6 +6972,11 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" +type-detect@^4.0.0, type-detect@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + type-fest@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" @@ -5926,6 +6987,21 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +typescript@^5.2.2: + version "5.4.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff" + integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg== + +ufo@^1.3.2: + version "1.5.3" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" + integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" @@ -5967,6 +7043,14 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + uri-js@^4.2.2: version "4.4.0" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602" @@ -6035,6 +7119,54 @@ vinyl@^0.5.0: clone-stats "^0.0.1" replace-ext "0.0.1" +vite-node@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-1.4.0.tgz#265529d60570ca695ceb69391f87f92847934ad8" + integrity sha512-VZDAseqjrHgNd4Kh8icYHWzTKSCZMhia7GyHfhtzLW33fZlG9SwsB6CEhgyVOWkJfJ2pFLrp/Gj1FSfAiqH9Lw== + dependencies: + cac "^6.7.14" + debug "^4.3.4" + pathe "^1.1.1" + picocolors "^1.0.0" + vite "^5.0.0" + +vite@^5.0.0: + version "5.2.2" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.2.2.tgz#b98f8de352d22e21d99508274ddd053ef82bf238" + integrity sha512-FWZbz0oSdLq5snUI0b6sULbz58iXFXdvkZfZWR/F0ZJuKTSPO7v72QPXt6KqYeMFb0yytNp6kZosxJ96Nr/wDQ== + dependencies: + esbuild "^0.20.1" + postcss "^8.4.36" + rollup "^4.13.0" + optionalDependencies: + fsevents "~2.3.3" + +vitest@^1.0.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-1.4.0.tgz#f5c812aaf5023818b89b7fc667fa45327396fece" + integrity sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw== + dependencies: + "@vitest/expect" "1.4.0" + "@vitest/runner" "1.4.0" + "@vitest/snapshot" "1.4.0" + "@vitest/spy" "1.4.0" + "@vitest/utils" "1.4.0" + acorn-walk "^8.3.2" + chai "^4.3.10" + debug "^4.3.4" + execa "^8.0.1" + local-pkg "^0.5.0" + magic-string "^0.30.5" + pathe "^1.1.1" + picocolors "^1.0.0" + std-env "^3.5.0" + strip-literal "^2.0.0" + tinybench "^2.5.1" + tinypool "^0.8.2" + vite "^5.0.0" + vite-node "1.4.0" + why-is-node-running "^2.2.2" + w3c-hr-time@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" @@ -6103,6 +7235,14 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +why-is-node-running@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/why-is-node-running/-/why-is-node-running-2.2.2.tgz#4185b2b4699117819e7154594271e7e344c9973e" + integrity sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA== + dependencies: + siginfo "^2.0.0" + stackback "0.0.2" + word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" @@ -6174,6 +7314,11 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + yargs-parser@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" @@ -6204,3 +7349,8 @@ yargs@^13.3.0: which-module "^2.0.0" y18n "^4.0.0" yargs-parser "^13.1.2" + +yocto-queue@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" + integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==