MyGit

v0.15.0

wasp-lang/wasp

版本发布时间: 2024-10-11 02:00:30

wasp-lang/wasp最新发布版本:v0.15.2(2024-11-20 03:53:43)

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

🔧 Small improvements

Community contributions by @Case-E @therumbler

相关地址:原始地址 下载(tar) 下载(zip)

1、 wasp-linux-x86_64.tar.gz 110.64MB

2、 wasp-macos-x86_64.tar.gz 84.71MB

查看:2024-10-11发行的版本