Skip to content

v0.15.0

Compare
Choose a tag to compare
@github-actions github-actions released this 10 Oct 18:00
· 30 commits to main since this release

0.15.0

🎉 New Features and improvements

Write your app config in TypeScript (preview feature)

Wasp 0.15.0 ships a preview feature that lets you define your app in main.wasp.ts using TypeScript instead of in main.wasp using the Wasp DSL.

So, instead of this:

app TodoApp {
  wasp: {
    version: "^0.15.0"
  },
  title: "TodoApp",
  auth: {
    userEntity: User,
    methods: {
      usernameAndPassword: {}
    },
    onAuthFailedRedirectTo: "/login"
  }
}

route RootRoute { path: "/", to: MainPage }
page MainPage {
  authRequired: true,
  component: import { MainPage } from "@src/MainPage"
}

You can now write this:

improt { App } from 'wasp-config'

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

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

const mainPage = app.page('MainPage', {
  authRequired: true,
  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.

⚠️ Breaking Changes

There are some breaking changes with React Router 6 which will require you to update your code.
Also, the new version of Prisma may cause breaking changes depending on how you're using it.

Read more about breaking changes 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

  • 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.
  • 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