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

Prepare for 0.16.0 release #2456

Merged
merged 10 commits into from
Jan 29, 2025
79 changes: 64 additions & 15 deletions waspc/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,65 @@
# Changelog

## Next
## 0.16.0

### 🎉 New Features and improvements

#### Env variables validation with Zod

Wasp now uses Zod to validate environment variables, allowing it to fail faster if something is misconfigured. This means you’ll get more relevant error messages when running your app with incorrect env variables.

You can also use Zod to validate your own environment variables. Here’s an example:

```ts
// src/env.ts
import * as z from 'zod'

import { defineEnvValidationSchema } from 'wasp/env'

export const serverEnvValidationSchema = defineEnvValidationSchema(
z.object({
STRIPE_API_KEY: z.string({
required_error: 'STRIPE_API_KEY is required.',
}),
})
)

// main.wasp
app myApp {
...
server: {
envValidationSchema: import { serverEnvValidationSchema } from "@src/env",
},
}
```

#### tsconfig.json alises work

TODO: @sodic

### Deployment docs upgrade

Based on feedback from our Discord community, we’ve revamped our deployment docs to make it simpler to deploy your app to production. We focused on explaining key deployment concepts, regardless of the deployment method you choose. We’ve added guides on hosting Wasp apps on your own servers, for example, how to use Coolify and Caprover for self-hosting. The Env Variables section now includes a comprehensive list of all available Wasp env variables and provides clearer instructions on how to set them up in a deployed app.

Check the updated deployment docs here: https://wasp-lang.dev/docs/deployment/intro

### ⚠️ Breaking Changes

- Renamed and split `deserializeAndSanitizeProviderData` to `getProviderData` and `getProviderDataWithPassword` so it's more explicit if the resulting data will contain the hashed password or not.
- You need to include `react-dom` and `react-router-dom` as deps in your `package.json` file. This ensures `npm` doesn't accidentally install React 19, which is not yet supported by Wasp.

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

### 🐞 Bug fixes

- We fixed Fly deployment using the Wasp CLI where the server app `PORT` was set incorrectly.

### 🔧 Small improvements

- Enabled strict null checks for the Wasp SDK which means that some of the return types are more precise now e.g. you'll need to check if some value is `null` before using it.

Big thanks to our community members who contributed to this release! @Bojun-Feng @dabrorius @komyg @NathanaelA @vblazenka

## 0.15.2

### 🐞 Bug fixes
Expand Down Expand Up @@ -57,29 +107,28 @@ page MainPage {
You can now write this:

```typescript
import { App } from "wasp-config";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto format


import { App } from 'wasp-config'

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

app.auth({
userEntity: 'User',
userEntity: "User",
methods: {
usernameAndPassword: {}
usernameAndPassword: {},
},
onAuthFailedRedirectTo: '/login',
})
onAuthFailedRedirectTo: "/login",
});

const mainPage = app.page('MainPage', {
const mainPage = app.page("MainPage", {
authRequired: true,
component: { import: 'MainPage', from: '@src/MainPage' },
})
app.route('RootRoute', { path: '/', to: mainPage })
component: { import: "MainPage", from: "@src/MainPage" },
});
app.route("RootRoute", { path: "/", to: mainPage });
```

To learn more about this feature and how to activate it, check out the [Wasp TS config docs](https://wasp-lang.dev/docs/general/wasp-ts-config).
Expand Down
32 changes: 32 additions & 0 deletions web/docs/migration-guides/migrate-from-0-15-to-0-16.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Migration from 0.15.X to 0.16.X
---

## What's new in 0.16.0?

TODO: write this part

## How to migrate?

To migrate your Wasp app from 0.15.X to 0.16.X, follow these steps:

### 1. Bump the Wasp version

Update the version field in your Wasp file to `^0.16.0`:

```wasp title="main.wasp"
app MyApp {
wasp: {
// highlight-next-line
version: "^0.16.0"
},
}
```

### 2. Update the `package.json` file

TODO: write this part

That's it!

You should now be able to run your app with the new Wasp 0.16.0.
Loading