Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Blitz Toolkit Beta v24
Support for Next 13
Blitz does not require any breaking changes with the major upgrade of
Next 12
➔Next 13
for usage with the pages directory. You can even continue to use the old blitz layout with all your files in app. But you'll need to rename that directory if you want to use the new Next.js app router.Read More about usage of Blitz Toolkit with Next 13
cadefb8 & 37aeaa7: Support for Next 13 App directory (beta)
From this release, the blitz toolkit will work out of the box with react server components.
Here are the highlights:
getBlitzCtx
to access the auth context in server componentsuseAuthenticatedBlitzContext
to provide authorization utilities for server componentsBlitzProvider
to be wrapped in theRootLayout
present in the (root)/layout.ts file.invoke
method to work when called inside a React Server ComponentPatch for Next 13.2 Suspense Error
acc07ce: This updates the suspense patch to work with Next.js 13.2+. Hopefully, soon we can stop patching once Next.js catches up with all the other frameworks and properly exposes the onRecoverableError react hook.
🔨 Breaking Changes
9529dbd: Introducing a new import path for the Blitz wrapper
SecurePassword
to fully decouple the library from@blitzjs/auth
Change to be made
Automatic Upgrade
Automatically upgrade using codemod
(Make sure to git commit before running this command to avoid losing changes)
🚀 New Features
6f18cbd: Next Auth Adapter
Blitz now provides an adapter that allows you to use any NextAuth Provider with Blitz session management in any Nextjs application.
Blitz session management gives you a lot more flexibility & control than NextAuth does.
Usage
Read More here
ea7561b: Blitz Generator Overhaul
The Blitz generator has been completely overhauled to be more flexible, customizable and easier to use.
Credits
The comes as a cumulative effort from the work started by @maastrich in #2134 then continued and enhanced by @roesh in #2679 and finally fixed and polished by @siddhsuresh in #3869 .
Changes/Features
> blitz generate model [fieldName]:[type]:[attribute]
Usage
The generate command can also be run multiple times to add more fields to the model. The generator will then mention the changes that will be made to the model and ask for confirmation before proceeding.
ea7561b: New
schema.ts
file will be generated with the requiredzod
schemas that can be used independently with the mutations, queries and components.This fixes the problem of not being able to import the schemas defined in the mutations due to the RPC compilation
Security Fixes
6e88a84: Fixed security vulnerabilities in passport-adapter by upgrading passport and jsonwebtoken.
Testing Utility Fixes
cadefb8: Fix failing tests due to the error NextRouter is not mounted in next 13 blitz apps.
Template Fixes
enum
issue with postgresql Prisma 4.6.0 drops and recreates enum field when runningdb
push even if the field has not changed Prisma 4.6.0 drops and recreates enum field when running db push even if the field has not changed prisma/prisma#16180Credits
This release was made possible by the following contributors:
@flybayer, @siddhsuresh, @noxify, @tordans, @Vandivier, @exKAZUu