From f390cd1fa9d270c324bd7dcf3b3e77bb1a4e8a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Tue, 21 Jan 2025 23:15:34 +0100 Subject: [PATCH] Update headless tests and waspc.cabal --- .../examples/todoApp/todoApp.wasp | 2 +- .../examples/todoApp/tsconfig.json | 29 +++++++++++++------ waspc/waspc.cabal | 3 +- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/waspc/headless-test/examples/todoApp/todoApp.wasp b/waspc/headless-test/examples/todoApp/todoApp.wasp index 457d46d560..a7c7850339 100644 --- a/waspc/headless-test/examples/todoApp/todoApp.wasp +++ b/waspc/headless-test/examples/todoApp/todoApp.wasp @@ -1,6 +1,6 @@ app todoApp { wasp: { - version: "^0.15.0" + version: "^0.16.0" }, title: "ToDo App", auth: { diff --git a/waspc/headless-test/examples/todoApp/tsconfig.json b/waspc/headless-test/examples/todoApp/tsconfig.json index 4932b229a0..e8f2a3eec6 100644 --- a/waspc/headless-test/examples/todoApp/tsconfig.json +++ b/waspc/headless-test/examples/todoApp/tsconfig.json @@ -1,11 +1,18 @@ // =============================== IMPORTANT ================================= +// This file is mainly used for Wasp IDE support. // -// This file is only used for Wasp IDE support. You can change it to configure -// your IDE checks, but none of these options will affect the TypeScript -// compiler. Proper TS compiler configuration in Wasp is coming soon :) +// Wasp will compile your code with slightly different (less strict) compilerOptions. +// You can increase the configuration's strictness (e.g., by adding +// "noUncheckedIndexedAccess": true), but you shouldn't reduce it (e.g., by +// adding "strict": false). Just keep in mind that this will only affect your +// IDE support, not the actual compilation. +// +// Full TypeScript configurability is coming very soon :) { "compilerOptions": { "module": "esnext", + // Needed because this is used as a project reference. + "composite": true, "target": "esnext", // We're bundling all code in the end so this is the most appropriate option, // it's also important for autocomplete to work properly. @@ -20,6 +27,7 @@ "dom.iterable", "esnext" ], + "skipLibCheck": true, "allowJs": true, "typeRoots": [ // This is needed to properly support Vitest testing with jest-dom matchers. @@ -32,10 +40,13 @@ // Source 2: https://github.com/testing-library/jest-dom/issues/546#issuecomment-1889884843 "node_modules/@types" ], - // Since this TS config is used only for IDE support and not for - // compilation, the following directory doesn't exist. We need to specify - // it to prevent this error: - // https://stackoverflow.com/questions/42609768/typescript-error-cannot-write-file-because-it-would-overwrite-input-file - "outDir": ".wasp/phantom" - } + "outDir": ".wasp/out/user", + "paths" : { + "@util": ["./src/util.js"], + "@components/*": ["./src/components/*"], + } + }, + "include": [ + "src" + ] } diff --git a/waspc/waspc.cabal b/waspc/waspc.cabal index 2d22d2fd79..d8af354554 100644 --- a/waspc/waspc.cabal +++ b/waspc/waspc.cabal @@ -6,7 +6,7 @@ cabal-version: 2.4 -- Consider using hpack, or maybe even hpack-dhall. name: waspc -version: 0.15.2 +version: 0.16.0 description: Please see the README on GitHub at homepage: https://github.com/wasp-lang/wasp/waspc#readme bug-reports: https://github.com/wasp-lang/wasp/issues @@ -304,6 +304,7 @@ library Wasp.Generator.NpmInstall Wasp.Generator.NpmInstall.Common Wasp.Generator.NpmInstall.InstalledNpmDepsLog + Wasp.Generator.ImportPathAlias Wasp.Generator.SdkGenerator Wasp.Generator.SdkGenerator.Auth.AuthFormsG Wasp.Generator.SdkGenerator.Auth.EmailAuthG