diff --git a/.lintstagedrc.js b/.lintstagedrc.cjs similarity index 84% rename from .lintstagedrc.js rename to .lintstagedrc.cjs index 767359ce..5a15a4c0 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.cjs @@ -1,3 +1,5 @@ +/* eslint-disable no-undef */ +/* eslint-env node */ const path = require('path'); const buildEslintCommand = (filenames) => diff --git a/commitlint.config.js b/commitlint.config.cjs similarity index 78% rename from commitlint.config.js rename to commitlint.config.cjs index ba6cabb2..a8965baf 100644 --- a/commitlint.config.js +++ b/commitlint.config.cjs @@ -1,3 +1,5 @@ +/* eslint-disable no-undef */ +/* eslint-env node */ module.exports = { extends: ['@commitlint/config-conventional'], rules: { diff --git a/lib/env.ts b/lib/env.ts index d37d3f7d..5a65d037 100644 --- a/lib/env.ts +++ b/lib/env.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { validateMintelEnv, mintelEnvSchema } from '@mintel/next-utils'; +import { validateMintelEnv, mintelEnvSchema, withMintelRefinements } from '@mintel/next-utils'; /** * Environment variable schema. @@ -25,9 +25,9 @@ const envExtension = { }; /** - * Full schema including Mintel base + * Full schema including Mintel base and refinements */ -export const envSchema = z.object(mintelEnvSchema).extend(envExtension); +export const envSchema = withMintelRefinements(z.object(mintelEnvSchema).extend(envExtension)); /** * Validated environment object. diff --git a/package.json b/package.json index a449cc33..dd192501 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,13 @@ { + "name": "klz-cables-nextjs", + "type": "module", + "private": true, "dependencies": { "@directus/sdk": "^21.0.0", "@mintel/mail": "^1.6.0", "@mintel/next-config": "^1.6.0", "@mintel/next-feedback": "^1.6.0", - "@mintel/next-utils": "^1.7.12", + "@mintel/next-utils": "^1.7.15", "@react-email/components": "^1.0.7", "@react-pdf/renderer": "^4.3.2", "@sentry/nextjs": "^10.38.0", @@ -53,9 +56,11 @@ "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@types/sharp": "^0.31.1", + "@vitejs/plugin-react": "^5.1.4", "@vitest/ui": "^4.0.16", "autoprefixer": "^10.4.23", "eslint": "^9.18.0", + "happy-dom": "^20.6.1", "husky": "^9.1.7", "lint-staged": "^16.2.7", "postcss": "^8.5.6", @@ -66,8 +71,6 @@ "typescript": "^5.7.2", "vitest": "^4.0.16" }, - "name": "klz-cables-nextjs", - "private": true, "scripts": { "dev": "docker network create infra 2>/dev/null || true && echo '\\nšŸš€ Development Environment Starting...\\n\\nšŸ“± App: http://klz.localhost\\nšŸ—„ļø CMS: http://cms.klz.localhost/admin\\n🚦 Traefik: http://localhost:8080\\n\\n(Press Ctrl+C to stop)\\n' && docker-compose down --remove-orphans && docker-compose up klz-app directus directus-db gatekeeper", "dev:local": "next dev", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 22087fbb..39b727f7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,8 +24,8 @@ importers: specifier: ^1.6.0 version: 1.6.0(@babel/core@7.29.0)(@opentelemetry/api@1.9.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(sass@1.97.3) '@mintel/next-utils': - specifier: ^1.7.12 - version: 1.7.12(@babel/core@7.29.0)(@opentelemetry/api@1.9.0)(@swc/helpers@0.5.18)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(sass@1.97.3)(typescript@5.9.3) + specifier: ^1.7.15 + version: 1.7.15(@babel/core@7.29.0)(@opentelemetry/api@1.9.0)(@swc/helpers@0.5.18)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(sass@1.97.3)(typescript@5.9.3) '@react-email/components': specifier: ^1.0.7 version: 1.0.7(react-dom@19.2.4(react@19.2.4))(react@19.2.4) @@ -165,6 +165,9 @@ importers: '@types/sharp': specifier: ^0.31.1 version: 0.31.1 + '@vitejs/plugin-react': + specifier: ^5.1.4 + version: 5.1.4(vite@7.3.1(@types/node@22.19.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2)) '@vitest/ui': specifier: ^4.0.16 version: 4.0.18(vitest@4.0.18) @@ -174,6 +177,9 @@ importers: eslint: specifier: ^9.18.0 version: 9.39.2(jiti@2.6.1) + happy-dom: + specifier: ^20.6.1 + version: 20.6.1 husky: specifier: ^9.1.7 version: 9.1.7 @@ -200,7 +206,7 @@ importers: version: 5.9.3 vitest: specifier: ^4.0.16 - version: 4.0.18(@opentelemetry/api@1.9.0)(@types/node@22.19.10)(@vitest/ui@4.0.18)(jiti@2.6.1)(jsdom@27.4.0)(lightningcss@1.30.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2) + version: 4.0.18(@opentelemetry/api@1.9.0)(@types/node@22.19.10)(@vitest/ui@4.0.18)(happy-dom@20.6.1)(jiti@2.6.1)(jsdom@27.4.0)(lightningcss@1.30.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2) packages: @@ -260,6 +266,10 @@ packages: peerDependencies: '@babel/core': ^7.0.0 + '@babel/helper-plugin-utils@7.28.6': + resolution: {integrity: sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==} + engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.27.1': resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} @@ -281,6 +291,18 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/plugin-transform-react-jsx-self@7.27.1': + resolution: {integrity: sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.27.1': + resolution: {integrity: sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/runtime@7.28.6': resolution: {integrity: sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==} engines: {node: '>=6.9.0'} @@ -1024,8 +1046,8 @@ packages: react: ^19.0.0 react-dom: ^19.0.0 - '@mintel/next-utils@1.7.12': - resolution: {integrity: sha512-ulKNfKkS0nLxcC+mHvXXhAyUqnIb2dkTFLBVLNe2WHOAi+k5awq1LYDh+KK6flY6BHfPD2BFRZhlzbfveSut2g==} + '@mintel/next-utils@1.7.15': + resolution: {integrity: sha512-CqSe3eHamq9zLs+AJxGOPypTLchw/oZ3JcLkor007PcUDMTv/Lspfv5oCaXK2s0FeIOJaa2QwSGPDI1h5/3ZVw==} '@mintel/tsconfig@1.6.0': resolution: {integrity: sha512-8qx34GB9dfUFIdEF3wINgXN0cTYVQMcfDB5QFLX/HdjT+nXS/7bjjH5ofnEhsNAXv0jDse1UcL/C69O/Le01pg==} @@ -1752,6 +1774,9 @@ packages: '@react-pdf/types@2.9.2': resolution: {integrity: sha512-dufvpKId9OajLLbgn9q7VLUmyo1Jf+iyGk2ZHmCL8nIDtL8N1Ejh9TH7+pXXrR0tdie1nmnEb5Bz9U7g4hI4/g==} + '@rolldown/pluginutils@1.0.0-rc.3': + resolution: {integrity: sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q==} + '@rollup/plugin-commonjs@28.0.1': resolution: {integrity: sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==} engines: {node: '>=16.0.0 || 14 >= 14.17'} @@ -2248,6 +2273,18 @@ packages: '@tybys/wasm-util@0.10.1': resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.27.0': + resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.28.0': + resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==} + '@types/chai@5.2.3': resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} @@ -2339,6 +2376,12 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@types/whatwg-mimetype@3.0.2': + resolution: {integrity: sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA==} + + '@types/ws@8.18.1': + resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} + '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} @@ -2499,6 +2542,12 @@ packages: cpu: [x64] os: [win32] + '@vitejs/plugin-react@5.1.4': + resolution: {integrity: sha512-VIcFLdRi/VYRU8OL/puL7QXMYafHmqOnwTZY50U1JPlCNj30PxCMx65c494b1K9be9hX83KVt0+gTEwTWLqToA==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 + '@vitest/expect@4.0.18': resolution: {integrity: sha512-8sCWUyckXXYvx4opfzVY03EOiYVxyNrHS5QxX3DAIi5dpJAAkyJezHCP77VMX4HKA2LDT/Jpfo8i2r5BE3GnQQ==} @@ -3983,6 +4032,10 @@ packages: resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} engines: {node: '>=6.0'} + happy-dom@20.6.1: + resolution: {integrity: sha512-+0vhESXXhFwkdjZnJ5DlmJIfUYGgIEEjzIjB+aKJbFuqlvvKyOi+XkI1fYbgYR9QCxG5T08koxsQ6HrQfa5gCQ==} + engines: {node: '>=20.0.0'} + has-bigints@1.1.0: resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==} engines: {node: '>= 0.4'} @@ -5489,6 +5542,10 @@ packages: react-promise-suspense@0.3.4: resolution: {integrity: sha512-I42jl7L3Ze6kZaq+7zXWSunBa3b1on5yfvUW6Eo/3fFOj6dZ5Bqmcd264nJbTK/gn1HjjILAjSwnZbV4RpSaNQ==} + react-refresh@0.18.0: + resolution: {integrity: sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==} + engines: {node: '>=0.10.0'} + react@19.2.4: resolution: {integrity: sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==} engines: {node: '>=0.10.0'} @@ -6436,6 +6493,10 @@ packages: whatwg-fetch@3.6.20: resolution: {integrity: sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==} + whatwg-mimetype@3.0.0: + resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} + engines: {node: '>=12'} + whatwg-mimetype@4.0.0: resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} engines: {node: '>=18'} @@ -6729,6 +6790,8 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-plugin-utils@7.28.6': {} + '@babel/helper-string-parser@7.27.1': {} '@babel/helper-validator-identifier@7.28.5': {} @@ -6744,6 +6807,16 @@ snapshots: dependencies: '@babel/types': 7.29.0 + '@babel/plugin-transform-react-jsx-self@7.27.1(@babel/core@7.29.0)': + dependencies: + '@babel/core': 7.29.0 + '@babel/helper-plugin-utils': 7.28.6 + + '@babel/plugin-transform-react-jsx-source@7.27.1(@babel/core@7.29.0)': + dependencies: + '@babel/core': 7.29.0 + '@babel/helper-plugin-utils': 7.28.6 + '@babel/runtime@7.28.6': {} '@babel/template@7.28.6': @@ -7470,7 +7543,7 @@ snapshots: - babel-plugin-react-compiler - sass - '@mintel/next-utils@1.7.12(@babel/core@7.29.0)(@opentelemetry/api@1.9.0)(@swc/helpers@0.5.18)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(sass@1.97.3)(typescript@5.9.3)': + '@mintel/next-utils@1.7.15(@babel/core@7.29.0)(@opentelemetry/api@1.9.0)(@swc/helpers@0.5.18)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(sass@1.97.3)(typescript@5.9.3)': dependencies: '@directus/sdk': 21.1.0 next: 16.1.6(@babel/core@7.29.0)(@opentelemetry/api@1.9.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(sass@1.97.3) @@ -8246,6 +8319,8 @@ snapshots: '@react-pdf/primitives': 4.1.1 '@react-pdf/stylesheet': 6.1.2 + '@rolldown/pluginutils@1.0.0-rc.3': {} + '@rollup/plugin-commonjs@28.0.1(rollup@4.57.1)': dependencies: '@rollup/pluginutils': 5.3.0(rollup@4.57.1) @@ -8735,6 +8810,27 @@ snapshots: tslib: 2.8.1 optional: true + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.29.0 + '@babel/types': 7.29.0 + '@types/babel__generator': 7.27.0 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.28.0 + + '@types/babel__generator@7.27.0': + dependencies: + '@babel/types': 7.29.0 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.29.0 + '@babel/types': 7.29.0 + + '@types/babel__traverse@7.28.0': + dependencies: + '@babel/types': 7.29.0 + '@types/chai@5.2.3': dependencies: '@types/deep-eql': 4.0.2 @@ -8839,6 +8935,12 @@ snapshots: '@types/unist@3.0.3': {} + '@types/whatwg-mimetype@3.0.2': {} + + '@types/ws@8.18.1': + dependencies: + '@types/node': 22.19.10 + '@types/yauzl@2.10.3': dependencies: '@types/node': 22.19.10 @@ -8996,6 +9098,18 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true + '@vitejs/plugin-react@5.1.4(vite@7.3.1(@types/node@22.19.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2))': + dependencies: + '@babel/core': 7.29.0 + '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.29.0) + '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.29.0) + '@rolldown/pluginutils': 1.0.0-rc.3 + '@types/babel__core': 7.20.5 + react-refresh: 0.18.0 + vite: 7.3.1(@types/node@22.19.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2) + transitivePeerDependencies: + - supports-color + '@vitest/expect@4.0.18': dependencies: '@standard-schema/spec': 1.1.0 @@ -9039,7 +9153,7 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vitest: 4.0.18(@opentelemetry/api@1.9.0)(@types/node@22.19.10)(@vitest/ui@4.0.18)(jiti@2.6.1)(jsdom@27.4.0)(lightningcss@1.30.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2) + vitest: 4.0.18(@opentelemetry/api@1.9.0)(@types/node@22.19.10)(@vitest/ui@4.0.18)(happy-dom@20.6.1)(jiti@2.6.1)(jsdom@27.4.0)(lightningcss@1.30.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2) '@vitest/utils@4.0.18': dependencies: @@ -10763,6 +10877,18 @@ snapshots: section-matter: 1.0.0 strip-bom-string: 1.0.0 + happy-dom@20.6.1: + dependencies: + '@types/node': 22.19.10 + '@types/whatwg-mimetype': 3.0.2 + '@types/ws': 8.18.1 + entities: 6.0.1 + whatwg-mimetype: 3.0.0 + ws: 8.19.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + has-bigints@1.1.0: {} has-flag@3.0.0: {} @@ -12555,6 +12681,8 @@ snapshots: dependencies: fast-deep-equal: 2.0.1 + react-refresh@0.18.0: {} + react@19.2.4: {} readdirp@3.6.0: @@ -13627,7 +13755,7 @@ snapshots: tsx: 4.21.0 yaml: 2.8.2 - vitest@4.0.18(@opentelemetry/api@1.9.0)(@types/node@22.19.10)(@vitest/ui@4.0.18)(jiti@2.6.1)(jsdom@27.4.0)(lightningcss@1.30.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2): + vitest@4.0.18(@opentelemetry/api@1.9.0)(@types/node@22.19.10)(@vitest/ui@4.0.18)(happy-dom@20.6.1)(jiti@2.6.1)(jsdom@27.4.0)(lightningcss@1.30.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2): dependencies: '@vitest/expect': 4.0.18 '@vitest/mocker': 4.0.18(vite@7.3.1(@types/node@22.19.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2)) @@ -13653,6 +13781,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@types/node': 22.19.10 '@vitest/ui': 4.0.18(vitest@4.0.18) + happy-dom: 20.6.1 jsdom: 27.4.0 transitivePeerDependencies: - jiti @@ -13722,6 +13851,8 @@ snapshots: whatwg-fetch@3.6.20: {} + whatwg-mimetype@3.0.0: {} + whatwg-mimetype@4.0.0: {} whatwg-mimetype@5.0.0: {} diff --git a/postcss.config.js b/postcss.config.cjs similarity index 64% rename from postcss.config.js rename to postcss.config.cjs index 5ab85cdd..52a911af 100644 --- a/postcss.config.js +++ b/postcss.config.cjs @@ -1,3 +1,5 @@ +/* eslint-disable no-undef */ +/* eslint-env node */ module.exports = { plugins: { '@tailwindcss/postcss': {}, diff --git a/tailwind.config.js b/tailwind.config.cjs similarity index 98% rename from tailwind.config.js rename to tailwind.config.cjs index 631cd9ed..83b79e75 100644 --- a/tailwind.config.js +++ b/tailwind.config.cjs @@ -1,3 +1,5 @@ +/* eslint-disable no-undef */ +/* eslint-env node */ /** @type {import('tailwindcss').Config} */ module.exports = { content: [ @@ -147,7 +149,7 @@ module.exports = { }, plugins: [ // Custom plugin for responsive utilities - function({ addUtilities }) { + function ({ addUtilities }) { const newUtilities = { // Touch target utilities '.touch-target': { diff --git a/vitest.config.mts b/vitest.config.mts new file mode 100644 index 00000000..a099800b --- /dev/null +++ b/vitest.config.mts @@ -0,0 +1,24 @@ +import { defineConfig } from 'vitest/config'; +import react from '@vitejs/plugin-react'; + +export default defineConfig({ + plugins: [react()], + resolve: { + alias: { + 'next/server': 'next/server.js', + }, + }, + ssr: { + noExternal: ['@mintel/next-utils', 'next-intl'], + }, + test: { + environment: 'happy-dom', + globals: true, + exclude: ['**/node_modules/**', '**/.next/**', '**/dist/**'], + include: ['**/*.test.{ts,tsx}'], + coverage: { + provider: 'v8', + reporter: ['text', 'json', 'html'], + }, + }, +});