From 4b4a95c04fd3b33238e0624d480c3da9c2402634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Barr=C3=A9?= Date: Wed, 22 May 2024 20:45:29 +0200 Subject: [PATCH] fix: don't use retainLines with react compiler (#319) --- .npmrc | 1 + package.json | 2 +- packages/plugin-react/CHANGELOG.md | 17 ++ packages/plugin-react/src/index.ts | 29 ++- .../compiler/__tests__/compiler.spec.ts | 15 ++ playground/compiler/index.html | 13 ++ playground/compiler/package.json | 23 +++ playground/compiler/public/vite.svg | 1 + playground/compiler/src/App.css | 42 ++++ playground/compiler/src/App.tsx | 23 +++ playground/compiler/src/index.css | 69 +++++++ playground/compiler/src/main.tsx | 10 + playground/compiler/tsconfig.json | 25 +++ playground/compiler/vite.config.ts | 15 ++ playground/mdx/vite.config.ts | 1 + playground/react-classic/vite.config.ts | 1 + playground/react-emotion/vite.config.ts | 1 + playground/react-env/vite.config.ts | 1 + playground/react-sourcemap/vite.config.ts | 1 + playground/react/vite.config.ts | 1 + playground/ssr-react/vite.config.js | 1 + playground/vitest.config.e2e.ts | 3 +- playground/vitestSetup.ts | 2 + pnpm-lock.yaml | 190 +++++++++++++++++- 24 files changed, 478 insertions(+), 9 deletions(-) create mode 100644 playground/compiler/__tests__/compiler.spec.ts create mode 100644 playground/compiler/index.html create mode 100644 playground/compiler/package.json create mode 100644 playground/compiler/public/vite.svg create mode 100644 playground/compiler/src/App.css create mode 100644 playground/compiler/src/App.tsx create mode 100644 playground/compiler/src/index.css create mode 100644 playground/compiler/src/main.tsx create mode 100644 playground/compiler/tsconfig.json create mode 100644 playground/compiler/vite.config.ts diff --git a/.npmrc b/.npmrc index f64ae646..e4b07fed 100644 --- a/.npmrc +++ b/.npmrc @@ -1,4 +1,5 @@ hoist-pattern[]=@emotion/* # playground/react-emotion +hoist-pattern[]=*babel* strict-peer-dependencies=false shell-emulator=true auto-install-peers=false diff --git a/package.json b/package.json index 6a27ce90..53ebec5b 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,8 @@ "ci-publish": "tsx scripts/publishCI.ts" }, "devDependencies": { - "@eslint-types/typescript-eslint": "^7.5.0", "@eslint-types/import": "^2.29.1", + "@eslint-types/typescript-eslint": "^7.5.0", "@types/fs-extra": "^11.0.4", "@types/node": "^20.12.12", "@typescript-eslint/eslint-plugin": "^7.9.0", diff --git a/packages/plugin-react/CHANGELOG.md b/packages/plugin-react/CHANGELOG.md index a911afd6..0e27cae4 100644 --- a/packages/plugin-react/CHANGELOG.md +++ b/packages/plugin-react/CHANGELOG.md @@ -2,6 +2,23 @@ ## Unreleased +### Fix support for React compiler + +Don't set `retainLines: true` when the React compiler is used. This creates whitespace issues and the compiler is modifying the JSX too much to get correct line numbers after that. If you want to use the React compiler and get back correct line numbers for tools like [vite-plugin-react-click-to-component](https://github.com/ArnaudBarre/vite-plugin-react-click-to-component) to work, you should update your config to something like: + +```ts +export default defineConfig(({ command }) => { + const babelPlugins = [['babel-plugin-react-compiler', {}]] + if (command === 'serve') { + babelPlugins.push(['@babel/plugin-transform-react-jsx-development', {}]) + } + + return { + plugins: [react({ babel: { plugins: babelPlugins } })], + } +}) +``` + ### Support HMR for class components This is a long overdue and should fix some issues people had with HMR when migrating from CRA. diff --git a/packages/plugin-react/src/index.ts b/packages/plugin-react/src/index.ts index 7d5130b5..1598901c 100644 --- a/packages/plugin-react/src/index.ts +++ b/packages/plugin-react/src/index.ts @@ -235,7 +235,11 @@ export default function viteReact(opts: Options = {}): PluginOption[] { filename: id, sourceFileName: filepath, // Required for esbuild.jsxDev to provide correct line numbers - retainLines: !isProduction && isJSX && opts.jsxRuntime !== 'classic', + // This crates issues the react compiler because the re-order is too important + // People should use @babel/plugin-transform-react-jsx-development to get back good line numbers + retainLines: hasCompiler(plugins) + ? false + : !isProduction && isJSX && opts.jsxRuntime !== 'classic', parserOpts: { ...babelOptions.parserOpts, sourceType: 'module', @@ -264,16 +268,23 @@ export default function viteReact(opts: Options = {}): PluginOption[] { }, } + // We can't add `react-dom` because the dependency is `react-dom/client` + // for React 18 while it's `react-dom` for React 17. We'd need to detect + // what React version the user has installed. + const dependencies = ['react', jsxImportDevRuntime, jsxImportRuntime] + const staticBabelPlugins = + typeof opts.babel === 'object' ? opts.babel?.plugins ?? [] : [] + if (hasCompiler(staticBabelPlugins)) { + dependencies.push('react/compiler-runtime') + } + const viteReactRefresh: Plugin = { name: 'vite:react-refresh', enforce: 'pre', config: (userConfig) => ({ build: silenceUseClientWarning(userConfig), optimizeDeps: { - // We can't add `react-dom` because the dependency is `react-dom/client` - // for React 18 while it's `react-dom` for React 17. We'd need to detect - // what React version the user has installed. - include: ['react', jsxImportDevRuntime, jsxImportRuntime], + include: dependencies, }, resolve: { dedupe: ['react', 'react-dom'], @@ -357,3 +368,11 @@ function createBabelOptions(rawOptions?: BabelOptions) { function defined(value: T | undefined): value is T { return value !== undefined } + +function hasCompiler(plugins: ReactBabelOptions['plugins']) { + return plugins.some( + (p) => + p === 'babel-plugin-react-compiler' || + (Array.isArray(p) && p[0] === 'babel-plugin-react-compiler'), + ) +} diff --git a/playground/compiler/__tests__/compiler.spec.ts b/playground/compiler/__tests__/compiler.spec.ts new file mode 100644 index 00000000..545505ff --- /dev/null +++ b/playground/compiler/__tests__/compiler.spec.ts @@ -0,0 +1,15 @@ +import { expect, test } from 'vitest' +import { editFile, isServe, page, untilUpdated } from '~utils' + +test('should render', async () => { + expect(await page.textContent('button')).toMatch('count is 0') + expect(await page.click('button')) + expect(await page.textContent('button')).toMatch('count is 1') +}) + +test.runIf(isServe)('should hmr', async () => { + editFile('src/App.tsx', (code) => + code.replace('count is {count}', 'count is {count}!'), + ) + await untilUpdated(() => page.textContent('button'), 'count is 1!') +}) diff --git a/playground/compiler/index.html b/playground/compiler/index.html new file mode 100644 index 00000000..e4b78eae --- /dev/null +++ b/playground/compiler/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + React + TS + + +
+ + + diff --git a/playground/compiler/package.json b/playground/compiler/package.json new file mode 100644 index 00000000..6b8f0e70 --- /dev/null +++ b/playground/compiler/package.json @@ -0,0 +1,23 @@ +{ + "name": "@vitejs/compiler", + "private": true, + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "react": "^19.0.0-rc-3f1436cca1-20240516", + "react-dom": "^19.0.0-rc-3f1436cca1-20240516" + }, + "devDependencies": { + "@babel/plugin-transform-react-jsx-development": "^7.22.5", + "@types/react": "^18.3.2", + "@types/react-dom": "^18.3.0", + "@vitejs/plugin-react": "workspace:*", + "babel-plugin-react-compiler": "^0.0.0-experimental-592953e-20240517", + "typescript": "^5.4.5", + "vite": "^5.2.11" + } +} diff --git a/playground/compiler/public/vite.svg b/playground/compiler/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/playground/compiler/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/playground/compiler/src/App.css b/playground/compiler/src/App.css new file mode 100644 index 00000000..b9d355df --- /dev/null +++ b/playground/compiler/src/App.css @@ -0,0 +1,42 @@ +#root { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.react:hover { + filter: drop-shadow(0 0 2em #61dafbaa); +} + +@keyframes logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@media (prefers-reduced-motion: no-preference) { + a:nth-of-type(2) .logo { + animation: logo-spin infinite 20s linear; + } +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} diff --git a/playground/compiler/src/App.tsx b/playground/compiler/src/App.tsx new file mode 100644 index 00000000..c2d2e8ac --- /dev/null +++ b/playground/compiler/src/App.tsx @@ -0,0 +1,23 @@ +import { useState } from 'react' +import './App.css' + +export function App() { + const [count, setCount] = useState(0) + + return ( + <> +

Vite + React

+
+ +

+ Edit src/App.tsx and save to test HMR +

+
+

+ Click on the Vite and React logos to learn more +

+ + ) +} diff --git a/playground/compiler/src/index.css b/playground/compiler/src/index.css new file mode 100644 index 00000000..2c3fac68 --- /dev/null +++ b/playground/compiler/src/index.css @@ -0,0 +1,69 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/playground/compiler/src/main.tsx b/playground/compiler/src/main.tsx new file mode 100644 index 00000000..813e3d76 --- /dev/null +++ b/playground/compiler/src/main.tsx @@ -0,0 +1,10 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import { App } from './App' +import './index.css' + +ReactDOM.createRoot(document.getElementById('root')!).render( + + + , +) diff --git a/playground/compiler/tsconfig.json b/playground/compiler/tsconfig.json new file mode 100644 index 00000000..fac7d251 --- /dev/null +++ b/playground/compiler/tsconfig.json @@ -0,0 +1,25 @@ +{ + "include": ["src"], + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "types": ["vite/client"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + } +} diff --git a/playground/compiler/vite.config.ts b/playground/compiler/vite.config.ts new file mode 100644 index 00000000..2983201e --- /dev/null +++ b/playground/compiler/vite.config.ts @@ -0,0 +1,15 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +// https://vitejs.dev/config/ +export default defineConfig(({ command }) => { + const babelPlugins = [['babel-plugin-react-compiler', {}]] + if (command === 'serve') { + babelPlugins.push(['@babel/plugin-transform-react-jsx-development', {}]) + } + + return { + server: { port: 8900 /* Should be unique */ }, + plugins: [react({ babel: { plugins: babelPlugins } })], + } +}) diff --git a/playground/mdx/vite.config.ts b/playground/mdx/vite.config.ts index 50b88f8d..bc2c2b49 100644 --- a/playground/mdx/vite.config.ts +++ b/playground/mdx/vite.config.ts @@ -4,6 +4,7 @@ import mdx from '@mdx-js/rollup' // https://vitejs.dev/config/ export default defineConfig({ + server: { port: 8901 /* Should be unique */ }, plugins: [ { enforce: 'pre', ...mdx() }, react({ include: /\.(mdx|md|ts|tsx)$/ }), diff --git a/playground/react-classic/vite.config.ts b/playground/react-classic/vite.config.ts index 44f97441..530e397d 100644 --- a/playground/react-classic/vite.config.ts +++ b/playground/react-classic/vite.config.ts @@ -2,6 +2,7 @@ import react from '@vitejs/plugin-react' import type { UserConfig } from 'vite' const config: UserConfig = { + server: { port: 8903 /* Should be unique */ }, plugins: [ react({ jsxRuntime: 'classic', diff --git a/playground/react-emotion/vite.config.ts b/playground/react-emotion/vite.config.ts index 3d688fd5..3c0aa96b 100644 --- a/playground/react-emotion/vite.config.ts +++ b/playground/react-emotion/vite.config.ts @@ -2,6 +2,7 @@ import react from '@vitejs/plugin-react' import { defineConfig } from 'vite' export default defineConfig({ + server: { port: 8904 /* Should be unique */ }, plugins: [ react({ jsxImportSource: '@emotion/react', diff --git a/playground/react-env/vite.config.ts b/playground/react-env/vite.config.ts index 55746987..4f7c0081 100644 --- a/playground/react-env/vite.config.ts +++ b/playground/react-env/vite.config.ts @@ -5,6 +5,7 @@ import type { UserConfig } from 'vite' process.env.NODE_ENV = '' const config: UserConfig = { + server: { port: 8905 /* Should be unique */ }, plugins: [react()], mode: 'staging', build: { diff --git a/playground/react-sourcemap/vite.config.ts b/playground/react-sourcemap/vite.config.ts index afe6ecc3..42cc217e 100644 --- a/playground/react-sourcemap/vite.config.ts +++ b/playground/react-sourcemap/vite.config.ts @@ -2,6 +2,7 @@ import react from '@vitejs/plugin-react' import type { UserConfig } from 'vite' const config: UserConfig = { + server: { port: 8906 /* Should be unique */ }, plugins: [ react({ jsxRuntime: process.env.USE_CLASSIC === '1' ? 'classic' : 'automatic', diff --git a/playground/react/vite.config.ts b/playground/react/vite.config.ts index 2f4a9f1e..d257635d 100644 --- a/playground/react/vite.config.ts +++ b/playground/react/vite.config.ts @@ -2,6 +2,7 @@ import react from '@vitejs/plugin-react' import type { UserConfig } from 'vite' const config: UserConfig = { + server: { port: 8902 /* Should be unique */ }, mode: 'development', plugins: [react()], build: { diff --git a/playground/ssr-react/vite.config.js b/playground/ssr-react/vite.config.js index 266400b8..5779ed40 100644 --- a/playground/ssr-react/vite.config.js +++ b/playground/ssr-react/vite.config.js @@ -2,6 +2,7 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ + server: { port: 8907 /* Should be unique */ }, plugins: [react()], build: { minify: false, diff --git a/playground/vitest.config.e2e.ts b/playground/vitest.config.e2e.ts index 0671b3ba..2774acda 100644 --- a/playground/vitest.config.e2e.ts +++ b/playground/vitest.config.e2e.ts @@ -1,7 +1,7 @@ import { resolve } from 'node:path' import { defineConfig } from 'vitest/config' -const timeout = process.env.CI ? 20_000 : 10_000 +const timeout = process.env.CI ? 20_000 : 5_000 export default defineConfig({ resolve: { @@ -10,6 +10,7 @@ export default defineConfig({ }, }, test: { + pool: 'forks', include: ['./playground/**/*.spec.[tj]s'], setupFiles: ['./playground/vitestSetup.ts'], globalSetup: ['./playground/vitestGlobalSetup.ts'], diff --git a/playground/vitestSetup.ts b/playground/vitestSetup.ts index 83cef572..42cc0e6e 100644 --- a/playground/vitestSetup.ts +++ b/playground/vitestSetup.ts @@ -246,6 +246,7 @@ export async function startDefaultServe(): Promise { process.env.VITE_INLINE = 'inline-serve' const testConfig = mergeConfig(options, config || {}) viteConfig = testConfig + process.chdir(rootDir) viteServer = server = await (await createServer(testConfig)).listen() // use resolved port/base from server const devBase = server.config.base @@ -265,6 +266,7 @@ export async function startDefaultServe(): Promise { options.plugins = [resolvedPlugin()] const testConfig = mergeConfig(options, config || {}) viteConfig = testConfig + process.chdir(rootDir) const rollupOutput = await build(testConfig) const isWatch = !!resolvedConfig!.build.watch // in build watch,call startStaticServer after the build is complete diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4e28e3e1..64546e98 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -128,6 +128,37 @@ importers: specifier: workspace:* version: link:../../packages/plugin-react + playground/compiler: + dependencies: + react: + specifier: ^19.0.0-rc-3f1436cca1-20240516 + version: 19.0.0-rc-d3ce0d3ea9-20240520 + react-dom: + specifier: ^19.0.0-rc-3f1436cca1-20240516 + version: 19.0.0-rc-d3ce0d3ea9-20240520(react@19.0.0-rc-d3ce0d3ea9-20240520) + devDependencies: + '@babel/plugin-transform-react-jsx-development': + specifier: ^7.22.5 + version: 7.22.5 + '@types/react': + specifier: ^18.3.2 + version: 18.3.2 + '@types/react-dom': + specifier: ^18.3.0 + version: 18.3.0 + '@vitejs/plugin-react': + specifier: workspace:* + version: link:../../packages/plugin-react + babel-plugin-react-compiler: + specifier: ^0.0.0-experimental-592953e-20240517 + version: 0.0.0-experimental-592953e-20240517 + typescript: + specifier: ^5.4.5 + version: 5.4.5 + vite: + specifier: ^5.2.11 + version: 5.2.11(@types/node@20.12.12) + playground/mdx: dependencies: react: @@ -314,6 +345,16 @@ packages: transitivePeerDependencies: - supports-color + /@babel/generator@7.2.0: + resolution: {integrity: sha512-BA75MVfRlFQG2EZgFYIwyT1r6xSkwfP2bdkY/kLZusEYWiJs4xCowab/alaEaT0wSvmVuXGqiefeBlP+7V1yKg==} + dependencies: + '@babel/types': 7.24.5 + jsesc: 2.5.2 + lodash: 4.17.21 + source-map: 0.5.7 + trim-right: 1.0.1 + dev: true + /@babel/generator@7.24.5: resolution: {integrity: sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==} engines: {node: '>=6.9.0'} @@ -323,6 +364,13 @@ packages: '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 + /@babel/helper-annotate-as-pure@7.22.5: + resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.24.5 + dev: true + /@babel/helper-compilation-targets@7.23.6: resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} engines: {node: '>=6.9.0'} @@ -464,6 +512,15 @@ packages: '@babel/plugin-syntax-pipeline-operator': 7.24.1 dev: true + /@babel/plugin-syntax-jsx@7.24.1: + resolution: {integrity: sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/helper-plugin-utils': 7.24.5 + dev: true + /@babel/plugin-syntax-pipeline-operator@7.24.1: resolution: {integrity: sha512-UU7uLj95zh6oMQiREvkTmXAvWy9pJI9p76SFkNsXTesDwQ67YM1UU1Bkx576djA6ZDcPSbzM/MqTJNcYeQ0G2g==} engines: {node: '>=6.9.0'} @@ -473,6 +530,15 @@ packages: '@babel/helper-plugin-utils': 7.24.5 dev: true + /@babel/plugin-transform-react-jsx-development@7.22.5: + resolution: {integrity: sha512-bDhuzwWMuInwCYeDeMzyi7TaBgRQei6DqxhbyniL7/VG4RSS7HtSL2QbY4eESy1KJqlWt8g3xeEBGPuo+XqC8A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/plugin-transform-react-jsx': 7.23.4 + dev: true + /@babel/plugin-transform-react-jsx-self@7.24.5(@babel/core@7.24.5): resolution: {integrity: sha512-RtCJoUO2oYrYwFPtR1/jkoBEcFuI1ae9a9IMxeyAVa3a1Ap4AnxmyIKG2b2FaJKqkidw/0cxRbWN+HOs6ZWd1w==} engines: {node: '>=6.9.0'} @@ -493,6 +559,19 @@ packages: '@babel/helper-plugin-utils': 7.24.5 dev: false + /@babel/plugin-transform-react-jsx@7.23.4: + resolution: {integrity: sha512-5xOpoPguCZCRbo/JeHlloSkTA8Bld1J/E1/kLfD1nsuiW1m8tduTA1ERCgIZokDflX/IBzKcqR3l7VlRgiIfHA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-module-imports': 7.24.3 + '@babel/helper-plugin-utils': 7.24.5 + '@babel/plugin-syntax-jsx': 7.24.1 + '@babel/types': 7.24.5 + dev: true + /@babel/runtime@7.23.5: resolution: {integrity: sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==} engines: {node: '>=6.9.0'} @@ -1140,6 +1219,15 @@ packages: '@sinclair/typebox': 0.27.8 dev: true + /@jest/types@24.9.0: + resolution: {integrity: sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==} + engines: {node: '>= 6'} + dependencies: + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 1.1.2 + '@types/yargs': 13.0.12 + dev: true + /@jridgewell/gen-mapping@0.3.3: resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} engines: {node: '>=6.0.0'} @@ -1544,6 +1632,23 @@ packages: '@types/unist': 3.0.2 dev: true + /@types/istanbul-lib-coverage@2.0.6: + resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} + dev: true + + /@types/istanbul-lib-report@3.0.3: + resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} + dependencies: + '@types/istanbul-lib-coverage': 2.0.6 + dev: true + + /@types/istanbul-reports@1.1.2: + resolution: {integrity: sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw==} + dependencies: + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-lib-report': 3.0.3 + dev: true + /@types/json5@0.0.29: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true @@ -1606,6 +1711,16 @@ packages: resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==} dev: true + /@types/yargs-parser@21.0.3: + resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} + dev: true + + /@types/yargs@13.0.12: + resolution: {integrity: sha512-qCxJE1qgz2y0hA4pIxjBR+PelCH0U5CK1XJXFwCNqfmliatKp47UCXXE9Dyk1OXBDLvsCF57TqQEJaeLfDYEOQ==} + dependencies: + '@types/yargs-parser': 21.0.3 + dev: true + /@typescript-eslint/eslint-plugin@7.9.0(@typescript-eslint/parser@7.9.0)(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-6e+X0X3sFe/G/54aC3jt0txuMTURqLyekmEHViqyA2VnxhLMpvA6nqmcjIy+Cr9tLDHPssA74BP5Mx9HQIxBEA==} engines: {node: ^18.18.0 || >=20.0.0} @@ -1844,6 +1959,11 @@ packages: type-fest: 3.13.1 dev: true + /ansi-regex@4.1.1: + resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==} + engines: {node: '>=6'} + dev: true + /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -1990,6 +2110,18 @@ packages: cosmiconfig: 7.1.0 resolve: 1.22.8 + /babel-plugin-react-compiler@0.0.0-experimental-592953e-20240517: + resolution: {integrity: sha512-OjG1SVaeQZaJrqkMFJatg8W/MTow8Ak5rx2SI0ETQBO1XvOk/XZGMbltNCPdFJLKghBYoBjC+Y3Ap/Xr7B01mA==} + dependencies: + '@babel/generator': 7.2.0 + '@babel/types': 7.24.5 + chalk: 4.1.2 + invariant: 2.2.4 + pretty-format: 24.9.0 + zod: 3.23.8 + zod-validation-error: 2.1.0(zod@3.23.8) + dev: true + /bail@2.0.2: resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} dev: true @@ -3575,6 +3707,12 @@ packages: side-channel: 1.0.4 dev: true + /invariant@2.2.4: + resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} + dependencies: + loose-envify: 1.4.0 + dev: true + /ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -3940,6 +4078,10 @@ packages: resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} dev: true + /lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true + /log-update@6.0.0: resolution: {integrity: sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==} engines: {node: '>=18'} @@ -3960,7 +4102,6 @@ packages: hasBin: true dependencies: js-tokens: 4.0.0 - dev: false /loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} @@ -5180,6 +5321,16 @@ packages: engines: {node: ^14.13.1 || >=16.0.0} dev: true + /pretty-format@24.9.0: + resolution: {integrity: sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==} + engines: {node: '>= 6'} + dependencies: + '@jest/types': 24.9.0 + ansi-regex: 4.1.1 + ansi-styles: 3.2.1 + react-is: 16.13.1 + dev: true + /pretty-format@29.7.0: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -5268,9 +5419,17 @@ packages: scheduler: 0.23.2 dev: false + /react-dom@19.0.0-rc-d3ce0d3ea9-20240520(react@19.0.0-rc-d3ce0d3ea9-20240520): + resolution: {integrity: sha512-C5ZnJw7LytGWQrWqBQsrVjrcef5+pewnr2BCWElLXxG2Cmj7iTuLfFaoK8I+qXd+LZm350pvI2zlT/5Zwt0DDg==} + peerDependencies: + react: 19.0.0-rc-d3ce0d3ea9-20240520 + dependencies: + react: 19.0.0-rc-d3ce0d3ea9-20240520 + scheduler: 0.25.0-rc-d3ce0d3ea9-20240520 + dev: false + /react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - dev: false /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} @@ -5322,6 +5481,11 @@ packages: loose-envify: 1.4.0 dev: false + /react@19.0.0-rc-d3ce0d3ea9-20240520: + resolution: {integrity: sha512-YO74Af5BrpnMexDl7OtlD0CUNzgdie5keVcGqTSPYbYyc6pKeXou+NkgXtt76znchjrnkyzS3leu/pD/buWKaA==} + engines: {node: '>=0.10.0'} + dev: false + /read-package-json-fast@3.0.2: resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -5524,6 +5688,10 @@ packages: loose-envify: 1.4.0 dev: false + /scheduler@0.25.0-rc-d3ce0d3ea9-20240520: + resolution: {integrity: sha512-S7LzB+h/4qB+OewxysUs8q/UsJZnjuLetl4x9qU5QdufOl8G/xHjvsWNVkgJ8jZSvGb5E68qRQl/MtjVq7EH/g==} + dev: false + /scslre@0.3.0: resolution: {integrity: sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==} engines: {node: ^14.0.0 || >=16.0.0} @@ -5900,6 +6068,11 @@ packages: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} dev: true + /trim-right@1.0.1: + resolution: {integrity: sha512-WZGXGstmCWgeevgTL54hrCuw1dyMQIzWy7ZfqRJfSmJZBwklI15egmQytFP6bPidmw3M8d5yEowl1niq4vmqZw==} + engines: {node: '>=0.10.0'} + dev: true + /trough@2.1.0: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} dev: true @@ -6386,6 +6559,19 @@ packages: engines: {node: '>=12.20'} dev: true + /zod-validation-error@2.1.0(zod@3.23.8): + resolution: {integrity: sha512-VJh93e2wb4c3tWtGgTa0OF/dTt/zoPCPzXq4V11ZjxmEAFaPi/Zss1xIZdEB5RD8GD00U0/iVXgqkF77RV7pdQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + zod: ^3.18.0 + dependencies: + zod: 3.23.8 + dev: true + + /zod@3.23.8: + resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} + dev: true + /zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} dev: true