mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Two breakages surfaced when CI started running desktop tests:
- Root vitest.config.ts replaced default exclude with `["**/.claude/**"]`,
losing `**/node_modules/**`. Desktop has no local vitest config, so
vitest scanned into `node_modules/zod/src/v4/classic/tests/*.test.ts`
and failed on missing peers (`@web-std/file`, `recheck`). Spread
`configDefaults.exclude` so node_modules stays excluded.
- window-manager dark titlebar color changed from #18181c to #181B1A in
963c7926 (white-flash fix) but the test was not updated. Update the
expected color to match the new intended behavior.
63 lines
1.9 KiB
TypeScript
63 lines
1.9 KiB
TypeScript
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import { configDefaults, defineConfig } from "vitest/config";
|
|
|
|
const appDir = path.resolve(__dirname, "packages/app");
|
|
const appNodeModules = path.resolve(appDir, "node_modules");
|
|
const rootNodeModules = path.resolve(__dirname, "node_modules");
|
|
const resolvePackageEntry = (packageName: string) => {
|
|
const appPackagePath = path.resolve(appNodeModules, packageName);
|
|
return fs.existsSync(appPackagePath)
|
|
? appPackagePath
|
|
: path.resolve(rootNodeModules, packageName);
|
|
};
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
extensions: [
|
|
".web.mjs",
|
|
".web.js",
|
|
".web.mts",
|
|
".web.ts",
|
|
".web.jsx",
|
|
".web.tsx",
|
|
".mjs",
|
|
".js",
|
|
".mts",
|
|
".ts",
|
|
".jsx",
|
|
".tsx",
|
|
".json",
|
|
],
|
|
alias: [
|
|
{
|
|
find: /^@getpaseo\/relay\/e2ee$/,
|
|
replacement: path.resolve(__dirname, "packages/relay/src/e2ee.ts"),
|
|
},
|
|
{
|
|
find: /^@getpaseo\/relay$/,
|
|
replacement: path.resolve(__dirname, "packages/relay/src/index.ts"),
|
|
},
|
|
{ find: "@", replacement: path.resolve(appDir, "src") },
|
|
{ find: "@server", replacement: path.resolve(__dirname, "packages/server/src") },
|
|
{
|
|
find: "react-native",
|
|
replacement: path.resolve(rootNodeModules, "react-native-web/dist/index.js"),
|
|
},
|
|
{ find: "react", replacement: resolvePackageEntry("react") },
|
|
{ find: "react-dom", replacement: resolvePackageEntry("react-dom") },
|
|
{
|
|
find: /^@xterm\/addon-ligatures\/lib\/addon-ligatures\.mjs$/,
|
|
replacement: path.resolve(appDir, "test-stubs/xterm-addon-ligatures.ts"),
|
|
},
|
|
{
|
|
find: /^@xterm\/addon-ligatures$/,
|
|
replacement: path.resolve(appDir, "test-stubs/xterm-addon-ligatures.ts"),
|
|
},
|
|
],
|
|
},
|
|
test: {
|
|
exclude: [...configDefaults.exclude, "**/.claude/**"],
|
|
},
|
|
});
|