The fastest way to develop full-stack web apps with React & Node.js.
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] 3 months ago
Simplified Auth User API: Introduced a simpler API for accessing user auth fields (for example username
, email
, isEmailVerified
) directly on the user
object, eliminating the need for helper functions.
Improved the API for calling Operations (Queries and Actions) directly on both the client and the server.
Improved API for calling Operations (Queries and Actions) directly.
Auth Hooks: you can now hook into the auth process with onBeforeSignup
, onAfterSignup
hooks. You can also modify the OAuth redirect URL with onBeforeOAuthRedirect
hook.
app myApp {
...
auth: {
onBeforeSignup: import { onBeforeSignup } from "...",
onAfterSignup: import { onAfterSignup } from "...",
onBeforeOAuthRedirect: import { onBeforeOAuthRedirect } from "...",
},
}
Auth: you can now use Discord as a social auth provider (by @wardbox)
Using the Prisma Schema file directly: define your database schema in the schema.prisma
file and Wasp will use it to generate the database schema and Prisma client code.
Added the wasp db reset
command for resetting the database.
tsconfig.json
fileWasp 0.14.0 requires some changes to your tsconfig.json
file.
Visit the migration guide for details.
wasp
packageThe wasp
package is now built with strictBindCallApply
, alwaysStrict
, noImplicitThis
, and strictFunctionTypes
.
This is a breaking change only if you have manually set your tsconfig.json
's strict
field to false
and are relying on it being more permissive.
To fix the errors, enable the options listed above and make sure your code type checks.
This quirk is only temporary. You'll soon be able to use any tsconfig.json
options you want.
Track this issue for progress: https://github.com/wasp-lang/wasp/issues/1827
You can now call Queries directly from the client without dealing with
queryCacheKey
s. Wasp takes care of it under the hood:
Now:
const doneTasks = await getTasks({ isDone: true });
Before:
const doneTasks = await getTasks(getTasks.queryCacheKey, { isDone: true });
AuthUser
dataWe had to make a couple of breaking changes to reach the new simpler Auth API:
You don't need to use getUsername
to access the username:
getUsername
to access the username.user.identities.username?.id
.You don't need to use getEmail
to access the email:
getEmail
to access the email.user.identities.email?.id
.Better API for accessing providerData
:
user.identities.<provider>.<value>
for typed access.Better API for accessing getFirstProviderUserId
:
getFirstProviderUserId(user)
to get the ID.user.getFirstProviderUserId()
directly on the user object.You don't need to use findUserIdentity
any more:
findUserIdentity
to check which user identity exists.user.identities.<provider>
existence.These changes improve code readability and lower the complexity of accessing user's auth fields. Follow the detailed migration steps to update your project to 0.14.0.
Wasp now uses the schema.prisma
file to generate the database schema and Prisma client code. This means that you should move your database schema from the main.wasp
file to the schema.prisma
file.
This means that this entity in main.wasp
:
entity Task {=psl
id Int @id @default(autoincrement())
description String
isDone Boolean
userId Int
user User @relation(fields: [userId], references: [id])
psl=}
will move to the schema.prisma
file:
model Task {
id Int @id @default(autoincrement())
description String
isDone Boolean
userId Int
user User @relation(fields: [userId], references: [id])
}
Read more about the migration steps in the migration guide.
getUsername
, getEmail
etc.)These changes only apply to getting auth fields from the user
object you receive from Wasp, for example in the authRequired
enabled pages or context.user
on the server. If you are fetching the user and auth fields with your own queries, you can keep using most of the helpers. Read more about using the auth helpers.
tsconfig.json
to make sure IDEs don't underline import.meta.env
when users use client env vars.netlify.toml
to include the correct build path for the client app.useQuery
and useAction
hooks.getEmail
) to make them accept the minimal required user object.Published by github-actions[bot] 3 months ago
Read the pre-release docs here: https://wasp-docs-on-main.pages.dev/
Published by github-actions[bot] 4 months ago
Read the pre-release docs here: https://wasp-docs-on-main.pages.dev/
Published by github-actions[bot] 6 months ago
Published by github-actions[bot] 7 months ago
Improved how IDE auto-imports symbols from the wasp
package. If you have an existing project, add these lines to your tsconfig.json
to getter better IDE support:
{
"compilerOptions" {
"target": "esnext",
"moduleResolution": "bundler",
// ...
}
// ...
}
Published by github-actions[bot] 7 months ago
Wasp 0.13.0 switches away from using Passport for our OAuth providers in favor of Arctic from the Lucia ecosystem. This change simplifies the codebase and makes it easier to add new OAuth providers in the future.
This however, means that there are breaking changes in the way you define OAuth providers in your Wasp project.
Read the migration guide at https://wasp-lang.dev/docs/migrate-from-0-12-to-0-13 for more details.
WASP_SERVER_URL
environment variable and exposes it as serverUrl
in the server config which can be imported from wasp/server
.wasp/auth/types
no longer fail when building the web app.Published by github-actions[bot] 7 months ago
Published by github-actions[bot] 7 months ago
Published by github-actions[bot] 7 months ago
wasp/auth/types
no longer fail when building the web app.Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
This is a big update, introducing major changes that span the entirety of Wasp, specifically the new project structure and new Auth.
If your project is using an older version of Wasp, you will want to check out the detailed migration instructions at https://wasp-lang.dev/docs/migrate-from-0-11-to-0-12 .
The output of wasp new myProject
before 0.12.0:
.
βββ .gitignore
βββ main.wasp
βββ src
β βββ client
β β βββ Main.css
β β βββ MainPage.jsx
β β βββ react-app-env.d.ts
β β βββ tsconfig.json
β β βββ waspLogo.png
β βββ server
β β βββ tsconfig.json
β βββ shared
β β βββ tsconfig.json
β βββ .waspignore
βββ .wasproot
The output of wasp new myProject
with 0.12.0:
.
βββ .gitignore
βββ main.wasp
βββ package.json
βββ public
β βββ .gitkeep
βββ src
β βββ Main.css
β βββ MainPage.jsx
β βββ queries.ts
β βββ vite-env.d.ts
β βββ .waspignore
β βββ waspLogo.png
βββ tsconfig.json
βββ vite.config.ts
βββ .wasproot
The main differences are:
package.json
file.tsconfig.json
, vite.config.ts
, and public/
moved to the top dir.src/
directory.@src
(e.g., import foo from '@src/MainPage.jsx'
). The paths can no longer start with @server
or @client
.Before 0.12.0, authentication in Wasp was based on the User
model which the developer needed to set up properly and take care of the auth fields like email
or password
.
With 0.12.0, authentication is based on the auth models which are automatically set up by Wasp. You don't need to take care of the auth fields anymore, be it by adding them to the User
model or by adding whole new entities like SocialLogin
.
The User
model is now just a business logic model and you use it for storing the data that is relevant for your app.
In the background, Wasp is now using Lucia as the core auth library.
Operation (i.e., Queries and Actions) and Job names in .wasp
files must now begin with a lowercase letter: query getTasks {...}
, job sendReport {...}
.
Entity names in .wasp
files must now begin with an uppercase letter: entity Foo {...}
.
_waspCustomValidations
on the User
entity.So far, Wasp required a specific Node version that is compatible with the latest LTS Node (lately that was 18).
We relaxed that constraint so it now works with any Node version equal to or newer than the oldest LTS version that Wasp supports, meaning that now Wasp works with any Node version >= 18.
wasp new:ai
)While so far it was available only through the https://usemage.ai , Wasp AI is now also available via the wasp
CLI, enabling you to create a new Wasp app from nothing more than a title and a short description.
You can run it by picking AI as an option in the wasp new
wizard, or via wasp new:ai
which allows you to provide all the details via the command line (useful for more programmatic usage).
You need to provide your own OpenAI API token, but that also means you can choose which model to use for the code generation: e.g. you can use GPT-4 all the way, instead of the default GPT-4 + GPT-3 combo that https://usemage.ai uses.
Wasp now comes with a new template for kickstarting your apps, specifically SaaS apps: https://opensaas.sh/ .
This is the richest template for Wasp so far, with features like Stripe integration, admin dashboard, file uploading, blog (Astro), ...
You can choose it from the wasp new
's wizard.
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 9 months ago
Brings Wasp AI from the CLI, new Auth, and big changes in the project structure (restructuring).
Check out https://github.com/wasp-lang/wasp/tree/8e8f61073c42af5741ef9d404824ec1d7b7f3d96/waspc/examples/todo-typescript for an example of an app that works with it.
Docs, Wasp AI, starter templates, ... -> these all still need updating.
Published by github-actions[bot] 9 months ago
0.12 with new auth and AI, no restructuring yet, also not well tested.
Published by github-actions[bot] 11 months ago
You can now serve the client from a subdirectory. This is useful if you want to serve the client from a subdirectory of your domain, e.g. https://example.com/my-app/
.
To do this, you need to add the client.baseDir
property to your .wasp
file:
app todoApp {
// ...
client: {
baseDir: "/my-app",
},
}
migrations
dir.