Skip to content

Commit

Permalink
Update examples for 0.16.0 (#2466)
Browse files Browse the repository at this point in the history
  • Loading branch information
sodic authored Jan 24, 2025
1 parent d91b412 commit b81e6bc
Show file tree
Hide file tree
Showing 18 changed files with 182 additions and 85 deletions.
2 changes: 1 addition & 1 deletion examples/hackathon-submissions/main.wasp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app hackathonBetaSubmissions {
wasp: {
version: "^0.15.0"
version: "^0.16.0"
},
title: "Hackathon Submissions"
}
Expand Down
25 changes: 16 additions & 9 deletions examples/hackathon-submissions/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -20,6 +27,7 @@
"dom.iterable",
"esnext"
],
"skipLibCheck": true,
"allowJs": true,
"typeRoots": [
// This is needed to properly support Vitest testing with jest-dom matchers.
Expand All @@ -32,10 +40,9 @@
// 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"
},
"include": [
"src"
]
}
2 changes: 1 addition & 1 deletion examples/streaming/main.wasp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app streaming {
wasp: {
version: "^0.15.0"
version: "^0.16.0"
},
title: "streaming"
}
Expand Down
25 changes: 16 additions & 9 deletions examples/streaming/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -20,6 +27,7 @@
"dom.iterable",
"esnext"
],
"skipLibCheck": true,
"allowJs": true,
"typeRoots": [
// This is needed to properly support Vitest testing with jest-dom matchers.
Expand All @@ -32,10 +40,9 @@
// 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"
},
"include": [
"src"
]
}
2 changes: 1 addition & 1 deletion examples/thoughts/main.wasp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { App, ExtImport } from 'wasp-config'

const app = new App('Thoughts', {
title: 'Thoughts',
wasp: { version: '^0.15.0' }
wasp: { version: '^0.16.0' }
});

app.db({
Expand Down
49 changes: 45 additions & 4 deletions examples/thoughts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,48 @@
// =============================== IMPORTANT =================================
// This file is mainly used for Wasp IDE support.
//
// 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 :)
{
"files": [],
"references": [
{ "path": "./tsconfig.src.json" },
{ "path": "./tsconfig.wasp.json" }
"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.
"moduleResolution": "bundler",
// JSX support
"jsx": "preserve",
"strict": true,
// Allow default imports.
"esModuleInterop": true,
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"skipLibCheck": true,
"allowJs": true,
"typeRoots": [
// This is needed to properly support Vitest testing with jest-dom matchers.
// Types for jest-dom are not recognized automatically and Typescript complains
// about missing types e.g. when using `toBeInTheDocument` and other matchers.
"node_modules/@testing-library",
// Specifying type roots overrides the default behavior of looking at the
// node_modules/@types folder so we had to list it explicitly.
// Source 1: https://www.typescriptlang.org/tsconfig#typeRoots
// Source 2: https://github.com/testing-library/jest-dom/issues/546#issuecomment-1889884843
"node_modules/@types"
],
"outDir": ".wasp/out/user"
},
"include": [
"src"
]
}
2 changes: 1 addition & 1 deletion examples/todo-typescript/main.wasp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app TodoTypescript {
wasp: {
version: "^0.15.0"
version: "^0.16.0"
},
title: "ToDo TypeScript",

Expand Down
25 changes: 16 additions & 9 deletions examples/todo-typescript/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -20,6 +27,7 @@
"dom.iterable",
"esnext"
],
"skipLibCheck": true,
"allowJs": true,
"typeRoots": [
// This is needed to properly support Vitest testing with jest-dom matchers.
Expand All @@ -32,10 +40,9 @@
// 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"
},
"include": [
"src"
]
}
2 changes: 1 addition & 1 deletion examples/tutorials/TodoApp/main.wasp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app TodoApp {
wasp: {
version: "^0.15.0" // Pins the version of Wasp to use.
version: "^0.16.0" // Pins the version of Wasp to use.
},
title: "TodoApp", // Used as the browser tab title. Note that all strings in Wasp are double quoted!
auth: {
Expand Down
25 changes: 16 additions & 9 deletions examples/tutorials/TodoApp/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -20,6 +27,7 @@
"dom.iterable",
"esnext"
],
"skipLibCheck": true,
"allowJs": true,
"typeRoots": [
// This is needed to properly support Vitest testing with jest-dom matchers.
Expand All @@ -32,10 +40,9 @@
// 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"
},
"include": [
"src"
]
}
2 changes: 1 addition & 1 deletion examples/tutorials/TodoAppTs/main.wasp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app TodoApp {
wasp: {
version: "^0.15.0" // Pins the version of Wasp to use.
version: "^0.16.0" // Pins the version of Wasp to use.
},
title: "TodoApp", // Used as the browser tab title. Note that all strings in Wasp are double quoted!
auth: {
Expand Down
25 changes: 16 additions & 9 deletions examples/tutorials/TodoAppTs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -20,6 +27,7 @@
"dom.iterable",
"esnext"
],
"skipLibCheck": true,
"allowJs": true,
"typeRoots": [
// This is needed to properly support Vitest testing with jest-dom matchers.
Expand All @@ -32,10 +40,9 @@
// 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"
},
"include": [
"src"
]
}
2 changes: 1 addition & 1 deletion examples/waspello/main.wasp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app waspello {
wasp: {
version: "^0.15.0"
version: "^0.16.0"
},

title: "Waspello",
Expand Down
25 changes: 16 additions & 9 deletions examples/waspello/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -20,6 +27,7 @@
"dom.iterable",
"esnext"
],
"skipLibCheck": true,
"allowJs": true,
"typeRoots": [
// This is needed to properly support Vitest testing with jest-dom matchers.
Expand All @@ -32,10 +40,9 @@
// 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"
},
"include": [
"src"
]
}
2 changes: 1 addition & 1 deletion examples/waspleau/main.wasp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app waspleau {
wasp: {
version: "^0.15.0"
version: "^0.16.0"
},

title: "Waspleau",
Expand Down
Loading

0 comments on commit b81e6bc

Please sign in to comment.