diff --git a/frontend/apps/client/package.json b/frontend/apps/client/package.json index b2617c96..a84713f0 100644 --- a/frontend/apps/client/package.json +++ b/frontend/apps/client/package.json @@ -28,5 +28,8 @@ "react": "^19.0.0", "react-dom": "^19.0.0", "zod": "^3.24.1" + }, + "devDependencies": { + "@endolphin/vitest-config": "workspace:*" } } diff --git a/frontend/apps/client/vite.config.ts b/frontend/apps/client/vite.config.ts index a2c8ecdf..574b75c4 100644 --- a/frontend/apps/client/vite.config.ts +++ b/frontend/apps/client/vite.config.ts @@ -39,11 +39,6 @@ export default defineConfig({ '@components': path.resolve(dirname, 'src/components'), }, }, - test: { - globals: true, - include: ['src/**/*.test.ts', 'src/**/*.test.tsx'], - environment: 'jsdom', - }, ssr: { noExternal: ['@endolphin/theme', '@endolphin/ui'], }, diff --git a/frontend/apps/client/vitest.config.ts b/frontend/apps/client/vitest.config.ts new file mode 100644 index 00000000..faae7211 --- /dev/null +++ b/frontend/apps/client/vitest.config.ts @@ -0,0 +1,17 @@ +import { createAlias, reactConfig } from '@endolphin/vitest-config'; +import path from 'path'; +import { fileURLToPath } from 'url'; +import { defineProject, mergeConfig } from 'vitest/config'; + +const filename = fileURLToPath(import.meta.url); +const dirname = path.dirname(filename); + +export default mergeConfig( + reactConfig, + defineProject({ + root: dirname, + resolve: { + alias: createAlias(dirname), + }, + }), +); \ No newline at end of file diff --git a/frontend/apps/server/package.json b/frontend/apps/server/package.json index 5bbbb1ea..3245848b 100644 --- a/frontend/apps/server/package.json +++ b/frontend/apps/server/package.json @@ -13,6 +13,8 @@ }, "devDependencies": { "@types/express": "^5.0.2", - "typescript": "^5.6.2" + "typescript": "^5.6.2", + "@endolphin/tsup-config": "workspace:^", + "@endolphin/vitest-config": "workspace:^" } } diff --git a/frontend/apps/server/tsup.config.ts b/frontend/apps/server/tsup.config.ts index d91257a2..15f490e0 100644 --- a/frontend/apps/server/tsup.config.ts +++ b/frontend/apps/server/tsup.config.ts @@ -1,11 +1,8 @@ +import { nodeConfig } from '@endolphin/tsup-config'; import { defineConfig } from 'tsup'; export default defineConfig({ - entry: ['src/index.ts'], - platform: 'node', - format: ['esm'], - tsconfig: './tsconfig.json', - clean: true, + ...nodeConfig, + dts: false, bundle: false, - target: 'esnext', }); diff --git a/frontend/apps/server/vitest.config.ts b/frontend/apps/server/vitest.config.ts new file mode 100644 index 00000000..4cdc3198 --- /dev/null +++ b/frontend/apps/server/vitest.config.ts @@ -0,0 +1,14 @@ +import { nodeConfig } from '@endolphin/vitest-config'; +import path from 'path'; +import { fileURLToPath } from 'url'; +import { defineProject, mergeConfig } from 'vitest/config'; + +const filename = fileURLToPath(import.meta.url); +const dirname = path.dirname(filename); + +export default mergeConfig( + nodeConfig, + defineProject({ + root: dirname, + }), +); \ No newline at end of file diff --git a/frontend/configs/tsup-config/package.json b/frontend/configs/tsup-config/package.json new file mode 100644 index 00000000..30a8b942 --- /dev/null +++ b/frontend/configs/tsup-config/package.json @@ -0,0 +1,17 @@ +{ + "name": "@endolphin/tsup-config", + "version": "1.0.0", + "type": "module", + "main": "./dist/index.js", + "types": "./dist/types/index.d.ts", + "files": ["dist"], + "exports": { + ".": { + "import": "./dist/index.js", + "types": "./dist/types/index.d.ts" + } + }, + "scripts": { + "build": "tsc" + } +} \ No newline at end of file diff --git a/frontend/configs/tsup-config/src/index.ts b/frontend/configs/tsup-config/src/index.ts new file mode 100644 index 00000000..37c4742c --- /dev/null +++ b/frontend/configs/tsup-config/src/index.ts @@ -0,0 +1,2 @@ +export * from './node.js'; +export * from './react.js'; \ No newline at end of file diff --git a/frontend/configs/tsup-config/src/node.ts b/frontend/configs/tsup-config/src/node.ts new file mode 100644 index 00000000..e8143680 --- /dev/null +++ b/frontend/configs/tsup-config/src/node.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'tsup'; + +export const nodeConfig = defineConfig({ + format: ['esm'], + entry: ['src/index.ts'], + outDir: 'dist', + dts: true, + clean: true, + tsconfig: './tsconfig.json', +}); diff --git a/frontend/configs/tsup-config/src/react.ts b/frontend/configs/tsup-config/src/react.ts new file mode 100644 index 00000000..a9bb2e9e --- /dev/null +++ b/frontend/configs/tsup-config/src/react.ts @@ -0,0 +1,13 @@ +import { vanillaExtractPlugin } from '@vanilla-extract/esbuild-plugin'; +import { defineConfig } from 'tsup'; + +export const reactConfig = defineConfig({ + format: ['esm'], + entry: ['src/index.ts'], + outDir: 'dist', + esbuildPlugins: [vanillaExtractPlugin()], + dts: true, + clean: true, + tsconfig: './tsconfig.json', + external: ['react', 'react-dom'], +}); diff --git a/frontend/configs/tsup-config/tsconfig.json b/frontend/configs/tsup-config/tsconfig.json new file mode 100644 index 00000000..eb7c9c96 --- /dev/null +++ b/frontend/configs/tsup-config/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "dist", + "declaration": true, + "declarationDir": "dist/types", + }, + "include": ["src"], +} \ No newline at end of file diff --git a/frontend/configs/vitest-config/package.json b/frontend/configs/vitest-config/package.json new file mode 100644 index 00000000..de8d2f10 --- /dev/null +++ b/frontend/configs/vitest-config/package.json @@ -0,0 +1,17 @@ +{ + "name": "@endolphin/vitest-config", + "version": "1.0.0", + "type": "module", + "main": "./dist/index.js", + "types": "./dist/types/index.d.ts", + "files": ["dist"], + "exports": { + ".": { + "import": "./dist/index.js", + "types": "./dist/types/index.d.ts" + } + }, + "scripts": { + "build": "tsc" + } +} diff --git a/frontend/configs/vitest-config/src/createAlias.ts b/frontend/configs/vitest-config/src/createAlias.ts new file mode 100644 index 00000000..121faaee --- /dev/null +++ b/frontend/configs/vitest-config/src/createAlias.ts @@ -0,0 +1,14 @@ +import path from 'path'; + +/** + * + * @param {string} dirname - 현재 패키지의 루트 디렉토리. + * @returns + */ +export const createAlias = (dirname: string) => ({ + '@': path.resolve(dirname, 'src'), + '@hooks': path.resolve(dirname, 'src/hooks'), + '@utils': path.resolve(dirname, 'src/utils'), + '@constants': path.resolve(dirname, 'src/constants'), + '@components': path.resolve(dirname, 'src/components'), +}); \ No newline at end of file diff --git a/frontend/configs/vitest-config/src/index.ts b/frontend/configs/vitest-config/src/index.ts new file mode 100644 index 00000000..1799305d --- /dev/null +++ b/frontend/configs/vitest-config/src/index.ts @@ -0,0 +1,3 @@ +export * from './createAlias.js'; +export * from './node.js'; +export * from './react.js'; \ No newline at end of file diff --git a/frontend/configs/vitest-config/src/node.ts b/frontend/configs/vitest-config/src/node.ts new file mode 100644 index 00000000..a8593bbd --- /dev/null +++ b/frontend/configs/vitest-config/src/node.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'vitest/config'; + +export const nodeConfig = defineConfig({ + test: { + globals: true, + include: ['src/**/*.test.ts', 'src/**/*.test.tsx'], + environment: 'node', + passWithNoTests: true, + }, +}); \ No newline at end of file diff --git a/frontend/configs/vitest-config/src/react.ts b/frontend/configs/vitest-config/src/react.ts new file mode 100644 index 00000000..19815db6 --- /dev/null +++ b/frontend/configs/vitest-config/src/react.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'vitest/config'; + +export const reactConfig = defineConfig({ + test: { + globals: true, + include: ['src/**/*.test.ts', 'src/**/*.test.tsx'], + environment: 'jsdom', + passWithNoTests: true, + }, +}); \ No newline at end of file diff --git a/frontend/configs/vitest-config/tsconfig.json b/frontend/configs/vitest-config/tsconfig.json new file mode 100644 index 00000000..eb7c9c96 --- /dev/null +++ b/frontend/configs/vitest-config/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "dist", + "declaration": true, + "declarationDir": "dist/types", + }, + "include": ["src"], +} \ No newline at end of file diff --git a/frontend/endolphin.code-workspace b/frontend/endolphin.code-workspace index 288adba8..2673c638 100644 --- a/frontend/endolphin.code-workspace +++ b/frontend/endolphin.code-workspace @@ -31,6 +31,14 @@ { "name": "date-time", "path": "packages/date-time" + }, + { + "name": "tsup-config", + "path": "configs/tsup-config" + }, + { + "name": "vitest-config", + "path": "configs/vitest-config" } ], "settings": { diff --git a/frontend/package.json b/frontend/package.json index 461a2a10..19efff95 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -6,6 +6,7 @@ "scripts": { "build": "pnpm -r build", "dev": "pnpm -r dev", + "test": "pnpm -r test", "lint": "eslint .", "setup-git-hook": "bash src/scripts/git-hook-init-command.sh" }, @@ -54,7 +55,7 @@ "typescript": "~5.6.2", "typescript-eslint": "^8.18.2", "vite": "^6.0.5", - "vitest": "^3.0.4" + "vitest": "^3.2.2" }, "eslintConfig": { "extends": [ diff --git a/frontend/packages/calendar/package.json b/frontend/packages/calendar/package.json index cd6afcea..bbabf62a 100644 --- a/frontend/packages/calendar/package.json +++ b/frontend/packages/calendar/package.json @@ -10,7 +10,8 @@ ], "scripts": { "build": "tsup --clean", - "start": "tsup --watch" + "start": "tsup --watch", + "test": "vitest" }, "publishConfig": { "access": "public" @@ -20,6 +21,10 @@ "@endolphin/ui": "workspace:^", "@endolphin/theme": "workspace:^" }, + "devDependencies": { + "@endolphin/tsup-config": "workspace:^", + "@endolphin/vitest-config": "workspace:^" + }, "peerDependencies": { "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/frontend/packages/calendar/tsup.config.ts b/frontend/packages/calendar/tsup.config.ts index 86010e30..e700a7df 100644 --- a/frontend/packages/calendar/tsup.config.ts +++ b/frontend/packages/calendar/tsup.config.ts @@ -1,12 +1,8 @@ -import { vanillaExtractPlugin } from '@vanilla-extract/esbuild-plugin'; +import { reactConfig } from '@endolphin/tsup-config'; import { defineConfig } from 'tsup'; export default defineConfig({ - format: ['esm'], - entry: ['src/index.ts'], - outDir: 'dist', - esbuildPlugins: [vanillaExtractPlugin()], - dts: true, + ...reactConfig, external: ['@endolphin/theme'], banner: { js: 'import \'./index.css\';', diff --git a/frontend/packages/calendar/vitest.config.ts b/frontend/packages/calendar/vitest.config.ts new file mode 100644 index 00000000..faae7211 --- /dev/null +++ b/frontend/packages/calendar/vitest.config.ts @@ -0,0 +1,17 @@ +import { createAlias, reactConfig } from '@endolphin/vitest-config'; +import path from 'path'; +import { fileURLToPath } from 'url'; +import { defineProject, mergeConfig } from 'vitest/config'; + +const filename = fileURLToPath(import.meta.url); +const dirname = path.dirname(filename); + +export default mergeConfig( + reactConfig, + defineProject({ + root: dirname, + resolve: { + alias: createAlias(dirname), + }, + }), +); \ No newline at end of file diff --git a/frontend/packages/core/package.json b/frontend/packages/core/package.json index d5e99e77..ce8cb86c 100644 --- a/frontend/packages/core/package.json +++ b/frontend/packages/core/package.json @@ -15,6 +15,10 @@ "./types": "./dist/src/types/index.js" }, "scripts": { - "build": "tsc -b && tsc-alias" + "build": "tsc -b && tsc-alias", + "test": "vitest" + }, + "devDependencies": { + "@endolphin/vitest-config": "workspace:^" } } diff --git a/frontend/packages/core/src/utils/date/date.test.ts b/frontend/packages/core/src/utils/date/date.test.ts index 50864517..a30ab7ff 100644 --- a/frontend/packages/core/src/utils/date/date.test.ts +++ b/frontend/packages/core/src/utils/date/date.test.ts @@ -1,4 +1,4 @@ -import { WEEK_MAP } from 'src/constants/date'; +import { WEEK_MAP } from '@constants/date'; import { formatDateToWeek } from '.'; diff --git a/frontend/packages/core/src/utils/date/position.ts b/frontend/packages/core/src/utils/date/position.ts index 79863f65..02cbe90f 100644 --- a/frontend/packages/core/src/utils/date/position.ts +++ b/frontend/packages/core/src/utils/date/position.ts @@ -1,4 +1,4 @@ -import { TIME_HEIGHT } from 'src/constants/date'; +import { TIME_HEIGHT } from '@constants/date'; import { getDateParts, setDateOnly } from './date'; diff --git a/frontend/packages/core/vitest.config.ts b/frontend/packages/core/vitest.config.ts new file mode 100644 index 00000000..faae7211 --- /dev/null +++ b/frontend/packages/core/vitest.config.ts @@ -0,0 +1,17 @@ +import { createAlias, reactConfig } from '@endolphin/vitest-config'; +import path from 'path'; +import { fileURLToPath } from 'url'; +import { defineProject, mergeConfig } from 'vitest/config'; + +const filename = fileURLToPath(import.meta.url); +const dirname = path.dirname(filename); + +export default mergeConfig( + reactConfig, + defineProject({ + root: dirname, + resolve: { + alias: createAlias(dirname), + }, + }), +); \ No newline at end of file diff --git a/frontend/packages/date-time/package.json b/frontend/packages/date-time/package.json index 34a45643..e51e8913 100644 --- a/frontend/packages/date-time/package.json +++ b/frontend/packages/date-time/package.json @@ -9,9 +9,14 @@ "dist" ], "scripts": { - "build": "tsup --clean" + "build": "tsup --clean", + "test": "vitest" }, "publishConfig": { "access": "public" + }, + "devDependencies": { + "@endolphin/tsup-config": "workspace:^", + "@endolphin/vitest-config": "workspace:^" } } diff --git a/frontend/packages/date-time/tsup.config.ts b/frontend/packages/date-time/tsup.config.ts index 15af2211..bd6b799e 100644 --- a/frontend/packages/date-time/tsup.config.ts +++ b/frontend/packages/date-time/tsup.config.ts @@ -1,8 +1,6 @@ +import { nodeConfig } from '@endolphin/tsup-config'; import { defineConfig } from 'tsup'; export default defineConfig({ - format: ['esm'], - entry: ['src/index.ts'], - outDir: 'dist', - dts: true, + ...nodeConfig, }); diff --git a/frontend/packages/date-time/vitest.config.ts b/frontend/packages/date-time/vitest.config.ts new file mode 100644 index 00000000..89316651 --- /dev/null +++ b/frontend/packages/date-time/vitest.config.ts @@ -0,0 +1,17 @@ +import { createAlias, nodeConfig } from '@endolphin/vitest-config'; +import path from 'path'; +import { fileURLToPath } from 'url'; +import { defineProject, mergeConfig } from 'vitest/config'; + +const filename = fileURLToPath(import.meta.url); +const dirname = path.dirname(filename); + +export default mergeConfig( + nodeConfig, + defineProject({ + root: dirname, + resolve: { + alias: createAlias(dirname), + }, + }), +); \ No newline at end of file diff --git a/frontend/packages/theme/package.json b/frontend/packages/theme/package.json index 88ddf881..b78a3170 100644 --- a/frontend/packages/theme/package.json +++ b/frontend/packages/theme/package.json @@ -18,6 +18,9 @@ "types": "./dist/src/setup.d.ts" } }, + "devDependencies": { + "@endolphin/tsup-config": "workspace:^" + }, "peerDependencies": { "@endolphin/core": "workspace:^", "@vanilla-extract/css": "^1.17.0", diff --git a/frontend/packages/theme/tsup.config.ts b/frontend/packages/theme/tsup.config.ts index dcc6d54f..de8ea3f4 100644 --- a/frontend/packages/theme/tsup.config.ts +++ b/frontend/packages/theme/tsup.config.ts @@ -1,10 +1,6 @@ -import { vanillaExtractPlugin } from '@vanilla-extract/esbuild-plugin'; +import { reactConfig } from '@endolphin/tsup-config'; import { defineConfig } from 'tsup'; -export default defineConfig({ - format: ['esm'], - entry: ['src/index.ts'], - outDir: 'dist', - esbuildPlugins: [vanillaExtractPlugin()], - dts: true, +export default defineConfig({ + ...reactConfig, }); diff --git a/frontend/packages/ui/package.json b/frontend/packages/ui/package.json index 6ddf0a06..dee142cf 100644 --- a/frontend/packages/ui/package.json +++ b/frontend/packages/ui/package.json @@ -10,7 +10,8 @@ ], "scripts": { "build": "tsup --clean", - "start": "tsup --watch" + "start": "tsup --watch", + "test": "vitest" }, "publishConfig": { "access": "public" @@ -19,6 +20,10 @@ "@endolphin/core": "workspace:^", "@endolphin/theme": "workspace:^" }, + "devDependencies": { + "@endolphin/tsup-config": "workspace:^", + "@endolphin/vitest-config": "workspace:^" + }, "peerDependencies": { "react": ">=19.0.0", "react-dom": ">=19.0.0", diff --git a/frontend/packages/ui/tsup.config.ts b/frontend/packages/ui/tsup.config.ts index 86010e30..e700a7df 100644 --- a/frontend/packages/ui/tsup.config.ts +++ b/frontend/packages/ui/tsup.config.ts @@ -1,12 +1,8 @@ -import { vanillaExtractPlugin } from '@vanilla-extract/esbuild-plugin'; +import { reactConfig } from '@endolphin/tsup-config'; import { defineConfig } from 'tsup'; export default defineConfig({ - format: ['esm'], - entry: ['src/index.ts'], - outDir: 'dist', - esbuildPlugins: [vanillaExtractPlugin()], - dts: true, + ...reactConfig, external: ['@endolphin/theme'], banner: { js: 'import \'./index.css\';', diff --git a/frontend/packages/ui/vitest.config.ts b/frontend/packages/ui/vitest.config.ts new file mode 100644 index 00000000..faae7211 --- /dev/null +++ b/frontend/packages/ui/vitest.config.ts @@ -0,0 +1,17 @@ +import { createAlias, reactConfig } from '@endolphin/vitest-config'; +import path from 'path'; +import { fileURLToPath } from 'url'; +import { defineProject, mergeConfig } from 'vitest/config'; + +const filename = fileURLToPath(import.meta.url); +const dirname = path.dirname(filename); + +export default mergeConfig( + reactConfig, + defineProject({ + root: dirname, + resolve: { + alias: createAlias(dirname), + }, + }), +); \ No newline at end of file diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index fdbd66fc..f2b8a0dd 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -135,8 +135,8 @@ importers: specifier: ^6.0.5 version: 6.0.11(@types/node@22.15.21)(tsx@4.19.2) vitest: - specifier: ^3.0.4 - version: 3.0.4(@types/node@22.15.21)(jsdom@26.0.0)(tsx@4.19.2) + specifier: ^3.2.2 + version: 3.2.2(@types/node@22.15.21)(jsdom@26.0.0)(tsx@4.19.2) apps/client: dependencies: @@ -173,6 +173,10 @@ importers: zod: specifier: ^3.24.1 version: 3.24.1 + devDependencies: + '@endolphin/vitest-config': + specifier: workspace:* + version: link:../../configs/vitest-config apps/server: dependencies: @@ -180,6 +184,12 @@ importers: specifier: ^5.1.0 version: 5.1.0 devDependencies: + '@endolphin/tsup-config': + specifier: workspace:^ + version: link:../../configs/tsup-config + '@endolphin/vitest-config': + specifier: workspace:^ + version: link:../../configs/vitest-config '@types/express': specifier: ^5.0.2 version: 5.0.2 @@ -187,6 +197,10 @@ importers: specifier: ^5.6.2 version: 5.6.3 + configs/tsup-config: {} + + configs/vitest-config: {} + packages/calendar: dependencies: '@endolphin/core': @@ -213,10 +227,28 @@ importers: react-dom: specifier: ^19.0.0 version: 19.0.0(react@19.0.0) + devDependencies: + '@endolphin/tsup-config': + specifier: workspace:^ + version: link:../../configs/tsup-config + '@endolphin/vitest-config': + specifier: workspace:^ + version: link:../../configs/vitest-config - packages/core: {} + packages/core: + devDependencies: + '@endolphin/vitest-config': + specifier: workspace:^ + version: link:../../configs/vitest-config - packages/date-time: {} + packages/date-time: + devDependencies: + '@endolphin/tsup-config': + specifier: workspace:^ + version: link:../../configs/tsup-config + '@endolphin/vitest-config': + specifier: workspace:^ + version: link:../../configs/vitest-config packages/theme: dependencies: @@ -229,6 +261,10 @@ importers: '@vanilla-extract/recipes': specifier: ^0.5.5 version: 0.5.5(@vanilla-extract/css@1.17.1) + devDependencies: + '@endolphin/tsup-config': + specifier: workspace:^ + version: link:../../configs/tsup-config packages/ui: dependencies: @@ -253,6 +289,13 @@ importers: react-dom: specifier: '>=19.0.0' version: 19.0.0(react@19.0.0) + devDependencies: + '@endolphin/tsup-config': + specifier: workspace:^ + version: link:../../configs/tsup-config + '@endolphin/vitest-config': + specifier: workspace:^ + version: link:../../configs/vitest-config packages: @@ -1328,9 +1371,15 @@ packages: '@types/body-parser@1.19.5': resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} + '@types/chai@5.2.2': + resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} + '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/doctrine@0.0.9': resolution: {integrity: sha512-eOIHzCUSH7SMfonMG1LsC2f8vxBFtho6NGBznK41R84YzPuvSBzrhEps33IsQiOW9+VL6NQ9DbjQJznk/S4uRA==} @@ -1497,14 +1546,14 @@ packages: '@vitest/expect@2.0.5': resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==} - '@vitest/expect@3.0.4': - resolution: {integrity: sha512-Nm5kJmYw6P2BxhJPkO3eKKhGYKRsnqJqf+r0yOGRKpEP+bSCBDsjXgiu1/5QFrnPMEgzfC38ZEjvCFgaNBC0Eg==} + '@vitest/expect@3.2.2': + resolution: {integrity: sha512-ipHw0z669vEMjzz3xQE8nJX1s0rQIb7oEl4jjl35qWTwm/KIHERIg/p/zORrjAaZKXfsv7IybcNGHwhOOAPMwQ==} - '@vitest/mocker@3.0.4': - resolution: {integrity: sha512-gEef35vKafJlfQbnyOXZ0Gcr9IBUsMTyTLXsEQwuyYAerpHqvXhzdBnDFuHLpFqth3F7b6BaFr4qV/Cs1ULx5A==} + '@vitest/mocker@3.2.2': + resolution: {integrity: sha512-jKojcaRyIYpDEf+s7/dD3LJt53c0dPfp5zCPXz9H/kcGrSlovU/t1yEaNzM9oFME3dcd4ULwRI/x0Po1Zf+LTw==} peerDependencies: msw: ^2.4.9 - vite: ^5.0.0 || ^6.0.0 + vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 peerDependenciesMeta: msw: optional: true @@ -1517,20 +1566,20 @@ packages: '@vitest/pretty-format@2.1.8': resolution: {integrity: sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ==} - '@vitest/pretty-format@3.0.4': - resolution: {integrity: sha512-ts0fba+dEhK2aC9PFuZ9LTpULHpY/nd6jhAQ5IMU7Gaj7crPCTdCFfgvXxruRBLFS+MLraicCuFXxISEq8C93g==} + '@vitest/pretty-format@3.2.2': + resolution: {integrity: sha512-FY4o4U1UDhO9KMd2Wee5vumwcaHw7Vg4V7yR4Oq6uK34nhEJOmdRYrk3ClburPRUA09lXD/oXWZ8y/Sdma0aUQ==} - '@vitest/runner@3.0.4': - resolution: {integrity: sha512-dKHzTQ7n9sExAcWH/0sh1elVgwc7OJ2lMOBrAm73J7AH6Pf9T12Zh3lNE1TETZaqrWFXtLlx3NVrLRb5hCK+iw==} + '@vitest/runner@3.2.2': + resolution: {integrity: sha512-GYcHcaS3ejGRZYed2GAkvsjBeXIEerDKdX3orQrBJqLRiea4NSS9qvn9Nxmuy1IwIB+EjFOaxXnX79l8HFaBwg==} - '@vitest/snapshot@3.0.4': - resolution: {integrity: sha512-+p5knMLwIk7lTQkM3NonZ9zBewzVp9EVkVpvNta0/PlFWpiqLaRcF4+33L1it3uRUCh0BGLOaXPPGEjNKfWb4w==} + '@vitest/snapshot@3.2.2': + resolution: {integrity: sha512-aMEI2XFlR1aNECbBs5C5IZopfi5Lb8QJZGGpzS8ZUHML5La5wCbrbhLOVSME68qwpT05ROEEOAZPRXFpxZV2wA==} '@vitest/spy@2.0.5': resolution: {integrity: sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==} - '@vitest/spy@3.0.4': - resolution: {integrity: sha512-sXIMF0oauYyUy2hN49VFTYodzEAu744MmGcPR3ZBsPM20G+1/cSW/n1U+3Yu/zHxX2bIDe1oJASOkml+osTU6Q==} + '@vitest/spy@3.2.2': + resolution: {integrity: sha512-6Utxlx3o7pcTxvp0u8kUiXtRFScMrUg28KjB3R2hon7w4YqOFAEA9QwzPVVS1QNL3smo4xRNOpNZClRVfpMcYg==} '@vitest/utils@2.0.5': resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==} @@ -1538,8 +1587,8 @@ packages: '@vitest/utils@2.1.8': resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==} - '@vitest/utils@3.0.4': - resolution: {integrity: sha512-8BqC1ksYsHtbWH+DfpOAKrFw3jl3Uf9J7yeFh85Pz52IWuh1hBBtyfEbRNNZNjl8H8A5yMLH9/t+k7HIKzQcZQ==} + '@vitest/utils@3.2.2': + resolution: {integrity: sha512-qJYMllrWpF/OYfWHP32T31QCaLa3BAzT/n/8mNGhPdVcjY+JYazQFO1nsJvXU12Kp1xMpNY4AGuljPTNjQve6A==} accepts@2.0.0: resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} @@ -1742,6 +1791,10 @@ packages: resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} engines: {node: '>=12'} + chai@5.2.0: + resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==} + engines: {node: '>=12'} + chalk@3.0.0: resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} engines: {node: '>=8'} @@ -1901,6 +1954,15 @@ packages: supports-color: optional: true + debug@4.4.1: + resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decimal.js@10.5.0: resolution: {integrity: sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==} @@ -2030,6 +2092,9 @@ packages: es-module-lexer@1.6.0: resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==} + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + es-object-atoms@1.1.1: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} @@ -2189,8 +2254,8 @@ packages: resolution: {integrity: sha512-EzV94NYKoO09GLXGjXj9JIlXijVck4ONSr5wiCWDvhsvj5jxSrzTmRU/9C1DyB6uToszLs8aifA6NQ7lEQdvFw==} engines: {node: '>= 0.8'} - expect-type@1.1.0: - resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} + expect-type@1.2.1: + resolution: {integrity: sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==} engines: {node: '>=12.0.0'} express@5.1.0: @@ -2969,6 +3034,9 @@ packages: pathe@2.0.2: resolution: {integrity: sha512-15Ztpk+nov8DR524R4BF7uEuzESgzUEAV4Ah7CUMNGXdE5ELuvxElxGXndBl32vMSsWa1jpNf22Z+Er3sKwq+w==} + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + pathval@2.0.0: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} @@ -3332,8 +3400,8 @@ packages: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} - std-env@3.8.0: - resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} + std-env@3.9.0: + resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} storybook@8.5.2: resolution: {integrity: sha512-pf84emQ7Pd5jBdT2gzlNs4kRaSI3pq0Lh8lSfV+YqIVXztXIHU+Lqyhek2Lhjb7btzA1tExrhJrgQUsIji7i7A==} @@ -3438,8 +3506,12 @@ packages: resolution: {integrity: sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==} engines: {node: '>=12.0.0'} - tinypool@1.0.2: - resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} + tinyglobby@0.2.14: + resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} + engines: {node: '>=12.0.0'} + + tinypool@1.1.0: + resolution: {integrity: sha512-7CotroY9a8DKsKprEy/a14aCCm8jYVmR7aFy4fpkZM8sdpNJbKkixuNjgM50yCmip2ezc8z4N7k3oe2+rfRJCQ==} engines: {node: ^18.0.0 || >=20.0.0} tinyrainbow@1.2.0: @@ -3454,6 +3526,10 @@ packages: resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} engines: {node: '>=14.0.0'} + tinyspy@4.0.3: + resolution: {integrity: sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==} + engines: {node: '>=14.0.0'} + tldts-core@6.1.76: resolution: {integrity: sha512-uzhJ02RaMzgQR3yPoeE65DrcHI6LoM4saUqXOt/b5hmb3+mc4YWpdSeAQqVqRUlQ14q8ZuLRWyBR1ictK1dzzg==} @@ -3646,6 +3722,11 @@ packages: engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true + vite-node@3.2.2: + resolution: {integrity: sha512-Xj/jovjZvDXOq2FgLXu8NsY4uHUMWtzVmMC2LkCu9HWdr9Qu1Is5sanX3Z4jOFKdohfaWDnEJWp9pRP0vVpAcA==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + vite@6.0.11: resolution: {integrity: sha512-4VL9mQPKoHy4+FE0NnRE/kbY51TOfaknxAjt3fJbGJxhIpBZiqVzlZDEesWWsuREXHwNdAoOFZ9MkPEVXczHwg==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -3686,16 +3767,16 @@ packages: yaml: optional: true - vitest@3.0.4: - resolution: {integrity: sha512-6XG8oTKy2gnJIFTHP6LD7ExFeNLxiTkK3CfMvT7IfR8IN+BYICCf0lXUQmX7i7JoxUP8QmeP4mTnWXgflu4yjw==} + vitest@3.2.2: + resolution: {integrity: sha512-fyNn/Rp016Bt5qvY0OQvIUCwW2vnaEBLxP42PmKbNIoasSYjML+8xyeADOPvBe+Xfl/ubIw4og7Lt9jflRsCNw==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/debug': ^4.1.12 '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - '@vitest/browser': 3.0.4 - '@vitest/ui': 3.0.4 + '@vitest/browser': 3.2.2 + '@vitest/ui': 3.2.2 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -4948,10 +5029,16 @@ snapshots: '@types/connect': 3.4.38 '@types/node': 22.15.21 + '@types/chai@5.2.2': + dependencies: + '@types/deep-eql': 4.0.2 + '@types/connect@3.4.38': dependencies: '@types/node': 22.15.21 + '@types/deep-eql@4.0.2': {} + '@types/doctrine@0.0.9': {} '@types/estree@1.0.6': {} @@ -5251,16 +5338,17 @@ snapshots: chai: 5.1.2 tinyrainbow: 1.2.0 - '@vitest/expect@3.0.4': + '@vitest/expect@3.2.2': dependencies: - '@vitest/spy': 3.0.4 - '@vitest/utils': 3.0.4 - chai: 5.1.2 + '@types/chai': 5.2.2 + '@vitest/spy': 3.2.2 + '@vitest/utils': 3.2.2 + chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.0.4(vite@6.0.11(@types/node@22.15.21)(tsx@4.19.2))': + '@vitest/mocker@3.2.2(vite@6.0.11(@types/node@22.15.21)(tsx@4.19.2))': dependencies: - '@vitest/spy': 3.0.4 + '@vitest/spy': 3.2.2 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: @@ -5274,28 +5362,28 @@ snapshots: dependencies: tinyrainbow: 1.2.0 - '@vitest/pretty-format@3.0.4': + '@vitest/pretty-format@3.2.2': dependencies: tinyrainbow: 2.0.0 - '@vitest/runner@3.0.4': + '@vitest/runner@3.2.2': dependencies: - '@vitest/utils': 3.0.4 - pathe: 2.0.2 + '@vitest/utils': 3.2.2 + pathe: 2.0.3 - '@vitest/snapshot@3.0.4': + '@vitest/snapshot@3.2.2': dependencies: - '@vitest/pretty-format': 3.0.4 + '@vitest/pretty-format': 3.2.2 magic-string: 0.30.17 - pathe: 2.0.2 + pathe: 2.0.3 '@vitest/spy@2.0.5': dependencies: tinyspy: 3.0.2 - '@vitest/spy@3.0.4': + '@vitest/spy@3.2.2': dependencies: - tinyspy: 3.0.2 + tinyspy: 4.0.3 '@vitest/utils@2.0.5': dependencies: @@ -5310,9 +5398,9 @@ snapshots: loupe: 3.1.3 tinyrainbow: 1.2.0 - '@vitest/utils@3.0.4': + '@vitest/utils@3.2.2': dependencies: - '@vitest/pretty-format': 3.0.4 + '@vitest/pretty-format': 3.2.2 loupe: 3.1.3 tinyrainbow: 2.0.0 @@ -5546,6 +5634,14 @@ snapshots: loupe: 3.1.3 pathval: 2.0.0 + chai@5.2.0: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.3 + pathval: 2.0.0 + chalk@3.0.0: dependencies: ansi-styles: 4.3.0 @@ -5678,6 +5774,10 @@ snapshots: dependencies: ms: 2.1.3 + debug@4.4.1: + dependencies: + ms: 2.1.3 + decimal.js@10.5.0: {} dedent@1.5.3: {} @@ -5836,6 +5936,8 @@ snapshots: es-module-lexer@1.6.0: {} + es-module-lexer@1.7.0: {} + es-object-atoms@1.1.1: dependencies: es-errors: 1.3.0 @@ -6059,7 +6161,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.6 + '@types/estree': 1.0.7 esutils@2.0.3: {} @@ -6070,7 +6172,7 @@ snapshots: '@types/node': 22.12.0 require-like: 0.1.2 - expect-type@1.1.0: {} + expect-type@1.2.1: {} express@5.1.0: dependencies: @@ -6875,6 +6977,8 @@ snapshots: pathe@2.0.2: {} + pathe@2.0.3: {} + pathval@2.0.0: {} picocolors@1.1.1: {} @@ -7321,7 +7425,7 @@ snapshots: statuses@2.0.1: {} - std-env@3.8.0: {} + std-env@3.9.0: {} storybook@8.5.2(prettier@3.4.2): dependencies: @@ -7450,7 +7554,12 @@ snapshots: fdir: 6.4.4(picomatch@4.0.2) picomatch: 4.0.2 - tinypool@1.0.2: {} + tinyglobby@0.2.14: + dependencies: + fdir: 6.4.4(picomatch@4.0.2) + picomatch: 4.0.2 + + tinypool@1.1.0: {} tinyrainbow@1.2.0: {} @@ -7458,6 +7567,8 @@ snapshots: tinyspy@3.0.2: {} + tinyspy@4.0.3: {} + tldts-core@6.1.76: {} tldts@6.1.76: @@ -7694,6 +7805,27 @@ snapshots: - tsx - yaml + vite-node@3.2.2(@types/node@22.15.21)(tsx@4.19.2): + dependencies: + cac: 6.7.14 + debug: 4.4.1 + es-module-lexer: 1.7.0 + pathe: 2.0.3 + vite: 6.0.11(@types/node@22.15.21)(tsx@4.19.2) + transitivePeerDependencies: + - '@types/node' + - jiti + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + vite@6.0.11(@types/node@22.15.21)(tsx@4.19.2): dependencies: esbuild: 0.24.2 @@ -7704,27 +7836,30 @@ snapshots: fsevents: 2.3.3 tsx: 4.19.2 - vitest@3.0.4(@types/node@22.15.21)(jsdom@26.0.0)(tsx@4.19.2): - dependencies: - '@vitest/expect': 3.0.4 - '@vitest/mocker': 3.0.4(vite@6.0.11(@types/node@22.15.21)(tsx@4.19.2)) - '@vitest/pretty-format': 3.0.4 - '@vitest/runner': 3.0.4 - '@vitest/snapshot': 3.0.4 - '@vitest/spy': 3.0.4 - '@vitest/utils': 3.0.4 - chai: 5.1.2 - debug: 4.4.0 - expect-type: 1.1.0 + vitest@3.2.2(@types/node@22.15.21)(jsdom@26.0.0)(tsx@4.19.2): + dependencies: + '@types/chai': 5.2.2 + '@vitest/expect': 3.2.2 + '@vitest/mocker': 3.2.2(vite@6.0.11(@types/node@22.15.21)(tsx@4.19.2)) + '@vitest/pretty-format': 3.2.2 + '@vitest/runner': 3.2.2 + '@vitest/snapshot': 3.2.2 + '@vitest/spy': 3.2.2 + '@vitest/utils': 3.2.2 + chai: 5.2.0 + debug: 4.4.1 + expect-type: 1.2.1 magic-string: 0.30.17 - pathe: 2.0.2 - std-env: 3.8.0 + pathe: 2.0.3 + picomatch: 4.0.2 + std-env: 3.9.0 tinybench: 2.9.0 tinyexec: 0.3.2 - tinypool: 1.0.2 + tinyglobby: 0.2.14 + tinypool: 1.1.0 tinyrainbow: 2.0.0 vite: 6.0.11(@types/node@22.15.21)(tsx@4.19.2) - vite-node: 3.0.4(@types/node@22.15.21)(tsx@4.19.2) + vite-node: 3.2.2(@types/node@22.15.21)(tsx@4.19.2) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.15.21 diff --git a/frontend/pnpm-workspace.yaml b/frontend/pnpm-workspace.yaml index 3e712d3c..9cd4e501 100644 --- a/frontend/pnpm-workspace.yaml +++ b/frontend/pnpm-workspace.yaml @@ -1,3 +1,4 @@ packages: - "apps/*" - - "packages/*" \ No newline at end of file + - "packages/*" + - "configs/*" \ No newline at end of file diff --git a/frontend/vitest.config.ts b/frontend/vitest.config.ts new file mode 100644 index 00000000..62194a4c --- /dev/null +++ b/frontend/vitest.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + projects: ['apps/*/vitest.config*.ts', 'packages/*/vitest.config*.ts'], + }, +}); \ No newline at end of file