Skip to content

Releases: blitz-js/blitz

v0.38.2

24 Jun 16:01
Compare
Choose a tag to compare

🐞 Patches

  • Upgrade to Next.js 11.0.1: #2526
    • Main fix is support for svgr
  • Fix prefetched dehydrated state to support Dates, Maps, etc: #2512
  • Fix blitz db seed to print stack traces for any errors: #2528
  • Fix built in errors like RedirectError and AuthenticationError to not log as "uncaught" in browser console: #2522

Internal Meta Changes

Credits

Huge thanks to @Skn0tt, @koolii, and @Cristy94 for helping!

v0.38.1

19 Jun 23:28
Compare
Choose a tag to compare

🐞 Patches

  • Fix blitz generate /new page does not use Routes: #2501
  • Fix validateZodSchema() to pass if schema undefined: #2511
  • Fix blitz generate to regenerate the Routes manifest: #2504
  • Add support for custom messages and icons in recipes: #2510
  • Fix so that npm scripts don't run on blitz install recipes: #2498
  • Fix lint warning, unused path in generated api routes: #2513
  • Fix browser error when using prisma.$use(): #2514

Internal Meta Changes

Credits

Huge thanks to @dbachrach, @ntgussoni, @prisis, and @benjakugler96 for helping!

v0.38.0

17 Jun 13:47
Compare
Choose a tag to compare

💥 Breaking Changes

  • Blitz now provides an optimized <ErrorBoundary> component : #2480
    1. Remove react-error-boundary from your package.json
    2. Update all imports of as shown here:
      -import {ErrorBoundary} from "react-error-boundary"
      +import {ErrorBoundary} from "blitz"
    3. You can optionally remove the resetKeys={[router.asPath]} prop because we now automatically reset on route change

🚀 New Features

  • Upgrade to Next.js 11: #2489
    • Adds <Script> Read the docs
    • Adds automatic size detection for local images (don't have to set width/height props on
    • Webpack 5 now used by default
    • blitz build will now fail if eslint errors are detected (can be disabled)
  • Change blitz eslint config to use the new eslint-config-next package from Next.js 11
  • Add <ErrorBoundary> component into core: #2480
  • Add validateZodSchema() API for better form errors: #2441
  • Add formatZodError() utility: #2494
  • Add setPublicDataForUser() — useful for updating the role of another user: #2473
  • Add RedirectError: #2483

🐞 Patches

  • Fix BlitzConfig type to allow extra fields: #2471
  • Fix pages to never render if Page.authenticate=true and logged out: #2476
  • Rename DISABLE_CSRF_PROTECTION to DANGEROUSLY_DISABLE_CSRF_PROTECTION: 7685629
  • Fix broken vercel deployments: #2479
  • Fix Page.authenticate = {redirect: '/login';} not working correctly on logout AND add RedirectError: #2483
  • Fix edit page generated by blitz generate to not have buggy behavior: #2487
  • Fix bug with <Image> and SSR for configured domains: #2474
  • Change all user facing references of next.js to blitz.js: #2438

⚡️ Changes to the New App Template

  • Use validateZodSchema() in <Form> #2441
  • Move dev dependencies to devDependencies in package.json (better for Docker): #2475
  • Upgrade react@alpha react-dom@alpha: 1c256c9

Internal Meta Changes

Credits

Huge thanks to @swinner2, @lksnmnn, @dangreaves, @dbachrach, @mabadir, @ashikka, and @kivi for helping!

v0.37.0

08 Jun 18:37
Compare
Choose a tag to compare

🚀 New Features

🐞 Patches

  • Fix webpack 5 support (Webpack 5 now used by default): #2453
  • Fix Prisma @@Map in Enums break the model generator: #2445
  • Remove unneeded cd message during blitz install in some cases: #2451
  • Fix CSRF 401 errors for HEAD requests: #2443
  • Fix Routes manifest for pages with parent & child relationships: #2424
  • Fix auth & middleware not working on Vercel (No longer need the path.resolve workaround): #2463
  • Fix to not build custom server during blitz start: #2408
  • Fix one part of pnp issues: #2464

⚡️ Changes to the New App Template

  • Update Prisma and React dependencies: #2462

Internal Meta Changes

Credits

Huge thanks to @markhughes, @MrLeebo, @max-programming, @sebastianhoitz, @frankiesardo, and @mabadir for helping!

v0.36.4

02 Jun 17:23
Compare
Choose a tag to compare

🐞 Patches

  • Fix so blitz new always generates valid cookiePrefix: #2427
  • Add couple missing dependencies to @blitzjs/cli package: #2439
  • Add helpful error when trying blitz export with blitz auth: #2435
  • Add debug to blitz package: #2426

Internal Meta Changes

Credits

Huge thanks to @swinner2 and @AntoineGuestin for helping!

v0.36.3

29 May 22:49
Compare
Choose a tag to compare

🐞 Patches

⚡️ Changes to the New App Template

  • Fix zod bug on /reset-password page closes: #2414: 8fb8608

v0.36.2

28 May 21:18
Compare
Choose a tag to compare

💥 Breaking Changes

  • blitz install now requires this version or later because of a bug fix for npm users: #2404

🚀 New Features

  • Add support for nonce and crossOrigin in BlitzScript: #2377
  • Upgrade templates to work with Zod v3: #2375
  • Add BlitzConfig type and add it to newapp template: #2411

🐞 Patches

  • Upgrade nextjs to 10.2.3: #2409
  • Fix bug: cannot find module next/constants: #2402
  • Upgrade react-query and Fix CancelledError when clicking Logout: #2406
  • Fix queries & mutations to work with trailing slash config: #2392

Internal Meta Changes

Credits

Huge thanks to @markhughes, @JuanM04, @timbooker, and @guoqqqi for helping!

v0.35.2

26 May 21:39
Compare
Choose a tag to compare

🐞 Patches

  • Remove debug log from cli: 719d867

⚡️ Changes to the New App Template

  • Fix typescript issue in forgotPassword.test.ts: 7fdd07e

Internal Meta Changes

Credits

Huge thanks to @mabadir for helping!

v0.35.1

26 May 21:16
Compare
Choose a tag to compare

🐞 Patches

  • Only build blitz config when needed and Fix blitz.config.js not found error: #2389
  • Fixed blitz compile bug when noPropertyAccessFromIndexSignature is true: #2385
  • Allow passing Route Manifest result to Page.authenticate.redirectTo: #2359
  • Fix HEAD requests 'Cannot read property '$authorize' of undefined': #2364

👩‍🍳 Recipes

  • Fix Regression on Tailwind Recipe purging in production: #2383

Internal Meta Changes

Credits

Huge thanks to @Skn0tt, @Dipeshwagle, @nimashoghi, and @benbender for helping!

v0.35.0

17 May 22:57
Compare
Choose a tag to compare

💥 Breaking Changes

  • Use cookie prefix from blitz.config.js instead of package.json name field: #2311
    • To Update: set cookiePrefix in blitz.config.js to the same value as your package.json#name field:
    • Your app will work fine without setting cookiePrefix, but all users will be logged out on first deployment if cookiePrefix is empty or has a different value than your current package.json#name field.
// blitz.config.js
module.exports = {
  middleware: [
    sessionMiddleware({
+    cookiePrefix: 'my-app-name',
      isAuthorized: simpleRolesIsAuthorized,
    }),
  ],
}

🚀 New Features

  • Update Next.js to 10.2.0: #2285
  • Add support for blitz.config.ts: #2283
  • Add Typescript & esmodule support and hot reloading to custom servers: #2255
  • Allow useQuery to run during SSR or SSG: #1940
  • Add ability to increase bodyParser size for queries & mutations: #2328
  • Allow using Route Manifest for Page.redirectAuthenticatedTo: #2243
  • Enable proxy support for cli/install: #2264
  • Add experimental.initServer hook for running code on server start: #2256
  • For building Recipes: New schema.prisma transform utilities: #2169

🐞 Patches

  • Fix generators not support string ids: #2267
  • Fix optional catch-all handling in routes codegen: #2290
  • Fix inability to install recipe: #2297
  • Fix can't install recipes: #2307
  • Improve recipe install log message: 2d48782
  • Add helpful message when request is missing the anti-csrf header: #2113
  • Fix useInfiniteQuery return type when suspense is disabled: #2312
  • Deserialize SuperJSON-ed pageProps before passing to dehydratedState: #2281
  • Fix Routes.X is not a function when inside a monorepo: 79ca87e
  • Fix blitz new TypeError: Cannot convert undefined or null #2340

⚡️ Changes to the New App Template

  • Set Prettier as default formatter for VS Code users: #2266
  • Add a <Suspense> boundary to _app.tsx: #2277
  • Update global.d.ts to reference types from nextjs: #1995
  • Update TypeScript Default Config: Safety for indexAccess: #2291
  • move all devDependencies to regular dependencies: #2325

👩‍🍳 Recipes

  • Adding JIT mode for Tailwind recipe: #2304
  • Adds bumbag recipe: #2298

Internal Meta Changes

Credits

Huge thanks to @mabadir, @MrLeebo, @jxe, @Skn0tt, @mubaidr, @kirakik, @adblanc, @acornellier, @fernvilla, @silicontwin, @roesh, @FDiskas, @ericvicenti, @Anjianto, @agustif, and @lumaxis for helping!