diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 17227cd9..1c837439 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,6 +42,8 @@ jobs: env: FORCE_COLOR: 1 STAGING: 1 + - name: Double-check Svelte types with old tool + run: cd web && pnpm svelte-check - name: Build nginx config run: cd web && ./scripts/build-nginx-config.sh - name: Upload web assets diff --git a/.gitignore b/.gitignore index a0089d63..7112c33b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ .eslintcache .env +tsconfig.tsbuildinfo diff --git a/api/tsconfig.json b/api/tsconfig.json index f2cdad62..d538e798 100644 --- a/api/tsconfig.json +++ b/api/tsconfig.json @@ -1,5 +1,7 @@ { "extends": "../tsconfig.json", - "include": ["**/*.ts", "**/*.cts"], - "exclude": ["dist"] + "compilerOptions": { + "composite": true + }, + "include": ["**/*.ts"] } diff --git a/core/tsconfig.json b/core/tsconfig.json index f2cdad62..d538e798 100644 --- a/core/tsconfig.json +++ b/core/tsconfig.json @@ -1,5 +1,7 @@ { "extends": "../tsconfig.json", - "include": ["**/*.ts", "**/*.cts"], - "exclude": ["dist"] + "compilerOptions": { + "composite": true + }, + "include": ["**/*.ts"] } diff --git a/eslint.config.ts b/eslint.config.ts index be9ff8b2..0797a24c 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -1,16 +1,26 @@ import loguxSvelteConfig from '@logux/eslint-config/svelte' import type { Linter } from 'eslint' -export default [ +const config: Linter.Config[] = [ { ignores: [ '*/dist/', 'web/storybook-static/', 'web/vite.config.ts.*', - 'server/web/' + 'server/web/', + 'web/.fast-check' ] }, - ...loguxSvelteConfig, + ...loguxSvelteConfig.map(item => { + let parserOptions = item.languageOptions?.parserOptions as + | { project?: unknown; projectService?: boolean } + | undefined + if (parserOptions?.project) { + delete parserOptions.project + parserOptions.projectService = true + } + return item + }), { rules: { '@typescript-eslint/no-base-to-string': 'off', @@ -80,3 +90,5 @@ export default [ } } ] satisfies Linter.Config[] + +export default config diff --git a/extension/tsconfig.json b/extension/tsconfig.json index f2cdad62..4c29fd0f 100644 --- a/extension/tsconfig.json +++ b/extension/tsconfig.json @@ -1,5 +1,10 @@ { "extends": "../tsconfig.json", - "include": ["**/*.ts", "**/*.cts"], + "compilerOptions": { + "composite": true, + "types": ["chrome", "node"], + "lib": ["ES2024", "DOM"] + }, + "include": ["**/*.ts"], "exclude": ["dist"] } diff --git a/loader-tests/tsconfig.json b/loader-tests/tsconfig.json index f2cdad62..d538e798 100644 --- a/loader-tests/tsconfig.json +++ b/loader-tests/tsconfig.json @@ -1,5 +1,7 @@ { "extends": "../tsconfig.json", - "include": ["**/*.ts", "**/*.cts"], - "exclude": ["dist"] + "compilerOptions": { + "composite": true + }, + "include": ["**/*.ts"] } diff --git a/nano-staged.json b/nano-staged.json index c0f1d182..9725af36 100644 --- a/nano-staged.json +++ b/nano-staged.json @@ -1,10 +1,13 @@ { - "*.{html,md,json}": "oxfmt", - "*.{svelte,ts}": "svelte-check", - "*.{js,ts,cjs}": ["oxfmt", "eslint --fix --concurrency auto"], - "*.css": ["oxfmt", "stylelint --fix"], - "*.svelte": [ + "*.{html,md,json,css,js,ts}": "oxfmt", + "*.{svelte,ts}": "sh ./scripts/check-types.sh", + "*.{js,ts}": "eslint --fix --concurrency auto", + "*.css": "stylelint --fix", + "web/*.svelte": [ "node ./web/scripts/check-names.ts", + "svelte-check --tsconfig web/tsconfig.json" + ], + "*.svelte": [ "prettier --experimental-cli --write", "stylelint --fix", "eslint --fix --concurrency auto" diff --git a/package.json b/package.json index d0d458d0..3f3f0ff4 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "format:oxfmt": "oxfmt .", "format:prettier": "prettier --experimental-cli --write **/*.svelte", "test:js": "eslint --concurrency=auto --cache .", - "test:types": "svelte-check", + "test:types": "./scripts/check-types.sh", "test:online:audit": "pnpm audit --prod", "test:focused": "node ./scripts/check-focused-tests.ts", "test:messages": "node ./scripts/check-messages.ts", @@ -32,6 +32,7 @@ "@types/chrome": "0.1.32", "@types/node": "25.0.3", "@types/ws": "8.18.1", + "@typescript/native-preview": "7.0.0-dev.20260103.1", "actions-up": "1.8.0", "better-node-test": "0.8.3", "eslint": "9.39.2", @@ -58,7 +59,6 @@ "remark-validate-links": "13.1.0", "stylelint": "16.26.1", "svelte": "5.46.1", - "svelte-check": "4.3.5", "svelte-eslint-parser": "1.4.1", "svgo": "4.0.0", "typescript": "5.9.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0be6f945..a721e4a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: '@types/ws': specifier: 8.18.1 version: 8.18.1 + '@typescript/native-preview': + specifier: 7.0.0-dev.20260103.1 + version: 7.0.0-dev.20260103.1 actions-up: specifier: 1.8.0 version: 1.8.0 @@ -98,9 +101,6 @@ importers: svelte: specifier: 5.46.1 version: 5.46.1 - svelte-check: - specifier: 4.3.5 - version: 4.3.5(picomatch@4.0.3)(svelte@5.46.1)(typescript@5.9.3) svelte-eslint-parser: specifier: 1.4.1 version: 1.4.1(svelte@5.46.1) @@ -415,6 +415,12 @@ importers: stylelint-use-logical: specifier: 2.1.2 version: 2.1.2(stylelint@16.26.1(typescript@5.9.3)) + svelte-check: + specifier: 4.3.5 + version: 4.3.5(picomatch@4.0.3)(svelte@5.46.1)(typescript@5.9.3) + svelte-fast-check: + specifier: 0.2.2 + version: 0.2.2(svelte@5.46.1)(typescript@5.9.3) packages: @@ -1714,6 +1720,45 @@ packages: resolution: {integrity: sha512-mM/JRQOzhVN1ykejrvwnBRV3+7yTKK8tVANVN3o1O0t0v7o+jqdVu9crPy5Y9dov15TJk/FTIgoUGHrTOVL3Zg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript/native-preview-darwin-arm64@7.0.0-dev.20260103.1': + resolution: {integrity: sha512-uQba8AUGOJhYLBFhlHb6CCdswijEQNg9pNxriv3bRC6qyxRZKusDZk9+aLRIMKEOmza1t2ZT6rIR7yZV1SS/yg==} + cpu: [arm64] + os: [darwin] + + '@typescript/native-preview-darwin-x64@7.0.0-dev.20260103.1': + resolution: {integrity: sha512-N/KRr6+Rs1On9gKMOQgg/cryLzDXdkUdy5TQz+kOzoZ5gtW7yx5to6hW2IS8RS3z8zcicn1awDnFcqBl5xL2hw==} + cpu: [x64] + os: [darwin] + + '@typescript/native-preview-linux-arm64@7.0.0-dev.20260103.1': + resolution: {integrity: sha512-ukDB/N8TkC3hvZyixdrDua7xfmtAbQbjicbK51toqaQCdgZtPWaq1+ttjTa9AN+TT36a4GFmXu/uEzMgHuUWug==} + cpu: [arm64] + os: [linux] + + '@typescript/native-preview-linux-arm@7.0.0-dev.20260103.1': + resolution: {integrity: sha512-vznk92yXxmRZQa6vM5cntI0DLg2dwRIVX/Ok7Mga+RCNspgC8RpstFxhSHJUp7wxqNTfhLnd0bEReJXbMLW1TQ==} + cpu: [arm] + os: [linux] + + '@typescript/native-preview-linux-x64@7.0.0-dev.20260103.1': + resolution: {integrity: sha512-YRNUYt/G8q7E0UPEqOhUFg+5e5Kh0pBQ+0VbaEbHZHGo0XxzR5z1BcesXUa8yphCzF3JX/GiWPb+umHjYRARoA==} + cpu: [x64] + os: [linux] + + '@typescript/native-preview-win32-arm64@7.0.0-dev.20260103.1': + resolution: {integrity: sha512-h5J4eVIXew7t6PStU9M3uueCoZ0+hDbNF8AvZtl1oKO2+fOiiA/k4krgz9Mfi2hb+yhemS3ZrLvrbW6FOlHmYA==} + cpu: [arm64] + os: [win32] + + '@typescript/native-preview-win32-x64@7.0.0-dev.20260103.1': + resolution: {integrity: sha512-EvT+ll/jP08iYhjaCgzJHta/ObGv7vBuPU24gHKPbBLBVvFJuzXWK6jnYqcGnQcGrVFh3o37dcBhLR7LdTKatw==} + cpu: [x64] + os: [win32] + + '@typescript/native-preview@7.0.0-dev.20260103.1': + resolution: {integrity: sha512-gx+q8yi8GgvbKpQYJB2EBI0jHk8OJOySJ4xnVn019R6t5UhNkj6xcuArp+y1BJ3Mx8PigpURb+6WVGbSwuLWXQ==} + hasBin: true + '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} @@ -2114,6 +2159,9 @@ packages: resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==} engines: {node: '>=12'} + cleye@2.2.1: + resolution: {integrity: sha512-eZzJGlG3N6+IsKV+297HIRS2fyRsLMOrx62hGUmmcyOtP/I+L7JVeSKZH49WZUdVB8NoaZOUvq01363I/PHJiA==} + clone-regexp@3.0.0: resolution: {integrity: sha512-ujdnoq2Kxb8s3ItNBtnYeXdm07FcU0u8ARAT1lQ2YdMwQC+cdiXX8KoqMVuglztILivceTtp4ivqGSmEmhBUJw==} engines: {node: '>=12'} @@ -2794,6 +2842,11 @@ packages: resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} hasBin: true + glob@11.1.0: + resolution: {integrity: sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==} + engines: {node: 20 || >=22} + hasBin: true + global-modules@2.0.0: resolution: {integrity: sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==} engines: {node: '>=6'} @@ -3073,6 +3126,10 @@ packages: jackspeak@3.4.3: resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + jackspeak@4.1.1: + resolution: {integrity: sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==} + engines: {node: 20 || >=22} + jiti@2.6.1: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true @@ -3591,6 +3648,10 @@ packages: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} + path-scurry@2.0.1: + resolution: {integrity: sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==} + engines: {node: 20 || >=22} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -4173,6 +4234,13 @@ packages: svelte: optional: true + svelte-fast-check@0.2.2: + resolution: {integrity: sha512-1fo9rhA0yqyRNx+aV6XMbdPzgzUdmOnP7HNjea3JbP+dy2g85PeAYo4oEtbOLTcoP8VDye0jIgbikecP24Y5Iw==} + hasBin: true + peerDependencies: + svelte: '>=5.0.0' + typescript: '>=5.0.0' + svelte2tsx@0.7.46: resolution: {integrity: sha512-S++Vw3w47a8rBuhbz4JK0fcGea8tOoX1boT53Aib8+oUO2EKeOG+geXprJVTDfBlvR+IJdf3jIpR2RGwT6paQA==} peerDependencies: @@ -4202,6 +4270,9 @@ packages: resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==} engines: {node: '>=6'} + terminal-columns@2.0.0: + resolution: {integrity: sha512-6IByuUjyNZJXUtwDNm+OIe62zgwwaRbH+WMNTcx05O2G5V9WhvluAAHJY8OvUdwmzMPpqAD/7EUpGdI6ae1aiQ==} + text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} @@ -4302,6 +4373,9 @@ packages: resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==} engines: {node: '>=14.16'} + type-flag@4.0.3: + resolution: {integrity: sha512-YA09cL07U7hSV+/doSfKl+RkIZ2olCnevZsVgAuyBUG3h2ROf9Oh2vmbq5Rf26aA9/qu9RtStuc7ap5PC6k/vw==} + typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} @@ -5744,6 +5818,37 @@ snapshots: '@typescript-eslint/types': 8.51.0 eslint-visitor-keys: 4.2.1 + '@typescript/native-preview-darwin-arm64@7.0.0-dev.20260103.1': + optional: true + + '@typescript/native-preview-darwin-x64@7.0.0-dev.20260103.1': + optional: true + + '@typescript/native-preview-linux-arm64@7.0.0-dev.20260103.1': + optional: true + + '@typescript/native-preview-linux-arm@7.0.0-dev.20260103.1': + optional: true + + '@typescript/native-preview-linux-x64@7.0.0-dev.20260103.1': + optional: true + + '@typescript/native-preview-win32-arm64@7.0.0-dev.20260103.1': + optional: true + + '@typescript/native-preview-win32-x64@7.0.0-dev.20260103.1': + optional: true + + '@typescript/native-preview@7.0.0-dev.20260103.1': + optionalDependencies: + '@typescript/native-preview-darwin-arm64': 7.0.0-dev.20260103.1 + '@typescript/native-preview-darwin-x64': 7.0.0-dev.20260103.1 + '@typescript/native-preview-linux-arm': 7.0.0-dev.20260103.1 + '@typescript/native-preview-linux-arm64': 7.0.0-dev.20260103.1 + '@typescript/native-preview-linux-x64': 7.0.0-dev.20260103.1 + '@typescript/native-preview-win32-arm64': 7.0.0-dev.20260103.1 + '@typescript/native-preview-win32-x64': 7.0.0-dev.20260103.1 + '@ungap/structured-clone@1.3.0': {} '@unrs/resolver-binding-android-arm-eabi@1.11.1': @@ -6094,6 +6199,11 @@ snapshots: dependencies: escape-string-regexp: 5.0.0 + cleye@2.2.1: + dependencies: + terminal-columns: 2.0.0 + type-flag: 4.0.3 + clone-regexp@3.0.0: dependencies: is-regexp: 3.1.0 @@ -6780,6 +6890,15 @@ snapshots: package-json-from-dist: 1.0.1 path-scurry: 1.11.1 + glob@11.1.0: + dependencies: + foreground-child: 3.3.1 + jackspeak: 4.1.1 + minimatch: 10.1.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 2.0.1 + global-modules@2.0.0: dependencies: global-prefix: 3.0.0 @@ -7084,6 +7203,10 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 + jackspeak@4.1.1: + dependencies: + '@isaacs/cliui': 8.0.2 + jiti@2.6.1: {} js-base64@3.7.8: @@ -7723,6 +7846,11 @@ snapshots: lru-cache: 10.4.3 minipass: 7.1.2 + path-scurry@2.0.1: + dependencies: + lru-cache: 11.2.4 + minipass: 7.1.2 + path-type@4.0.0: {} pathe@2.0.3: {} @@ -8411,6 +8539,16 @@ snapshots: optionalDependencies: svelte: 5.46.1 + svelte-fast-check@0.2.2(svelte@5.46.1)(typescript@5.9.3): + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@typescript/native-preview': 7.0.0-dev.20260103.1 + cleye: 2.2.1 + glob: 11.1.0 + svelte: 5.46.1 + svelte2tsx: 0.7.46(svelte@5.46.1)(typescript@5.9.3) + typescript: 5.9.3 + svelte2tsx@0.7.46(svelte@5.46.1)(typescript@5.9.3): dependencies: dedent-js: 1.0.1 @@ -8460,6 +8598,8 @@ snapshots: tapable@2.3.0: {} + terminal-columns@2.0.0: {} + text-table@0.2.0: {} time-span@5.1.0: @@ -8548,6 +8688,8 @@ snapshots: type-fest@3.13.1: {} + type-flag@4.0.3: {} + typedarray@0.0.6: {} typescript-eslint@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 65130e95..ba929362 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -30,6 +30,7 @@ minimumReleaseAgeExclude: - 'multiocular' - 'oxfmt' - '@oxfmt/*' + - svelte-fast-check allowBuilds: husky: true diff --git a/proxy/tsconfig.json b/proxy/tsconfig.json index f2cdad62..505999bb 100644 --- a/proxy/tsconfig.json +++ b/proxy/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "../tsconfig.json", - "include": ["**/*.ts", "**/*.cts"], - "exclude": ["dist"] + "compilerOptions": { + "composite": true + }, + "include": ["**/*.ts"], + "exclude": ["dist/"] } diff --git a/scripts/check-types.sh b/scripts/check-types.sh new file mode 100755 index 00000000..6684fc8e --- /dev/null +++ b/scripts/check-types.sh @@ -0,0 +1,78 @@ +#!/bin/sh +# Check types separated for each project. If files was passed here +# (e.g. from nano-staged), only related projects will be checked. + +set -e + +# Load projects from pnpm-workspace.yaml and add scripts +ALL_PROJECTS=$(pnpm config get packages --json | grep -o '"[^"]*"' | tr -d '"' | tr '\n' ' ') +ALL_PROJECTS="$ALL_PROJECTS scripts" + +# Function to determine which projects to check based on file paths +get_projects_from_files() { + projects="" + for file in "$@"; do + # Remove leading ./ and extract the first directory component + project=$(echo "$file" | sed 's|^\./||' | cut -d'/' -f1) + + # If file is in root (no directory), use scripts project + if [ "$project" = "$file" ] || [ -z "$project" ]; then + project="scripts" + fi + + if echo "$ALL_PROJECTS" | grep -q "\<$project\>"; then + if ! echo "$projects" | grep -q "\<$project\>"; then + projects="$projects $project" + fi + fi + done + echo "$projects" | sed 's/^ //' +} + +has_files_with_ext() { + project="$1" + ext="$2" + shift 2 + for file in "$@"; do + file_project=$(echo "$file" | sed 's|^\./||' | cut -d'/' -f1) + if [ "$file_project" = "$project" ]; then + case "$file" in + *.$ext) return 0 ;; + esac + fi + done + return 1 +} + +if [ $# -eq 0 ]; then + PROJECTS_TO_CHECK="$ALL_PROJECTS" + FILES_PROVIDED=false +else + PROJECTS_TO_CHECK=$(get_projects_from_files "$@") + FILES_PROVIDED=true +fi + +for project in $PROJECTS_TO_CHECK; do + if [ "$project" = "web" ]; then + echo "Checking web" + + if [ "$FILES_PROVIDED" = false ]; then + ./node_modules/.bin/tsgo --noEmit -p web + cd web/ + ./node_modules/.bin/svelte-fast-check --incremental + cd .. + else + if has_files_with_ext web ts "$@"; then + ./node_modules/.bin/tsgo --noEmit -p web + fi + if has_files_with_ext web svelte "$@"; then + cd web/ + ./node_modules/.bin/svelte-fast-check --incremental + cd .. + fi + fi + else + echo "Checking $project" + ./node_modules/.bin/tsgo --noEmit -p "$project" + fi +done diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index e6f83d5e..d10d5f26 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -1,4 +1,8 @@ { "extends": "../tsconfig.json", - "include": ["*.ts"] + "compilerOptions": { + "composite": true + }, + "include": ["*.ts", "../*.ts"], + "references": [] } diff --git a/server/tsconfig.json b/server/tsconfig.json index f2cdad62..1b323272 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "../tsconfig.json", - "include": ["**/*.ts", "**/*.cts"], + "compilerOptions": { + "composite": true + }, + "include": ["**/*.ts"], "exclude": ["dist"] } diff --git a/tsconfig.json b/tsconfig.json index a55b14d4..6fffc316 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,13 +10,22 @@ "esModuleInterop": true, "skipLibCheck": true, "allowJs": true, + "noEmit": true, "target": "ES2024", "module": "NodeNext", "strict": true, - "noEmit": true, - "types": ["chrome", "node"], - "lib": ["ES2024", "DOM", "DOM.Iterable"] + "types": ["node"], + "lib": ["ES2024"] }, - "include": ["**/*.ts", "**/*.cts", "web/**/*.svelte", "web/.storybook/*.ts"], - "exclude": ["*/dist"] + "include": [], + "references": [ + { "path": "./api" }, + { "path": "./core" }, + { "path": "./extension" }, + { "path": "./loader-tests" }, + { "path": "./proxy" }, + { "path": "./scripts" }, + { "path": "./server" }, + { "path": "./web" } + ] } diff --git a/web/.gitignore b/web/.gitignore index e41bb13c..d4728ca1 100644 --- a/web/.gitignore +++ b/web/.gitignore @@ -4,3 +4,4 @@ vite.config.ts.timestamp* routes.regexp nginx.conf.compiled build-storybook.log +.fast-check diff --git a/web/package.json b/web/package.json index d8932709..0fa24a9a 100644 --- a/web/package.json +++ b/web/package.json @@ -66,7 +66,9 @@ "size-limit": "12.0.0", "storybook": "10.1.11", "stylelint": "16.26.1", - "stylelint-use-logical": "2.1.2" + "stylelint-use-logical": "2.1.2", + "svelte-check": "4.3.5", + "svelte-fast-check": "0.2.2" }, "engines": { "node": "^24.12.0", diff --git a/web/tsconfig.json b/web/tsconfig.json index 7cb19dc4..579b828a 100644 --- a/web/tsconfig.json +++ b/web/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "../tsconfig.json", + "compilerOptions": { + "lib": ["ES2024", "DOM", "DOM.Iterable"] + }, "include": ["**/*.ts", "**/*.cts", "**/*.svelte", ".storybook/*.ts"], "exclude": ["dist", "storybook-static"] }