diff --git a/web/ee/css-modules.d.ts b/web/ee/css-modules.d.ts new file mode 100644 index 0000000000..9e33179f57 --- /dev/null +++ b/web/ee/css-modules.d.ts @@ -0,0 +1,14 @@ +/** + * Ambient CSS module declarations for the app. + * Classic tsc tolerates untyped side-effect CSS imports under moduleResolution:bundler; + * the native compiler (TS7) requires a declaration. This mirrors packages/css-modules.d.ts. + */ +declare module "*.module.css" { + const classes: {[key: string]: string} + export default classes +} + +declare module "*.css" { + const content: {[key: string]: string} + export default content +} diff --git a/web/ee/tsconfig.json b/web/ee/tsconfig.json index 487e08594f..6a6ba5034e 100644 --- a/web/ee/tsconfig.json +++ b/web/ee/tsconfig.json @@ -1,10 +1,9 @@ { "extends": "../oss/tsconfig.json", "compilerOptions": { - "baseUrl": "..", "paths": { - "@/oss/*": ["./ee/src/*", "./oss/src/*"], - "@/agenta-oss-common/*": ["./ee/src/*", "./oss/src/*"] + "@/oss/*": ["./src/*", "../oss/src/*"], + "@/agenta-oss-common/*": ["./src/*", "../oss/src/*"] } }, "include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx"], diff --git a/web/oss/css-modules.d.ts b/web/oss/css-modules.d.ts new file mode 100644 index 0000000000..9e33179f57 --- /dev/null +++ b/web/oss/css-modules.d.ts @@ -0,0 +1,14 @@ +/** + * Ambient CSS module declarations for the app. + * Classic tsc tolerates untyped side-effect CSS imports under moduleResolution:bundler; + * the native compiler (TS7) requires a declaration. This mirrors packages/css-modules.d.ts. + */ +declare module "*.module.css" { + const classes: {[key: string]: string} + export default classes +} + +declare module "*.css" { + const content: {[key: string]: string} + export default content +} diff --git a/web/oss/tsconfig.json b/web/oss/tsconfig.json index 80e4dfec6a..f1ca26e6a6 100644 --- a/web/oss/tsconfig.json +++ b/web/oss/tsconfig.json @@ -14,10 +14,9 @@ "isolatedModules": true, "jsx": "preserve", "incremental": true, - "baseUrl": ".", "paths": { - "@/oss/*": ["src/*", "src/lib/noop/index.tsx"], - "@/agenta-oss-common/*": ["../ee/src/*", "src/*", "src/lib/noop/index.tsx"] + "@/oss/*": ["./src/*", "./src/lib/noop/index.tsx"], + "@/agenta-oss-common/*": ["../ee/src/*", "./src/*", "./src/lib/noop/index.tsx"] } }, "include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx"], diff --git a/web/package.json b/web/package.json index 88dc86f59d..511be149c2 100644 --- a/web/package.json +++ b/web/package.json @@ -25,6 +25,7 @@ "@next/eslint-plugin-next": "15.5.18", "@typescript-eslint/eslint-plugin": "^8.61.0", "@typescript-eslint/parser": "^8.61.0", + "@typescript/native-preview": "7.0.0-dev.20260707.2", "eslint": "^9.39.4", "eslint-config-next": "15.5.18", "eslint-config-prettier": "^10.1.8", @@ -51,6 +52,8 @@ "dev-oss": "turbo run dev --filter=@agenta/oss", "lint": "turbo run lint", "lint-fix": "turbo run lint -- --fix", + "type-check": "pnpm --filter @agenta/oss exec tsc --noEmit && pnpm --filter @agenta/ee exec tsc --noEmit", + "type-check:native": "pnpm --filter @agenta/oss exec tsgo --noEmit && pnpm --filter @agenta/ee exec tsgo --noEmit", "test:revision-centric": "tsx --tsconfig oss/tsconfig.json oss/tests/datalayer/test-revision-centric.ts", "test:apps": "tsx --tsconfig oss/tsconfig.json oss/tests/datalayer/test-apps.ts", "test:environments": "tsx --tsconfig oss/tsconfig.json oss/tests/datalayer/test-environments.ts", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 0b7e7b6bec..735ba988d8 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -70,6 +70,9 @@ importers: '@typescript-eslint/parser': specifier: ^8.61.0 version: 8.61.0(eslint@9.39.4(jiti@2.7.0))(typescript@5.9.3) + '@typescript/native-preview': + specifier: 7.0.0-dev.20260707.2 + version: 7.0.0-dev.20260707.2 eslint: specifier: ^9.39.4 version: 9.39.4(jiti@2.7.0) @@ -3703,6 +3706,53 @@ packages: resolution: {integrity: sha512-QVLZu3ZPQEE+HICQyAMZ2yLQhxf0meY/wx6Hx14YcTNj13JB3qHlX3lJ02L3fLGHgERRH71kvYDwiXIguT3AjQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript/native-preview-darwin-arm64@7.0.0-dev.20260707.2': + resolution: {integrity: sha512-wny2pgKjGbiZtnOIHVa3tXC1UfDqxNEFzyPGmiqybedG8hipG2Nfp0l5UxbaKCjkLacUpH/W5bP2hBOMVhCOzg==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/native-preview-darwin-x64@7.0.0-dev.20260707.2': + resolution: {integrity: sha512-Afc7M5zOwo+GpfcYwz5Z8HMB2tPVsui7nNIqEuuFB73MPdVqNn/Wmpe4tP4MRri0AtJnJknoHBaTJ/VDAp/Jhw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/native-preview-linux-arm64@7.0.0-dev.20260707.2': + resolution: {integrity: sha512-iITBa2WjjTI5N9t5l7Z4KoOSI+2zBlhbvFzsD/f8qX8QoKjz/Y4DPyBDgezYi8nkqjjksbgSOJ3/ykzhwrB9cg==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/native-preview-linux-arm@7.0.0-dev.20260707.2': + resolution: {integrity: sha512-hJm/UOqZTr9FHmR7uNm8VGX4oKtfWk0Jem0zPeJFNC8ckGUfSBueyiEYMZB+XmRc1aG4x1E46y3CplP4CLHvGQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/native-preview-linux-x64@7.0.0-dev.20260707.2': + resolution: {integrity: sha512-du0dzi6y97Po5vDNdPJTyyijHCpaS22JLRnKZEJXBDaO9gCIymOv/5QQokFRuOlQm0bWl3i9PF4OVdGP6uAOQA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/native-preview-win32-arm64@7.0.0-dev.20260707.2': + resolution: {integrity: sha512-SsAwfhyHJ1akgBc+99z4+hwdbHsdWaKB8EwCNIMA6JfSLMeUjffrYvxu+vfMyxVtOVOz7RrRXRoiDiu4a2sCtg==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/native-preview-win32-x64@7.0.0-dev.20260707.2': + resolution: {integrity: sha512-DL4u27stv0fo71sVhOzHSwE+YMZsbBijVI+kg5dLDLilSH79WFTJ8RSQ46vJrCMt+Gjlv/JOZP1PuLJDfioYeQ==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + + '@typescript/native-preview@7.0.0-dev.20260707.2': + resolution: {integrity: sha512-oUGp+Rep/hqMhPunyinsALUwSlzHINSxitifPiSaeqoKOKD2OlR9NE3TaPqwsl4NlGslsOSUXI1JotWQzpYCPg==} + engines: {node: '>=16.20.0'} + hasBin: true + '@ungap/structured-clone@1.3.1': resolution: {integrity: sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ==} @@ -9638,6 +9688,37 @@ snapshots: '@typescript-eslint/types': 8.61.0 eslint-visitor-keys: 5.0.1 + '@typescript/native-preview-darwin-arm64@7.0.0-dev.20260707.2': + optional: true + + '@typescript/native-preview-darwin-x64@7.0.0-dev.20260707.2': + optional: true + + '@typescript/native-preview-linux-arm64@7.0.0-dev.20260707.2': + optional: true + + '@typescript/native-preview-linux-arm@7.0.0-dev.20260707.2': + optional: true + + '@typescript/native-preview-linux-x64@7.0.0-dev.20260707.2': + optional: true + + '@typescript/native-preview-win32-arm64@7.0.0-dev.20260707.2': + optional: true + + '@typescript/native-preview-win32-x64@7.0.0-dev.20260707.2': + optional: true + + '@typescript/native-preview@7.0.0-dev.20260707.2': + optionalDependencies: + '@typescript/native-preview-darwin-arm64': 7.0.0-dev.20260707.2 + '@typescript/native-preview-darwin-x64': 7.0.0-dev.20260707.2 + '@typescript/native-preview-linux-arm': 7.0.0-dev.20260707.2 + '@typescript/native-preview-linux-arm64': 7.0.0-dev.20260707.2 + '@typescript/native-preview-linux-x64': 7.0.0-dev.20260707.2 + '@typescript/native-preview-win32-arm64': 7.0.0-dev.20260707.2 + '@typescript/native-preview-win32-x64': 7.0.0-dev.20260707.2 + '@ungap/structured-clone@1.3.1': {} '@unrs/resolver-binding-android-arm-eabi@1.12.2':