Make shared-components vitest happier (#33863)
* Make shared-components vitest happier Silence logs about legacy JSX transform * Fix typedoc warning
This commit is contained in:
@@ -109,6 +109,7 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^8.53.1",
|
"@typescript-eslint/eslint-plugin": "^8.53.1",
|
||||||
"@typescript-eslint/parser": "^8.53.1",
|
"@typescript-eslint/parser": "^8.53.1",
|
||||||
"@vector-im/compound-web": "catalog:",
|
"@vector-im/compound-web": "catalog:",
|
||||||
|
"@vitejs/plugin-react": "catalog:",
|
||||||
"@vitest/browser-playwright": "catalog:",
|
"@vitest/browser-playwright": "catalog:",
|
||||||
"eslint": "8",
|
"eslint": "8",
|
||||||
"eslint-config-google": "^0.14.0",
|
"eslint-config-google": "^0.14.0",
|
||||||
@@ -138,6 +139,7 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@vector-im/compound-web": "^8.3.5 || ^9.0.0",
|
"@vector-im/compound-web": "^8.3.5 || ^9.0.0",
|
||||||
|
"react-dom": "catalog:",
|
||||||
"react": "catalog:"
|
"react": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
"typedoc": {
|
"typedoc": {
|
||||||
"cache": "true",
|
"cache": "true",
|
||||||
"command": "typedoc",
|
"command": "typedoc",
|
||||||
"inputs": ["src"],
|
"inputs": ["src", "{projectRoot}/typedoc.json"],
|
||||||
"outputs": ["{projectRoot}/typedoc"],
|
"outputs": ["{projectRoot}/typedoc"],
|
||||||
"options": { "cwd": "packages/shared-components" },
|
"options": { "cwd": "packages/shared-components" },
|
||||||
"dependsOn": ["^build"]
|
"dependsOn": ["^build"]
|
||||||
|
|||||||
@@ -22,6 +22,9 @@
|
|||||||
},
|
},
|
||||||
"react-virtuoso": {
|
"react-virtuoso": {
|
||||||
"*": "https://virtuoso.dev/"
|
"*": "https://virtuoso.dev/"
|
||||||
|
},
|
||||||
|
"linkifyjs": {
|
||||||
|
"*": "https://linkify.js.org/docs/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { dirname, resolve } from "node:path";
|
|||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
import { defineConfig, esmExternalRequirePlugin, type Plugin } from "vite";
|
import { defineConfig, esmExternalRequirePlugin, type Plugin } from "vite";
|
||||||
import dts from "unplugin-dts/vite";
|
import dts from "unplugin-dts/vite";
|
||||||
|
import react from "@vitejs/plugin-react";
|
||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||||
const cssLayerOrder = "@layer compound-tokens, compound-web, shared-components, app-web;";
|
const cssLayerOrder = "@layer compound-tokens, compound-web, shared-components, app-web;";
|
||||||
@@ -92,6 +93,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
react(),
|
||||||
layerCssAssets(),
|
layerCssAssets(),
|
||||||
dts({
|
dts({
|
||||||
bundleTypes: true,
|
bundleTypes: true,
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { playwright, PlaywrightProviderOptions } from "@vitest/browser-playwrigh
|
|||||||
import { nodePolyfills } from "vite-plugin-node-polyfills";
|
import { nodePolyfills } from "vite-plugin-node-polyfills";
|
||||||
|
|
||||||
import rootConfig from "../../vitest.config";
|
import rootConfig from "../../vitest.config";
|
||||||
|
import react from "@vitejs/plugin-react";
|
||||||
|
|
||||||
const dirname = typeof __dirname !== "undefined" ? __dirname : path.dirname(fileURLToPath(import.meta.url));
|
const dirname = typeof __dirname !== "undefined" ? __dirname : path.dirname(fileURLToPath(import.meta.url));
|
||||||
|
|
||||||
@@ -123,4 +124,5 @@ export default defineConfig({
|
|||||||
"@test-utils": path.resolve(__dirname, "./src/test/utils/index.tsx"),
|
"@test-utils": path.resolve(__dirname, "./src/test/utils/index.tsx"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
plugins: [react()],
|
||||||
});
|
});
|
||||||
|
|||||||
Generated
+6
@@ -1462,6 +1462,9 @@ importers:
|
|||||||
react-blurhash:
|
react-blurhash:
|
||||||
specifier: ^0.3.0
|
specifier: ^0.3.0
|
||||||
version: 0.3.0(patch_hash=58bc7f075478017ce27bcc252e8509876390db106246bd5b0a7446642cc4b505)(blurhash@2.0.5)(react@19.2.7)
|
version: 0.3.0(patch_hash=58bc7f075478017ce27bcc252e8509876390db106246bd5b0a7446642cc4b505)(blurhash@2.0.5)(react@19.2.7)
|
||||||
|
react-dom:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 19.2.7(react@19.2.7)
|
||||||
react-merge-refs:
|
react-merge-refs:
|
||||||
specifier: ^3.0.2
|
specifier: ^3.0.2
|
||||||
version: 3.0.2(react@19.2.7)
|
version: 3.0.2(react@19.2.7)
|
||||||
@@ -1544,6 +1547,9 @@ importers:
|
|||||||
'@vector-im/compound-web':
|
'@vector-im/compound-web':
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 9.4.1(@fontsource/inconsolata@5.2.8)(@fontsource/inter@5.2.8)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(@vector-im/compound-design-tokens@10.2.1(@types/react@19.2.14)(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
|
version: 9.4.1(@fontsource/inconsolata@5.2.8)(@fontsource/inter@5.2.8)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(@vector-im/compound-design-tokens@10.2.1(@types/react@19.2.14)(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
|
||||||
|
'@vitejs/plugin-react':
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 6.0.2(vite@8.0.16(@types/node@25.9.3)(esbuild@0.27.4)(jiti@2.7.0)(sugarss@5.0.1(postcss@8.5.15))(terser@5.48.0)(yaml@2.8.4))
|
||||||
'@vitest/browser-playwright':
|
'@vitest/browser-playwright':
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 4.1.9(playwright@1.60.0)(vite@8.0.16(@types/node@25.9.3)(esbuild@0.27.4)(jiti@2.7.0)(sugarss@5.0.1(postcss@8.5.15))(terser@5.48.0)(yaml@2.8.4))(vitest@4.1.9)
|
version: 4.1.9(playwright@1.60.0)(vite@8.0.16(@types/node@25.9.3)(esbuild@0.27.4)(jiti@2.7.0)(sugarss@5.0.1(postcss@8.5.15))(terser@5.48.0)(yaml@2.8.4))(vitest@4.1.9)
|
||||||
|
|||||||
Reference in New Issue
Block a user