github blitz-js/blitz v0.40.0

latest releases: v2.1.3, blitz@2.1.3, @blitzjs/rpc@2.1.3...
3 years ago

🚀 Big Update

  • 🎉 Remove custom blitz compiler - all custom features now in core framework!: #2662
    • The next-env.d.ts feature now works correctly but as blitz-env.d.ts. This file will be automatically written to disk and updated based on your specific feature usage. You should check blitz-env.d.ts into your repo
    • The intermediate .blitz/build folder is no longer used
    • Fixes all issues caused by .blitz/build step
    • Now works with pnpm
    • Debugger breakpoints should now work
    • Issues with .gitignore files is resolved
    • Overall dev/build perf is improved

💥 Breaking Changes

  • Auto generated RPC endpoints now use a flat path with shared namespace instead of using the full file path. #2516
    • This is only a breaking change if you are manually invoking the autogenerated endpoints, like from a mobile app.
    • This change is according to this RFC.
    • See the docs
    -/api/auth/mutations/login
    +/api/rpc/login
    -/api/modules/users/queries/getUsers
    +/api/rpc/getUsers
  • getBlitzRuntimeData() function removed. It was only used for the blitz install secureheaders recipe. If you previously installed that recipe, update the secureheaders.ts file with the changes in this commit: 8d98843
  • validateZodSchema() is now async by default. You can specify sync/async with a second argument: #2616
    • Read the docs
    • This is only a breaking change if you were using validateZodSchema as a standalone utility. If you are only using it with a form library, then there is no breaking change.

🚀 New Features

  • Ability to version queries & mutations. This is mainly useful when you have mobile apps. #2516
    FILE:    app/users/mutations/createUser.ts
    API URL: /api/rpc/createUser
    
    FILE:    app/users/mutations/v2/createUser.ts
    API URL: /api/rpc/v2/createUser
    
  • Upgrade next.js to 11.1.0: #2656
  • Add package manager prompt to blitz new: #2715

🐞 Patches

  • Fix RedirectError incorrectly failing Cypress tests: #2655
  • Fix serialization of RedirectError: #2659
  • Fix No matching version found for eslint-config-next: 18b3f32
  • Added BLITZ_TELEMETRY_DISABLED env variable: #2664
  • Fix useQuery hooks to not cache data during SSR: #2666
  • Fix <Link> not working correctly with i18n and basepath: #2668
  • Fix usage with pnpm: #2673
  • Upgrade internal Typescript version and potentially improve TS perf: #2669
  • Fix route manifest for mdx pages: #2678
  • Update react-query to 3.21.1 (and fix an infinite loop bug): #2684
  • 🚨 [security] Update tar: 6.1.0 → 6.1.11: #2687
  • Fix missing BLITZ_APP_DIR error when running a custom server: #2699
  • Fix first build of custom server when customServer.hotReload: false: #2698
  • Fix internal middleware to use forwarded header to set protocol: #2705
  • Make jest-preset work in plain js projects: #2740
  • PassportAuth — improve error message if req.query.auth is undefined: #2766
  • Jest-preset: handle static assets for next/image: #2763
  • Fix CSRFTokenMismatchError on logout: #2761
  • Fix CSRFTokenMissmatch error for anonymous sessions after significant time of inactivity: #2762
  • Fix Yarn Berry gitignore for new apps: #2775
  • Fix blitz install to work with pnpm: #2702

⚡️ Changes to the New App Template

  • Few improvements to LabeledTextField: #2677
  • Use jest.config.ts for Typescript apps: #2663
  • Remove typescript bits from package.json generated for js projects: #1402
  • Remove tsc step from pre-push and ignore types.ts file in js apps: #2734
  • Update prisma 2.x to prisma 3.x: #2731

👩‍🍳 Recipes

  • fix secureheaders recipe: 8d98843
  • removed unused htmlescape import in secureheaders recipe: #2675
  • add recipe for ghost cms: #2693
  • Add stitches recipe: #2773

Internal Meta Changes

Credits

Huge thanks to @Roesh, @s-r-x, @akbo, @JuanM04, @andreasasprou, @kotx, @beerose, @martinsaxa, @meehawk, @ratson, @bcye, @emilygracekz, @prisis, @markhughes, @mzaien, @fuzzthink, @isaka1022, and @johnmurphy01 for helping!

Don't miss a new blitz release

NewReleases is sending notifications on new releases.