Skip to content

Releases: blitz-js/blitz

v2.0.0-beta.12

13 Oct 06:04
67de028
Compare
Choose a tag to compare

🐞 Patches

blitz

  • 3a602b6: Fix blitz install not working due to missing blitz/installer dependency
  • f39ba1f: Allow passing custom templates to the blitz generate command. Extend the generate command with custom-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 the generate command with custom-templates to provide an easy starting point for users to customize the default templates: blitz generate custom-templates

v2.0.0-beta.11

11 Oct 09:50
58bb38f
Compare
Choose a tag to compare

🐞 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

@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 adding await to router.push calls in the templates
  • d6717b9: Load schema.prisma path from package.json instead of assuming it's db/schema.prisma
  • bf4aaf1: Move useCurrentUser hook from core/hooks to users/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 from Session.PublicData in types.ts file
  • e2c1889: Add client testing utilities and a sample test to a new blitz app template

v2.0.0-beta.4

13 Sep 19:24
Compare
Choose a tag to compare

🐞 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 the upgrade-legacy codemod import map
  • 43e65cf: Remove TypeScript type annotations from next.config.js (a JavaScript file) in the upgrade-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 — import getAntiCSRFToken and AuthenticatedMiddlewareCtx from correct locations
  • a84b8de: Remove -cookie-prefix appended to the cookiePrefix 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

22 Aug 22:10
49aaaae
Compare
Choose a tag to compare

🐞 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 as replaceIdentifiers 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

18 Aug 12:24
000bc23
Compare
Choose a tag to compare

🐞 Patches

blitz

  • db7233d: Bump react, react-dom, @types/react and next versions

    This fixes a console warning: Warning: Receivedtruefor a non-boolean attributeglobal. when using styled-jsx. Versions bump also fixes React Hydration error that happens on and off when using redirectAuthenticatedTo.

  • 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 the production env (with the blitz 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

  • db7233d: Bump react, react-dom, @types/react and next versions

  • eb97156: Add BlitzPage types to auth pages in new app template

  • 8ada2c2: Include ResetPasswordPage in new app template

v2.0.0-beta.1 OFFICIAL BLITZ 2.0 BETA

15 Aug 12:32
6eb5bc8
Compare
Choose a tag to compare

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.

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

  1. blitz new myAppName
  2. cd myAppName
  3. 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.

Read the docs.

@blitzjs/auth

The package provides authentication and authorization. Works with any identity provider, including self-hosted username and password and third parties like Auth0.

Read the docs.

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

Read the docs.

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

Read the docs.


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

14 Aug 13:58
8a0a97b
Compare
Choose a tag to compare
v2.0.0-alpha.71 Pre-release
Pre-release

🐞 Patches

@blitzjs/generator

  • 176c7b8: Use correct path for log utilities import

v2.0.0-alpha.70

12 Aug 18:07
8b75557
Compare
Choose a tag to compare
v2.0.0-alpha.70 Pre-release
Pre-release

🐞 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

  • 4656e6e: Print model that was added or updated in schema.prisma after running the model generator
  • 1e0ec7a: Add BlitzPage type to Home pages in new app templates

v2.0.0-alpha.69

12 Aug 11:38
8b9ad3f
Compare
Choose a tag to compare
v2.0.0-alpha.69 Pre-release
Pre-release

🐞 Patches

@blitzjs/next

  • a3c92cb: Allow using RouteUrlObject as redirect.destination in getStaticProps and getServerSideProps

@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 the withBlitz function during the codemod step instead of creating a blank next.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

  • e2fac29: Add the blitz generate command to the toolkit
  • 6baab19: Add type checking to next.config.js files in new app templates
  • 37623a4: Fix typo in a next.config.js file name

v2.0.0-alpha.68

10 Aug 08:37
0bc107f
Compare
Choose a tag to compare
v2.0.0-alpha.68 Pre-release
Pre-release

🐞 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 running upgrade-legacy
  • f120f67: Add DocumentProps and DocumentContext to the upgrade-legacy import map
  • 8dfaad0: Set correct packages versions in package.json with upgrade-legacy
  • cb55ed2: Fix upgrade-legacy to accept a self closing DocumentHead in the _document page

@blitzjs/generator

  • 70b334a: Remove trailing comma from tsconfig.json file in the new app template
  • dd299ae: Add ts-jest to dependencies in new app templates
  • 078fe47: Add @testing-library/jest-dom to new app dependencies