Releases: blitz-js/blitz
v2.0.0-beta.1 OFFICIAL BLITZ 2.0 BETA
Announcing Blitz 2.0 BETA 🎉 🎉 🎉
Blitz is no longer an all-in-one framework but a full-stack toolkit for Next.js 🔥
Previously Blitz abstracted Next.js, but Blitz 2.0 is now a modular toolkit that plugs into any new or existing Next.js app. Blitz picks up where Next.js leaves off, providing battle-tested libraries and conventions for shipping and scaling worldwide apps
Going forward, our mission is to be the most trusted technical resource for rapidly building and scaling full-stack TypeScript apps. We're doing that through frontend-agnostic libraries that simplify complex app problems with minimal tradeoffs and through full-stack guides.
- You can see the full launch announcement here.
- You can read more about the pivot decision here: #3075.
- Read the docs: https://blitzjs.com
Upgrade Guide
If you have an existing Blitz.js app and would like to upgrade it to the Blitz 2.0, you can use our @blitzjs/codemod
package by running the following command in the root of your Blitz application:
npx @blitzjs/codemod upgrade-legacy
After running the command, your Blitz app will be upgraded to the Blitz 2.0 + Next.js setup. If you face any issues with the upgrade — let us know!
You can also check out the manual upgrade guide.
Try Blitz 2.0 Yourself With Just a Few Commands
Set Up Your Computer
You need Node.js 16 or newer. You can verify this by running node -v
in your terminal.
Install Blitz
Run yarn global add blitz
or npm install -g blitz
or pnpm add -g blitz
.
Generate a New App
blitz new myAppName
cd myAppName
blitz dev
View your brand new Next.js + Blitz 2.0 app at http://localhost:3000/
.
Blitz Packages
Blitz 2.0 consist of six packages: blitz
, @blitzjs/next
, @blitzjs/auth
, @blitzjs/rpc
, @blitzjs/codegen
. Read below to learn about each of them.
blitz
blitz
is our core package containing utilities and the base for all the Blitz packages and plugins. Blitz CLI is also a part of this package, including the blitz generate
command for code scaffolding.
Read the Blitz CLI docs.
Read the Blitz utilities docs.
@blitzjs/next
The @blitzjs/next
package exposes functions and components specific to the Next.js framework.
@blitzjs/auth
The package provides authentication and authorization. Works with any identity provider, including self-hosted username and password and third parties like Auth0.
@blitzjs/rpc
Blitz "Zero-API" data layer (Blitz RPC) is focused on making the communication between server and client seamless. It lets you import server code directly into your components instead of having to manually add API endpoints and manually do client-side fetching and caching.
@blitzjs/codemod
The @blitzjs/codemod
has an upgrade-legacy
codemod for upgrading the existing Blitz framework application to the new Blitz 2.0 + Next.js setup.
HUGE shout out to everyone who contributed to this release:
@Zeko369 @datner @anteprimorac @iDavidB @andreasasprou @the-bayer @chaiwattsw @prisis @oltdaniel @Trancever @edrickleong @ganeshmani @orionmiz @iojcde @noxify @siddhsuresh @saadaltabari @dillonraphael @flybayer
🙌 🙌 🙌
v2.0.0-alpha.71
v2.0.0-alpha.70
🐞 Patches
@blitzjs/codemod
- f88702c: Remove trailing comma when removing BlitzConfig from next.config.js & Fix codemod so if route (eg.
app/auth/pages
) convert to (eg.pages/
) instead of (eg.pages/auth
)
@blitzjs/generator
v2.0.0-alpha.69
🐞 Patches
@blitzjs/next
- a3c92cb: Allow using
RouteUrlObject
asredirect.destination
ingetStaticProps
andgetServerSideProps
@blitzjs/rpc
- 4902802: Add
getQueryData
utility to get an existing query's cached data
@blitzjs/codemod
- 86af6de: Wrap middlewares with
BlitzServerMiddleware
function with codemod - 72a332e: Wrap
blitz.config.ts
with thewithBlitz
function during the codemod step instead of creating a blanknext.config.js
file - 2d1482f: Allow codemod to finish if
cookiePrefix
is undefined. Then show an error at the end of the codemod output
@blitzjs/generator
v2.0.0-alpha.68
🐞 Patches
blitz
- 271c58a: Fix
Cannot find module "generate"
errors when using CLI - 630c718: Use internal branded Blitz logger for
@blitzjs/rpc
- f0ca738: Run Blitz codegen with
blitz dev
command - 41608c4: Fix Next suspense issue not being patched when creating a new app with Yarn as a package manager
@blitzjs/rpc
- 630c718: Use internal branded Blitz logger for
@blitzjs/rpc
@blitzjs/codemod
- 06427f6: Throw error if a detected
cookiePrefix
is undefined when runningupgrade-legacy
- f120f67: Add
DocumentProps
andDocumentContext
to theupgrade-legacy
import map - 8dfaad0: Set correct packages versions in
package.json
withupgrade-legacy
- cb55ed2: Fix
upgrade-legacy
to accept a self closingDocumentHead
in the_document
page
@blitzjs/generator
v2.0.0-alpha.67
v2.0.0-alpha.66
🐞 Patches
blitz
- 928e840: Fixes loading production env variables by default for blitz build command
- 240f3f3: Add BlitzServerMiddleware utility function to wrap middleware in blitz server file
- 55b1cb2: Runs the codegen on the blitz build command
- 4d7d126: Run
prisma generate
as ablitz codegen
step if "prisma" is found in project's dependencies - 890b0c0: Improve
blitz new
messaging and fix minor issues - 807a2b5: Fixes peer dependency warnings
- a3e6c49: Fixes the supports-color warning for pnpm
@blitzjs/auth
- a3e6c49: Fixes the supports-color warning for pnpm
@blitzjs/next
- ccb1af8: Avoid
invalid config detected
warnings by deleting"blitz"
key from next config object - 807a2b5: Fixes peer dependency warnings
- a3e6c49: Fixes the supports-color warning for pnpm
@blitzjs/rpc
- 807a2b5: Fixes peer dependency warnings
- a3e6c49: Fixes the supports-color warning for pnpm
- 9620ef6: moves zod to devDependencies
@blitzjs/generator
- 91aa535: Include
.env.test
file to the generator templates - 890b0c0: Improve
blitz new
messaging and fix minor issues - 807a2b5: Fixes peer dependency warnings
- a3e6c49: Fixes the supports-color warning for pnpm
- 065db25: Update new app templates to use blitz-rpc's resolver function
- f202aac: Mocks @blitzjs/auth instead of blitz inside the forgotPassword mutation test & hardcodes blitz package version types instead of just using the alpha tag.
v2.0.0-alpha.65
🐞 Patches
blitz
- dd5f517: Fix
enhancePrisma is undefined
errors by moving the utility function to a browser entry point