Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wasp 0.15.0 migration docs #2301

Merged
merged 15 commits into from
Oct 4, 2024
25 changes: 25 additions & 0 deletions waspc/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## 0.15.0

### 🎉 New Features

- Upgrade to the latest Prisma version which makes Wasp faster!
- Upgrade to the latest React Router version which sets us up for some cool new features in the future.

### ⚠️ Breaking Changes

There are some breaking changes with React Router 6 which will require you to update your code.

Read more about them in the migration guide: https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15

### 🐞 Bug fixes

- Allow setting a custom server URL when deploying to Fly.io. (by @Case-E)
- If the user uses native DB types for the `userEntity`, Wasp will use them correctly.

### 🔧 Small improvements

- Enable users to use Mailgun's EU region by setting the `MAILGUN_API_URL` env variable.
- Validate `userEntity` ID field's `@default` attribute.

Community contributions by @Case-E @therumbler

## 0.14.2 (2024-09-09)

Updated GPT models used in Wasp AI to latest models, since 3.5 are getting deprecated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Migration from 0.11.X to 0.12.X
---

import { EmailPill, UsernameAndPasswordPill, GithubPill, GooglePill } from "./auth/Pills";
import { EmailPill, UsernameAndPasswordPill, GithubPill, GooglePill } from "../auth/Pills";

:::note Migrating to the latest version

Expand Down Expand Up @@ -71,9 +71,9 @@ The main differences are:
no longer start with `@server` or `@client`.
- Your project now features a top-level `public` dir. Wasp will publicly serve
all the files it finds in this directory. Read more about it
[here](/project/static-assets.md).
[here](../project/static-assets.md).

Our [Overview docs](./tutorial/02-project-structure.md) explain the new
Our [Overview docs](../tutorial/02-project-structure.md) explain the new
structure in detail, while this page provides a [quick guide](#migrating-your-project-to-the-new-structure) for migrating existing
projects.

Expand Down Expand Up @@ -160,7 +160,7 @@ Auth field customization is no longer possible using the `_waspCustomValidations

:::

You can read more about the new auth system in the [Accessing User Data](./auth/entities) section.
You can read more about the new auth system in the [Accessing User Data](../auth/entities) section.

## How to Migrate?

Expand Down Expand Up @@ -597,7 +597,7 @@ You can follow these steps to migrate to the new auth system (assuming you alrea

If you want to properly type the `profile` object, we recommend you use a validation library like Zod to define the shape of the `profile` object.

Read more about this and the `defineUserSignupFields` function in the [Auth Overview - Defining Extra Fields](./auth/overview.md#1-defining-extra-fields) section.
Read more about this and the `defineUserSignupFields` function in the [Auth Overview - Defining Extra Fields](../auth/overview.md#1-defining-extra-fields) section.

</TabItem>
</Tabs>
Expand Down Expand Up @@ -642,7 +642,7 @@ You should see the new `Auth`, `AuthIdentity` and `Session` tables in your datab

Instead, you can now use `getUsername(user)` to get the username obtained from Username & Password auth method, or `getEmail(user)` to get the email obtained from Email auth method.

Read more about the helpers in the [Accessing User Data](auth/entities#accessing-the-auth-fields) section.
Read more about the helpers in the [Accessing User Data](../auth/entities#accessing-the-auth-fields) section.

1. Finally, **check that your app now fully works as it worked before**. If all the above steps were done correctly, everything should be working now.

Expand Down Expand Up @@ -693,7 +693,7 @@ Your app should be working correctly and using new auth, but to finish the migra

After doing the steps above successfully locally and making sure everything is working, it is time to push these changes to the deployed app again.

_Deploy the app again_, either via `wasp deploy` or manually. Check our [Deployment docs](advanced/deployment/overview.md) for more details.
_Deploy the app again_, either via `wasp deploy` or manually. Check our [Deployment docs](../advanced/deployment/overview.md) for more details.

The database migrations will automatically run on successful deployment of the server and delete the now redundant auth-related `User` columns from the database.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Follow the steps below to migrate:

If you are migrating a deployed app, you will need to define the `WASP_SERVER_URL` server env variable in your deployment environment.

Read more about setting env variables in production [here](./project/env-vars#defining-env-vars-in-production).
Read more about setting env variables in production [here](../project/env-vars#defining-env-vars-in-production).
:::

2. **Update the redirect URLs** for the OAuth providers
Expand All @@ -64,7 +64,7 @@ Follow the steps below to migrate:
</TabItem>
</Tabs>

Check the new redirect URLs for [Google](./auth/social-auth/google.md#3-creating-a-google-oauth-app) and [GitHub](./auth/social-auth/github.md#3-creating-a-github-oauth-app) in Wasp's docs.
Check the new redirect URLs for [Google](../auth/social-auth/google.md#3-creating-a-google-oauth-app) and [GitHub](../auth/social-auth/github.md#3-creating-a-github-oauth-app) in Wasp's docs.

3. **Update the `configFn`** for the OAuth providers

Expand Down Expand Up @@ -129,7 +129,7 @@ Follow the steps below to migrate:
</TabItem>
</Tabs>

Wasp now directly forwards what it receives from the OAuth providers. You can check the data format for [Google](./auth/social-auth/google.md#data-received-from-google) and [GitHub](./auth/social-auth/github.md#data-received-from-github) in Wasp's docs.
Wasp now directly forwards what it receives from the OAuth providers. You can check the data format for [Google](../auth/social-auth/google.md#data-received-from-google) and [GitHub](../auth/social-auth/github.md#data-received-from-github) in Wasp's docs.

That's it!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ All that's left to do is migrate the database.
To avoid type errors, it's best to take care of database migrations after you've migrated the rest of the code.
So, just keep reading, and we will remind you to migrate the database as [the last step of the migration guide](#migrate-the-database).

Read more about the [Prisma Schema File](./data-model/prisma-file.md) and how Wasp uses it to generate the database schema and Prisma client.
Read more about the [Prisma Schema File](../data-model/prisma-file.md) and how Wasp uses it to generate the database schema and Prisma client.

### Migrate how you access user auth fields

Expand Down Expand Up @@ -659,8 +659,8 @@ wasp db migrate-dev

This command generates the Prisma client based on the `schema.prisma` file.

Read more about the [Prisma Schema File](./data-model/prisma-file.md) and how Wasp uses it to generate the database schema and Prisma client.
Read more about the [Prisma Schema File](../data-model/prisma-file.md) and how Wasp uses it to generate the database schema and Prisma client.

That's it!

You should now be able to run your app with the new Wasp 0.14.0. We recommend reading through the updated [Accessing User Data](./auth/entities/entities.md) section to get a better understanding of the new API.
You should now be able to run your app with the new Wasp 0.14.0. We recommend reading through the updated [Accessing User Data](../auth/entities/entities.md) section to get a better understanding of the new API.
Loading
Loading