mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
* chore(deps-dev): bump the dev-deps group across 1 directory with 7 updates Bumps the dev-deps group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) | `2.4.15` | `2.4.16` | | [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) | `3.2.4` | `3.2.6` | | [turbo](https://github.com/vercel/turborepo) | `2.9.14` | `2.9.16` | | [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) | `3.2.4` | `3.2.6` | | [@types/opentype.js](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/opentype.js) | `1.3.9` | `1.3.10` | | [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `6.4.2` | `6.4.3` | | [vitepress-plugin-llms](https://github.com/okineadev/vitepress-plugin-llms) | `1.12.2` | `1.13.1` | Updates `@biomejs/biome` from 2.4.15 to 2.4.16 - [Release notes](https://github.com/biomejs/biome/releases) - [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md) - [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.4.16/packages/@biomejs/biome) Updates `@vitest/coverage-v8` from 3.2.4 to 3.2.6 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v3.2.6/packages/coverage-v8) Updates `turbo` from 2.9.14 to 2.9.16 - [Release notes](https://github.com/vercel/turborepo/releases) - [Changelog](https://github.com/vercel/turborepo/blob/main/RELEASE.md) - [Commits](https://github.com/vercel/turborepo/compare/v2.9.14...v2.9.16) Updates `vitest` from 3.2.4 to 3.2.6 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v3.2.6/packages/vitest) Updates `@types/opentype.js` from 1.3.9 to 1.3.10 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/opentype.js) Updates `vite` from 6.4.2 to 6.4.3 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v6.4.3/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v6.4.3/packages/vite) Updates `vitepress-plugin-llms` from 1.12.2 to 1.13.1 - [Release notes](https://github.com/okineadev/vitepress-plugin-llms/releases) - [Commits](https://github.com/okineadev/vitepress-plugin-llms/compare/v1.12.2...v1.13.1) --- updated-dependencies: - dependency-name: "@biomejs/biome" dependency-version: 2.4.16 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-deps - dependency-name: "@vitest/coverage-v8" dependency-version: 3.2.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-deps - dependency-name: turbo dependency-version: 2.9.16 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-deps - dependency-name: vitest dependency-version: 3.2.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-deps - dependency-name: "@types/opentype.js" dependency-version: 1.3.10 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-deps - dependency-name: vite dependency-version: 6.4.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-deps - dependency-name: vitepress-plugin-llms dependency-version: 1.13.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-deps ... Signed-off-by: dependabot[bot] <support@github.com> * fix(test): resolve vitest 3.2.6 mock path breakage for posthog-node and @sentry/node Add posthog-node and @sentry/node to vitest resolve aliases (matching the existing pattern for all other api-workspace packages) and switch the analytics test mocks from fragile relative node_modules paths to bare specifiers. Vitest 3.2.6 changed how it matches mock paths through pnpm symlinks after vi.resetModules(), causing 9 analytics test failures. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
122 lines
4.8 KiB
TypeScript
122 lines
4.8 KiB
TypeScript
import crypto from "node:crypto";
|
|
import os from "node:os";
|
|
import path from "node:path";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
// Resolve api-workspace packages that pnpm only exposes under apps/api/node_modules.
|
|
const apiNodeModules = path.resolve(__dirname, "apps/api/node_modules");
|
|
|
|
// Resolve web-workspace packages that pnpm only exposes under apps/web/node_modules.
|
|
const webNodeModules = path.resolve(__dirname, "apps/web/node_modules");
|
|
|
|
// Resolve landing-workspace packages.
|
|
const landingNodeModules = path.resolve(__dirname, "apps/landing/node_modules");
|
|
|
|
// Temp dir for integration test DB + workspace (set BEFORE any app code loads)
|
|
const testDir = path.join(os.tmpdir(), `SnapOtter-test-${crypto.randomUUID().slice(0, 8)}`);
|
|
|
|
export default defineConfig({
|
|
esbuild: {
|
|
jsx: "automatic",
|
|
},
|
|
test: {
|
|
globals: true,
|
|
testTimeout: 30_000,
|
|
hookTimeout: 30_000,
|
|
pool: "forks",
|
|
poolOptions: {
|
|
forks: {
|
|
singleFork: true,
|
|
},
|
|
},
|
|
exclude: [
|
|
"tests/e2e/**",
|
|
"tests/e2e-docs/**",
|
|
"tests/e2e-editor/**",
|
|
"tests/e2e-landing/**",
|
|
"tests/e2e-docker/**",
|
|
"tests/e2e-analytics/**",
|
|
"**/node_modules/**",
|
|
"**/dist/**",
|
|
"**/.{idea,git,cache,output,temp}/**",
|
|
".worktrees/**",
|
|
".claude/**",
|
|
],
|
|
env: {
|
|
AUTH_ENABLED: "true",
|
|
DEFAULT_USERNAME: "admin",
|
|
DEFAULT_PASSWORD: "Adminpass1",
|
|
DB_PATH: path.join(testDir, "test.db"),
|
|
WORKSPACE_PATH: path.join(testDir, "workspace"),
|
|
MAX_UPLOAD_SIZE_MB: "10",
|
|
MAX_BATCH_SIZE: "10",
|
|
RATE_LIMIT_PER_MIN: "10000",
|
|
MAX_USERS: "0",
|
|
MAX_MEGAPIXELS: "100",
|
|
CONCURRENT_JOBS: "3",
|
|
FILE_MAX_AGE_HOURS: "1",
|
|
CLEANUP_INTERVAL_MINUTES: "60",
|
|
},
|
|
coverage: {
|
|
provider: "v8",
|
|
reporter: ["text", "html", "lcov"],
|
|
include: [
|
|
"packages/image-engine/src/**",
|
|
"apps/api/src/**",
|
|
"apps/web/src/stores/**",
|
|
"apps/web/src/lib/**",
|
|
],
|
|
exclude: [
|
|
"**/*.d.ts",
|
|
"**/node_modules/**",
|
|
"**/dist/**",
|
|
"apps/api/src/db/migrate.ts",
|
|
"apps/api/src/index.ts",
|
|
],
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@landing": path.resolve(__dirname, "apps/landing/src"),
|
|
// Landing page components that don't exist in web but are imported via @/
|
|
"@/components/fade-in": path.resolve(__dirname, "apps/landing/src/components/fade-in"),
|
|
"@/components/footer": path.resolve(__dirname, "apps/landing/src/components/footer"),
|
|
"@/components/json-ld": path.resolve(__dirname, "apps/landing/src/components/json-ld"),
|
|
"@/components/navbar": path.resolve(__dirname, "apps/landing/src/components/navbar"),
|
|
"@": path.resolve(__dirname, "apps/web/src"),
|
|
"framer-motion": path.join(landingNodeModules, "framer-motion"),
|
|
"@snapotter/image-engine": path.resolve(__dirname, "packages/image-engine/src/index.ts"),
|
|
"@snapotter/shared/i18n": path.resolve(__dirname, "packages/shared/src/i18n"),
|
|
"@snapotter/shared": path.resolve(__dirname, "packages/shared/src/index.ts"),
|
|
fastify: path.join(apiNodeModules, "fastify"),
|
|
"@fastify/cookie": path.join(apiNodeModules, "@fastify/cookie"),
|
|
"@fastify/cors": path.join(apiNodeModules, "@fastify/cors"),
|
|
"@fastify/multipart": path.join(apiNodeModules, "@fastify/multipart"),
|
|
"@fastify/rate-limit": path.join(apiNodeModules, "@fastify/rate-limit"),
|
|
"@fastify/static": path.join(apiNodeModules, "@fastify/static"),
|
|
"@fastify/swagger": path.join(apiNodeModules, "@fastify/swagger"),
|
|
"@fastify/swagger-ui": path.join(apiNodeModules, "@fastify/swagger-ui"),
|
|
"better-sqlite3": path.join(apiNodeModules, "better-sqlite3"),
|
|
"drizzle-orm": path.join(apiNodeModules, "drizzle-orm"),
|
|
archiver: path.join(apiNodeModules, "archiver"),
|
|
"p-queue": path.join(apiNodeModules, "p-queue"),
|
|
dotenv: path.join(apiNodeModules, "dotenv"),
|
|
potrace: path.join(apiNodeModules, "potrace"),
|
|
qrcode: path.join(apiNodeModules, "qrcode"),
|
|
jsqr: path.join(apiNodeModules, "jsqr"),
|
|
pdfkit: path.join(apiNodeModules, "pdfkit"),
|
|
sharp: path.join(apiNodeModules, "sharp"),
|
|
"openid-client": path.join(apiNodeModules, "openid-client"),
|
|
"opentype.js": path.join(apiNodeModules, "opentype.js"),
|
|
"posthog-node": path.join(apiNodeModules, "posthog-node"),
|
|
"@sentry/node": path.join(apiNodeModules, "@sentry/node"),
|
|
react: path.join(webNodeModules, "react"),
|
|
"react-dom": path.join(webNodeModules, "react-dom"),
|
|
"react-router-dom": path.join(webNodeModules, "react-router-dom"),
|
|
zustand: path.join(webNodeModules, "zustand"),
|
|
"posthog-js": path.join(webNodeModules, "posthog-js"),
|
|
"@sentry/react": path.join(webNodeModules, "@sentry/react"),
|
|
},
|
|
},
|
|
});
|