Releases: blitz-js/blitz
v2.0.0-beta.12
🐞 Patches
blitz
- 3a602b6: Fix
blitz install
not working due to missingblitz/installer
dependency - f39ba1f: Allow passing custom templates to the
blitz generate
command. Extend thegenerate
command withcustom-templates
to provide an easy starting point for users to customize the default templates:blitz generate custom-templates
@blitzjs/generator
- f39ba1f: Allow passing custom templates to the
blitz generate
command. Extend thegenerate
command withcustom-templates
to provide an easy starting point for users to customize the default templates:blitz generate custom-templates
v2.0.0-beta.11
🐞 Patches
blitz
- 9db6c88: Fix
blitz --help
CLI command not being found - d98e4ba: Add
blitz routes
CLI command back to the toolkit - 9fe0cc5: Fix auth-related React hydration errors by not redirecting until after component mount.
- af58e2b: Add a global Blitz version check when generating a new Blitz project to ensure users use the latest Blitz.
- 2ade726: Add
blitz export
CLI command to the toolkit - 0edeaa3: Allow for custom page extensions for the wildcard blitz route. For example [...blitz].api.ts. For more information vist https://nextjs.org/docs/api-reference/next.config.js/custom-page-extensions
- 430f6ec: Only generate the Prisma client if it's not found in node_modules when running a blitz cli command.
- 15d22af: Add the
blitz console
CLI command back to the toolkit - aa34661: Fix invalidateQuery generating the wrong param when no param argument is passed
- 8e0c9d7: Migrate over recipe functionality from the legacy framework & expose recipe builder helper functions that find and modify next.config.js, blitz-server & blitz-client.
- e2c1889: Add client testing utilities and a sample test to a new blitz app template
@blitzjs/auth
- 9fe0cc5: Fix auth-related React hydration errors by not redirecting until after component mount.
@blitzjs/next
- 1742eb4: Fix prefetching infinite Blitz queries.
- 9fe0cc5: Fix auth-related React hydration errors by not redirecting until after the component mount
- e2c1889: Add client testing utilities and a sample test to a new blitz app template
- 25f4526: Treat API Route handler as a middleware. It allows the outer middlewares to wrap queries and mutations
@blitzjs/rpc
- 0edeaa3: Allow for custom page extensions for the wildcard blitz route. For example [...blitz].api.ts. For more information visit https://nextjs.org/docs/api-reference/next.config.js/custom-page-extensions
- aa34661: Fix invalidateQuery generating the wrong param when no param argument is passed
- 8e0c9d7: Migrate over recipe functionality from the legacy framework & expose recipe builder helper functions that find and modify next.config.js, blitz-server & blitz-client.
@blitzjs/codemod
- b3b4c21: Unwrap
invokeWithMiddleware
so the query or mutation is called directly when running the codemod - eb970f7: Fix detecting
blitz.config.(ts|js)
config file when running the codemod.
@blitzjs/generator
- 0473020: Update
prisma-ast
dependency to prevent Blitz generator from failing when Prisma keywords are used as model names - 824a9b5: Fix
no-floating-promises
lint errors after generating pages with Blitz generator by addingawait
torouter.push
calls in the templates - d6717b9: Load schema.prisma path from
package.json
instead of assuming it'sdb/schema.prisma
- bf4aaf1: Move
useCurrentUser
hook fromcore/hooks
tousers/hooks
folder - b43c1a8: Remove the random user ([email protected]) & use the user's default git account when committing a newly generated blitz project.
- 83281a8: Fix eslint config in new JavaScript app templates
- bd09db7: Remove
views
property fromSession.PublicData
intypes.ts
file - e2c1889: Add client testing utilities and a sample test to a new blitz app template
v2.0.0-beta.4
🐞 Patches
blitz
- c213d52: Fix issue with the route name that's generated for nested routes in @blitzjs/rpc. This was causing issues for windows users.
- 0b94a45: Upgrade superjson to the latest version
- 161270e: Only run the prisma generate command when the schema file changes.
@blitzjs/auth
- 713aead: Allow specifying custom strategy name in Blitz's passport adapter
@blitzjs/next
- 69fb280: Allow setting static page properties (e.g.
getInitialProps
) on the App component - 0b94a45: Upgrade superjson to the latest version
@blitzjs/rpc
- c213d52: Fix issue with the route name that's generated for nested routes in @blitzjs/rpc. This was causing issues for windows users.
- 0b94a45: Upgrade superjson to the latest version
- f6dac09: Improve RPC logging: print
resolverName()
insetad of/resolverName()
@blitzjs/codemod
- d3403cf: Show file path on error when running the upgrade legacy codemod.
- 74a4ce8: Add
AuthenticatedSessionContext
to theupgrade-legacy
codemod import map - 43e65cf: Remove TypeScript type annotations from
next.config.js
(a JavaScript file) in theupgrade-legacy
codemod. - da914c9: Convert import statements to require when creating the next.config.js file in the codemod
@blitzjs/generator
- 7498aef: Fix tsconfig.json referencing blitz-env.d.ts insetad of next-env.d.ts in new app templates
- 22344d0: New apps generated by the cli was missing the getLayout function in _app, so when you used the getLayout property on your page, it didn't render. You'll need to manually update your _app if you generated an app with blitz v2.
- 8fa9a56: Fix eslint and types setup in minimal app template
- c53978d: Fix upgrade-legacy
Update imports
step — importgetAntiCSRFToken
andAuthenticatedMiddlewareCtx
from correct locations - a84b8de: Remove
-cookie-prefix
appended to thecookiePrefix
config property in the new app template. It will also fix auth and CSRF issues for users upgrading from a legacy framework.
v2.0.0-beta.3
🐞 Patches
blitz
- 638f231: Prevent
Minified react error #419
in production
@blitzjs/codemod
- 2313fa6: Fix upgrade-legacy codemod replacing identifiers with an invalid value. Previously new values were hardcoded to
NextApiRequest
. Now we're using correct values provided asreplaceIdentifiers
function argument. - 1bf185d: Add a new codemod step to update the .eslintrc.js file
@blitzjs/generator
- b72d121: Add vscode debugging configuration to new app templates
v2.0.0-beta.2
🐞 Patches
blitz
-
db7233d: Bump react, react-dom, @types/react and next versions
This fixes a console warning:
Warning: Received
truefor a non-boolean attribute
global.
when usingstyled-jsx
. Versions bump also fixes React Hydration error that happens on and off when usingredirectAuthenticatedTo
. -
0936cb3: Patch Next.js Suspense issue in all node environments. Previously we only patched it in the
development
environment, but now we make sure it gets patched in theproduction
env (with theblitz build
command) as well. -
3f9fe8f: Exit the CLI process after
blitz new
command is finished
@blitzjs/auth
- db7233d: Bump react, react-dom, @types/react and next versions
@blitzjs/next
- db7233d: Bump react, react-dom, @types/react and next versions
@blitzjs/rpc
- db7233d: Bump react, react-dom, @types/react and next versions
@blitzjs/codemod
-
db7233d: Bump react, react-dom, @types/react and next versions
-
a3b5fdd: Change ES6 import for
withBlitz
during the codemod to the require syntax. -
ebfb562: Add
Script
as a default import from next.js during the codemod.
@blitzjs/generator
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