From 0ca80f84aa4567560de757741870cc2d15a9642b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Jul 2024 13:49:50 +0000 Subject: [PATCH] Version Packages --- .changeset/tidy-gorillas-confess.md | 47 ----------------- apps/next13/CHANGELOG.md | 11 ++++ apps/next13/package.json | 12 ++--- apps/toolkit-app-passportjs/package.json | 10 ++-- apps/toolkit-app/package.json | 10 ++-- apps/web/package.json | 10 ++-- integration-tests/auth-with-rpc/package.json | 10 ++-- integration-tests/auth/package.json | 8 +-- .../get-initial-props/package.json | 10 ++-- integration-tests/middleware/package.json | 8 +-- .../next-13-app-dir/package.json | 10 ++-- integration-tests/no-suspense/package.json | 10 ++-- integration-tests/qm/package.json | 10 ++-- .../react-query-utils/package.json | 8 +-- integration-tests/rpc-path-root/package.json | 8 +-- integration-tests/rpc/package.json | 8 +-- integration-tests/trailing-slash/package.json | 10 ++-- integration-tests/utils/package.json | 6 +-- packages/blitz-auth/CHANGELOG.md | 49 ++++++++++++++++++ packages/blitz-auth/package.json | 8 +-- packages/blitz-next/CHANGELOG.md | 50 +++++++++++++++++++ packages/blitz-next/package.json | 10 ++-- packages/blitz-rpc/CHANGELOG.md | 49 ++++++++++++++++++ packages/blitz-rpc/package.json | 10 ++-- packages/blitz/CHANGELOG.md | 49 ++++++++++++++++++ packages/blitz/package.json | 6 +-- packages/codemod/CHANGELOG.md | 8 +++ packages/codemod/package.json | 8 +-- packages/config/CHANGELOG.md | 2 + packages/config/package.json | 2 +- packages/generator/CHANGELOG.md | 44 ++++++++++++++++ packages/generator/package.json | 4 +- packages/pkg-template/package.json | 2 +- recipes/base-web/package.json | 2 +- recipes/bulma/package.json | 2 +- recipes/bumbag-ui/package.json | 2 +- recipes/chakra-ui/package.json | 2 +- recipes/emotion/package.json | 2 +- recipes/gh-action-yarn-mariadb/package.json | 2 +- recipes/gh-action-yarn-postgres/package.json | 2 +- recipes/ghost/package.json | 2 +- recipes/graphql-apollo-server/package.json | 2 +- recipes/logrocket/package.json | 2 +- recipes/material-ui/package.json | 2 +- recipes/next-ui/package.json | 2 +- recipes/passenger/package.json | 2 +- recipes/quirrel/package.json | 2 +- recipes/reflexjs/package.json | 2 +- recipes/render/package.json | 2 +- recipes/secureheaders/package.json | 2 +- recipes/stitches/package.json | 2 +- recipes/styled-components/package.json | 2 +- recipes/tailwind/package.json | 2 +- recipes/theme-ui/package.json | 2 +- recipes/vanilla-extract/package.json | 2 +- 55 files changed, 383 insertions(+), 168 deletions(-) delete mode 100644 .changeset/tidy-gorillas-confess.md diff --git a/.changeset/tidy-gorillas-confess.md b/.changeset/tidy-gorillas-confess.md deleted file mode 100644 index c3855c60b7..0000000000 --- a/.changeset/tidy-gorillas-confess.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -"blitz": minor -"@blitzjs/auth": minor -"@blitzjs/next": minor -"@blitzjs/rpc": minor -"@blitzjs/generator": minor ---- - -feat: add blitz auth support for the Web `Request` API standard - -Usage using the new `withBlitzAuth` adapter in the App Router: - -```ts -import {withBlitzAuth} from "app/blitz-server" - -export const {POST} = withBlitzAuth({ - POST: async (_request, _params, ctx) => { - const session = ctx.session - await session.$revoke() - - return new Response( - JSON.stringify({ - userId: session.userId, - }), - {status: 200}, - ) - }, -}) -``` - -feat: New Blitz RPC handler meant to with the next.js app router `route.ts` files - -Usage using the new `rpcAppHandler` function - -```ts -// app/api/rpc/[[...blitz]]/route.ts -import {rpcAppHandler} from "@blitzjs/rpc" -import {withBlitzAuth} from "app/blitz-server" - -// Usage with blitz auth -export const {GET, POST, HEAD} = withBlitzAuth(rpcAppHandler()) - -// Standalone usage -export const {GET, POST, HEAD} = rpcAppHandler() -``` - -chore: Update the app directory starter diff --git a/apps/next13/CHANGELOG.md b/apps/next13/CHANGELOG.md index 9989641126..918aee7713 100644 --- a/apps/next13/CHANGELOG.md +++ b/apps/next13/CHANGELOG.md @@ -1,5 +1,16 @@ # next-blitz-auth +## 0.1.12 + +### Patch Changes + +- Updated dependencies [3b10b13e6] + - blitz@2.1.0 + - @blitzjs/auth@3.0.0 + - @blitzjs/next@3.0.0 + - @blitzjs/rpc@3.0.0 + - @blitzjs/config@3.0.0 + ## 0.1.11 ### Patch Changes diff --git a/apps/next13/package.json b/apps/next13/package.json index 2edd5eba17..feb73ee432 100644 --- a/apps/next13/package.json +++ b/apps/next13/package.json @@ -1,6 +1,6 @@ { "name": "next-blitz-auth", - "version": "0.1.11", + "version": "0.1.12", "private": true, "scripts": { "blitz:dev": "next dev", @@ -12,15 +12,15 @@ "schema": "prisma/schema.prisma" }, "dependencies": { - "@blitzjs/auth": "2.0.10", - "@blitzjs/config": "2.0.10", - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", + "@blitzjs/auth": "3.0.0", + "@blitzjs/config": "3.0.0", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", "@hookform/error-message": "2.0.0", "@hookform/resolvers": "2.9.10", "@prisma/client": "^4.5.0", "@tanstack/react-query": "4.0.10", - "blitz": "2.0.10", + "blitz": "2.1.0", "flatted": "3.2.7", "next": "14.3.0-canary.28", "prisma": "^4.5.0", diff --git a/apps/toolkit-app-passportjs/package.json b/apps/toolkit-app-passportjs/package.json index e55f5c3394..68dc2776bc 100644 --- a/apps/toolkit-app-passportjs/package.json +++ b/apps/toolkit-app-passportjs/package.json @@ -23,14 +23,14 @@ ] }, "dependencies": { - "@blitzjs/auth": "2.0.10", - "@blitzjs/config": "2.0.10", - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", + "@blitzjs/auth": "3.0.0", + "@blitzjs/config": "3.0.0", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", "@hookform/error-message": "2.0.0", "@hookform/resolvers": "2.9.10", "@prisma/client": "4.6.1", - "blitz": "2.0.10", + "blitz": "2.1.0", "next": "14.3.0-canary.28", "openid-client": "5.2.1", "prisma": "4.6.1", diff --git a/apps/toolkit-app/package.json b/apps/toolkit-app/package.json index 186916521e..a887ebf993 100644 --- a/apps/toolkit-app/package.json +++ b/apps/toolkit-app/package.json @@ -24,14 +24,14 @@ ] }, "dependencies": { - "@blitzjs/auth": "2.0.10", - "@blitzjs/config": "2.0.10", - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", + "@blitzjs/auth": "3.0.0", + "@blitzjs/config": "3.0.0", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", "@hookform/error-message": "2.0.0", "@hookform/resolvers": "2.9.10", "@prisma/client": "4.6.1", - "blitz": "2.0.10", + "blitz": "2.1.0", "next": "14.3.0-canary.28", "next-auth": "4.24.7", "prisma": "4.6.1", diff --git a/apps/web/package.json b/apps/web/package.json index 1011601553..9e0e663e73 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -16,14 +16,14 @@ "schema": "./db/schema.prisma" }, "dependencies": { - "@blitzjs/auth": "2.0.10", - "@blitzjs/config": "2.0.10", - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", + "@blitzjs/auth": "3.0.0", + "@blitzjs/config": "3.0.0", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", "@prisma/client": "4.6.1", "@types/jest": "29.2.2", "@types/passport-twitter": "1.0.37", - "blitz": "2.0.10", + "blitz": "2.1.0", "jest": "29.3.0", "jest-environment-jsdom": "29.3.0", "next": "14.3.0-canary.28", diff --git a/integration-tests/auth-with-rpc/package.json b/integration-tests/auth-with-rpc/package.json index da6b6198ba..e51781092d 100644 --- a/integration-tests/auth-with-rpc/package.json +++ b/integration-tests/auth-with-rpc/package.json @@ -17,14 +17,14 @@ "prisma:studio": "prisma studio" }, "dependencies": { - "@blitzjs/auth": "2.0.10", - "@blitzjs/config": "2.0.10", - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", + "@blitzjs/auth": "3.0.0", + "@blitzjs/config": "3.0.0", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", "@hookform/error-message": "2.0.0", "@hookform/resolvers": "2.9.10", "@prisma/client": "4.6.1", - "blitz": "2.0.10", + "blitz": "2.1.0", "delay": "5.0.0", "next": "14.3.0-canary.28", "prisma": "4.6.1", diff --git a/integration-tests/auth/package.json b/integration-tests/auth/package.json index 2527121975..f4c76bf3a5 100644 --- a/integration-tests/auth/package.json +++ b/integration-tests/auth/package.json @@ -17,11 +17,11 @@ "prisma:studio": "prisma studio" }, "dependencies": { - "@blitzjs/auth": "2.0.10", - "@blitzjs/config": "2.0.10", - "@blitzjs/next": "2.0.10", + "@blitzjs/auth": "3.0.0", + "@blitzjs/config": "3.0.0", + "@blitzjs/next": "3.0.0", "@prisma/client": "4.6.1", - "blitz": "2.0.10", + "blitz": "2.1.0", "lowdb": "3.0.0", "next": "14.3.0-canary.28", "prisma": "4.6.1", diff --git a/integration-tests/get-initial-props/package.json b/integration-tests/get-initial-props/package.json index 056964a576..510ae7f682 100644 --- a/integration-tests/get-initial-props/package.json +++ b/integration-tests/get-initial-props/package.json @@ -16,11 +16,11 @@ "schema": "db/schema.prisma" }, "dependencies": { - "@blitzjs/auth": "2.0.10", - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", + "@blitzjs/auth": "3.0.0", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", "@prisma/client": "4.6.1", - "blitz": "2.0.10", + "blitz": "2.1.0", "lowdb": "3.0.0", "next": "14.3.0-canary.28", "prisma": "4.6.1", @@ -28,7 +28,7 @@ "react-dom": "18.2.0" }, "devDependencies": { - "@blitzjs/config": "2.0.10", + "@blitzjs/config": "3.0.0", "@next/bundle-analyzer": "12.0.8", "@types/express": "4.17.13", "@types/fs-extra": "9.0.13", diff --git a/integration-tests/middleware/package.json b/integration-tests/middleware/package.json index 6528337153..e061189512 100644 --- a/integration-tests/middleware/package.json +++ b/integration-tests/middleware/package.json @@ -11,10 +11,10 @@ "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next" }, "dependencies": { - "@blitzjs/config": "2.0.10", - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", - "blitz": "2.0.10", + "@blitzjs/config": "3.0.0", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", + "blitz": "2.1.0", "next": "14.3.0-canary.28", "react": "18.2.0", "react-dom": "18.2.0" diff --git a/integration-tests/next-13-app-dir/package.json b/integration-tests/next-13-app-dir/package.json index f057e24ac8..642d5d7479 100644 --- a/integration-tests/next-13-app-dir/package.json +++ b/integration-tests/next-13-app-dir/package.json @@ -17,12 +17,12 @@ "prisma:studio": "prisma studio" }, "dependencies": { - "@blitzjs/auth": "2.0.10", - "@blitzjs/config": "2.0.10", - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", + "@blitzjs/auth": "3.0.0", + "@blitzjs/config": "3.0.0", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", "@prisma/client": "4.6.1", - "blitz": "2.0.10", + "blitz": "2.1.0", "lowdb": "3.0.0", "next": "14.3.0-canary.28", "prisma": "4.6.1", diff --git a/integration-tests/no-suspense/package.json b/integration-tests/no-suspense/package.json index 81dec770fa..e4c68f1b8e 100644 --- a/integration-tests/no-suspense/package.json +++ b/integration-tests/no-suspense/package.json @@ -16,11 +16,11 @@ "prisma:studio": "prisma studio" }, "dependencies": { - "@blitzjs/auth": "2.0.10", - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", + "@blitzjs/auth": "3.0.0", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", "@prisma/client": "4.6.1", - "blitz": "2.0.10", + "blitz": "2.1.0", "lowdb": "3.0.0", "next": "14.3.0-canary.28", "prisma": "4.6.1", @@ -28,7 +28,7 @@ "react-dom": "18.2.0" }, "devDependencies": { - "@blitzjs/config": "2.0.10", + "@blitzjs/config": "3.0.0", "@next/bundle-analyzer": "12.0.8", "@types/express": "4.17.13", "@types/fs-extra": "9.0.13", diff --git a/integration-tests/qm/package.json b/integration-tests/qm/package.json index 8f8d4798c7..ede5c8fd48 100644 --- a/integration-tests/qm/package.json +++ b/integration-tests/qm/package.json @@ -8,13 +8,13 @@ "clean": "rm -rf .turbo && rm -rf node_modules" }, "dependencies": { - "@blitzjs/auth": "2.0.10", - "@blitzjs/config": "2.0.10", - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", + "@blitzjs/auth": "3.0.0", + "@blitzjs/config": "3.0.0", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", "@prisma/client": "4.6.1", "@tanstack/react-query": "4.0.10", - "blitz": "2.0.10", + "blitz": "2.1.0", "next": "14.3.0-canary.28", "prisma": "4.6.1", "react": "18.2.0", diff --git a/integration-tests/react-query-utils/package.json b/integration-tests/react-query-utils/package.json index f38f171081..ab0ee82c73 100644 --- a/integration-tests/react-query-utils/package.json +++ b/integration-tests/react-query-utils/package.json @@ -16,10 +16,10 @@ "schema": "db/schema.prisma" }, "dependencies": { - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", "@prisma/client": "4.6.1", - "blitz": "2.0.10", + "blitz": "2.1.0", "lowdb": "3.0.0", "next": "14.3.0-canary.28", "prisma": "4.6.1", @@ -27,7 +27,7 @@ "react-dom": "18.2.0" }, "devDependencies": { - "@blitzjs/config": "2.0.10", + "@blitzjs/config": "3.0.0", "@next/bundle-analyzer": "12.0.8", "@types/express": "4.17.13", "@types/fs-extra": "9.0.13", diff --git a/integration-tests/rpc-path-root/package.json b/integration-tests/rpc-path-root/package.json index 6d9a2e34fd..1ba758a0b2 100644 --- a/integration-tests/rpc-path-root/package.json +++ b/integration-tests/rpc-path-root/package.json @@ -7,10 +7,10 @@ "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next" }, "dependencies": { - "@blitzjs/config": "2.0.10", - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", - "blitz": "2.0.10", + "@blitzjs/config": "3.0.0", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", + "blitz": "2.1.0", "next": "14.3.0-canary.28", "react": "18.2.0", "react-dom": "18.2.0" diff --git a/integration-tests/rpc/package.json b/integration-tests/rpc/package.json index 851cbfbfd6..bd4b506ee5 100644 --- a/integration-tests/rpc/package.json +++ b/integration-tests/rpc/package.json @@ -7,10 +7,10 @@ "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next" }, "dependencies": { - "@blitzjs/config": "2.0.10", - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", - "blitz": "2.0.10", + "@blitzjs/config": "3.0.0", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", + "blitz": "2.1.0", "next": "14.3.0-canary.28", "react": "18.2.0", "react-dom": "18.2.0" diff --git a/integration-tests/trailing-slash/package.json b/integration-tests/trailing-slash/package.json index 0ee4516535..76c528c029 100644 --- a/integration-tests/trailing-slash/package.json +++ b/integration-tests/trailing-slash/package.json @@ -16,11 +16,11 @@ "schema": "db/schema.prisma" }, "dependencies": { - "@blitzjs/auth": "2.0.10", - "@blitzjs/next": "2.0.10", - "@blitzjs/rpc": "2.0.10", + "@blitzjs/auth": "3.0.0", + "@blitzjs/next": "3.0.0", + "@blitzjs/rpc": "3.0.0", "@prisma/client": "4.6.1", - "blitz": "2.0.10", + "blitz": "2.1.0", "lowdb": "3.0.0", "next": "14.3.0-canary.28", "prisma": "4.6.1", @@ -28,7 +28,7 @@ "react-dom": "18.2.0" }, "devDependencies": { - "@blitzjs/config": "2.0.10", + "@blitzjs/config": "3.0.0", "@next/bundle-analyzer": "12.0.8", "@types/express": "4.17.13", "@types/fs-extra": "9.0.13", diff --git a/integration-tests/utils/package.json b/integration-tests/utils/package.json index 71f699730e..2e25eb83fb 100644 --- a/integration-tests/utils/package.json +++ b/integration-tests/utils/package.json @@ -3,9 +3,9 @@ "version": "0.0.0", "private": true, "devDependencies": { - "@blitzjs/config": "workspace:2.0.10", - "@blitzjs/next": "workspace:2.0.10", - "@blitzjs/rpc": "workspace:2.0.10", + "@blitzjs/config": "workspace:3.0.0", + "@blitzjs/next": "workspace:3.0.0", + "@blitzjs/rpc": "workspace:3.0.0", "@tanstack/react-query": "4.13.0", "@testing-library/react": "13.4.0", "@types/express": "4.17.13", diff --git a/packages/blitz-auth/CHANGELOG.md b/packages/blitz-auth/CHANGELOG.md index 1c6d05fd17..fdc06e6859 100644 --- a/packages/blitz-auth/CHANGELOG.md +++ b/packages/blitz-auth/CHANGELOG.md @@ -1,5 +1,54 @@ # @blitzjs/auth +## 3.0.0 + +### Minor Changes + +- 3b10b13e6: feat: add blitz auth support for the Web `Request` API standard + + Usage using the new `withBlitzAuth` adapter in the App Router: + + ```ts + import {withBlitzAuth} from "app/blitz-server" + + export const {POST} = withBlitzAuth({ + POST: async (_request, _params, ctx) => { + const session = ctx.session + await session.$revoke() + + return new Response( + JSON.stringify({ + userId: session.userId, + }), + {status: 200}, + ) + }, + }) + ``` + + feat: New Blitz RPC handler meant to with the next.js app router `route.ts` files + + Usage using the new `rpcAppHandler` function + + ```ts + // app/api/rpc/[[...blitz]]/route.ts + import {rpcAppHandler} from "@blitzjs/rpc" + import {withBlitzAuth} from "app/blitz-server" + + // Usage with blitz auth + export const {GET, POST, HEAD} = withBlitzAuth(rpcAppHandler()) + + // Standalone usage + export const {GET, POST, HEAD} = rpcAppHandler() + ``` + + chore: Update the app directory starter + +### Patch Changes + +- Updated dependencies [3b10b13e6] + - blitz@2.1.0 + ## 2.0.10 ### Patch Changes diff --git a/packages/blitz-auth/package.json b/packages/blitz-auth/package.json index c73e5a4255..cb5c978a41 100644 --- a/packages/blitz-auth/package.json +++ b/packages/blitz-auth/package.json @@ -1,6 +1,6 @@ { "name": "@blitzjs/auth", - "version": "2.0.10", + "version": "3.0.0", "homepage": "https://blitzjs.com/", "repository": { "type": "git", @@ -50,7 +50,7 @@ "url": "0.11.0" }, "peerDependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "next": "*", "next-auth": "*", "secure-password": "4.0.0" @@ -67,7 +67,7 @@ } }, "devDependencies": { - "@blitzjs/config": "2.0.10", + "@blitzjs/config": "3.0.0", "@testing-library/react": "13.4.0", "@testing-library/react-hooks": "8.0.1", "@types/cookie": "0.4.1", @@ -75,7 +75,7 @@ "@types/jsonwebtoken": "8.5.8", "@types/react": "18.0.25", "@types/react-dom": "17.0.14", - "blitz": "2.0.10", + "blitz": "2.1.0", "next": "14.3.0-canary.28", "next-auth": "4.24.7", "react": "18.2.0", diff --git a/packages/blitz-next/CHANGELOG.md b/packages/blitz-next/CHANGELOG.md index 8d6b73134c..fcf227a739 100644 --- a/packages/blitz-next/CHANGELOG.md +++ b/packages/blitz-next/CHANGELOG.md @@ -1,5 +1,55 @@ # @blitzjs/next +## 3.0.0 + +### Minor Changes + +- 3b10b13e6: feat: add blitz auth support for the Web `Request` API standard + + Usage using the new `withBlitzAuth` adapter in the App Router: + + ```ts + import {withBlitzAuth} from "app/blitz-server" + + export const {POST} = withBlitzAuth({ + POST: async (_request, _params, ctx) => { + const session = ctx.session + await session.$revoke() + + return new Response( + JSON.stringify({ + userId: session.userId, + }), + {status: 200}, + ) + }, + }) + ``` + + feat: New Blitz RPC handler meant to with the next.js app router `route.ts` files + + Usage using the new `rpcAppHandler` function + + ```ts + // app/api/rpc/[[...blitz]]/route.ts + import {rpcAppHandler} from "@blitzjs/rpc" + import {withBlitzAuth} from "app/blitz-server" + + // Usage with blitz auth + export const {GET, POST, HEAD} = withBlitzAuth(rpcAppHandler()) + + // Standalone usage + export const {GET, POST, HEAD} = rpcAppHandler() + ``` + + chore: Update the app directory starter + +### Patch Changes + +- Updated dependencies [3b10b13e6] + - blitz@2.1.0 + - @blitzjs/rpc@3.0.0 + ## 2.0.10 ### Patch Changes diff --git a/packages/blitz-next/package.json b/packages/blitz-next/package.json index 450b163a32..b579deb383 100644 --- a/packages/blitz-next/package.json +++ b/packages/blitz-next/package.json @@ -1,6 +1,6 @@ { "name": "@blitzjs/next", - "version": "2.0.10", + "version": "3.0.0", "homepage": "https://blitzjs.com/", "repository": { "type": "git", @@ -29,7 +29,7 @@ "eslint.js" ], "dependencies": { - "@blitzjs/rpc": "2.0.10", + "@blitzjs/rpc": "3.0.0", "@types/hoist-non-react-statics": "3.3.1", "copy-webpack-plugin": "11.0.0", "debug": "4.3.3", @@ -39,13 +39,13 @@ "supports-color": "8.1.1" }, "peerDependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "next": "*", "react": "*", "tslog": "4.9.0" }, "devDependencies": { - "@blitzjs/config": "2.0.10", + "@blitzjs/config": "3.0.0", "@testing-library/dom": "8.13.0", "@testing-library/jest-dom": "5.16.3", "@testing-library/react": "13.4.0", @@ -56,7 +56,7 @@ "@types/react": "18.0.25", "@types/react-dom": "17.0.14", "@types/testing-library__react-hooks": "4.0.0", - "blitz": "2.0.10", + "blitz": "2.1.0", "cross-spawn": "7.0.3", "find-up": "4.1.0", "next": "14.3.0-canary.28", diff --git a/packages/blitz-rpc/CHANGELOG.md b/packages/blitz-rpc/CHANGELOG.md index c40132995c..e393974927 100644 --- a/packages/blitz-rpc/CHANGELOG.md +++ b/packages/blitz-rpc/CHANGELOG.md @@ -1,5 +1,54 @@ # @blitzjs/rpc +## 3.0.0 + +### Minor Changes + +- 3b10b13e6: feat: add blitz auth support for the Web `Request` API standard + + Usage using the new `withBlitzAuth` adapter in the App Router: + + ```ts + import {withBlitzAuth} from "app/blitz-server" + + export const {POST} = withBlitzAuth({ + POST: async (_request, _params, ctx) => { + const session = ctx.session + await session.$revoke() + + return new Response( + JSON.stringify({ + userId: session.userId, + }), + {status: 200}, + ) + }, + }) + ``` + + feat: New Blitz RPC handler meant to with the next.js app router `route.ts` files + + Usage using the new `rpcAppHandler` function + + ```ts + // app/api/rpc/[[...blitz]]/route.ts + import {rpcAppHandler} from "@blitzjs/rpc" + import {withBlitzAuth} from "app/blitz-server" + + // Usage with blitz auth + export const {GET, POST, HEAD} = withBlitzAuth(rpcAppHandler()) + + // Standalone usage + export const {GET, POST, HEAD} = rpcAppHandler() + ``` + + chore: Update the app directory starter + +### Patch Changes + +- Updated dependencies [3b10b13e6] + - blitz@2.1.0 + ## 2.0.10 ### Patch Changes diff --git a/packages/blitz-rpc/package.json b/packages/blitz-rpc/package.json index 9a531bfec2..28854057ca 100644 --- a/packages/blitz-rpc/package.json +++ b/packages/blitz-rpc/package.json @@ -1,6 +1,6 @@ { "name": "@blitzjs/rpc", - "version": "2.0.10", + "version": "3.0.0", "homepage": "https://blitzjs.com/", "repository": { "type": "git", @@ -37,18 +37,18 @@ }, "peerDependencies": { "@tanstack/query-core": "4.24.4", - "blitz": "2.0.10", + "blitz": "2.1.0", "next": "*", "react": "*" }, "devDependencies": { - "@blitzjs/auth": "2.0.10", - "@blitzjs/config": "2.0.10", + "@blitzjs/auth": "3.0.0", + "@blitzjs/config": "3.0.0", "@tanstack/query-core": "4.24.4", "@types/debug": "4.1.7", "@types/react": "18.0.25", "@types/react-dom": "17.0.14", - "blitz": "2.0.10", + "blitz": "2.1.0", "next": "14.3.0-canary.28", "react": "18.2.0", "react-dom": "18.2.0", diff --git a/packages/blitz/CHANGELOG.md b/packages/blitz/CHANGELOG.md index 4eaafe14ea..7b2e7d28ee 100644 --- a/packages/blitz/CHANGELOG.md +++ b/packages/blitz/CHANGELOG.md @@ -1,5 +1,54 @@ # blitz +## 2.1.0 + +### Minor Changes + +- 3b10b13e6: feat: add blitz auth support for the Web `Request` API standard + + Usage using the new `withBlitzAuth` adapter in the App Router: + + ```ts + import {withBlitzAuth} from "app/blitz-server" + + export const {POST} = withBlitzAuth({ + POST: async (_request, _params, ctx) => { + const session = ctx.session + await session.$revoke() + + return new Response( + JSON.stringify({ + userId: session.userId, + }), + {status: 200}, + ) + }, + }) + ``` + + feat: New Blitz RPC handler meant to with the next.js app router `route.ts` files + + Usage using the new `rpcAppHandler` function + + ```ts + // app/api/rpc/[[...blitz]]/route.ts + import {rpcAppHandler} from "@blitzjs/rpc" + import {withBlitzAuth} from "app/blitz-server" + + // Usage with blitz auth + export const {GET, POST, HEAD} = withBlitzAuth(rpcAppHandler()) + + // Standalone usage + export const {GET, POST, HEAD} = rpcAppHandler() + ``` + + chore: Update the app directory starter + +### Patch Changes + +- Updated dependencies [3b10b13e6] + - @blitzjs/generator@3.0.0 + ## 2.0.10 ### Patch Changes diff --git a/packages/blitz/package.json b/packages/blitz/package.json index 17c4312059..c37c5d8490 100644 --- a/packages/blitz/package.json +++ b/packages/blitz/package.json @@ -1,6 +1,6 @@ { "name": "blitz", - "version": "2.0.10", + "version": "2.1.0", "homepage": "https://blitzjs.com/", "repository": { "type": "git", @@ -30,7 +30,7 @@ "blitz": "bin/blitz" }, "dependencies": { - "@blitzjs/generator": "2.0.10", + "@blitzjs/generator": "3.0.0", "@mrleebo/prisma-ast": "0.2.6", "@types/global-agent": "2.1.1", "arg": "5.0.1", @@ -80,7 +80,7 @@ "watchpack": "2.1.1" }, "devDependencies": { - "@blitzjs/config": "2.0.10", + "@blitzjs/config": "3.0.0", "@types/cookie": "0.4.1", "@types/cross-spawn": "6.0.2", "@types/debug": "4.1.7", diff --git a/packages/codemod/CHANGELOG.md b/packages/codemod/CHANGELOG.md index 2038575d99..2c4172fac2 100644 --- a/packages/codemod/CHANGELOG.md +++ b/packages/codemod/CHANGELOG.md @@ -1,5 +1,13 @@ # @blitzjs/codemod +## 3.0.0 + +### Patch Changes + +- Updated dependencies [3b10b13e6] + - blitz@2.1.0 + - @blitzjs/generator@3.0.0 + ## 2.0.10 ### Patch Changes diff --git a/packages/codemod/package.json b/packages/codemod/package.json index 6d45f63513..00d35e76fc 100644 --- a/packages/codemod/package.json +++ b/packages/codemod/package.json @@ -1,6 +1,6 @@ { "name": "@blitzjs/codemod", - "version": "2.0.10", + "version": "3.0.0", "scripts": { "build": "unbuild", "dev": "watch unbuild src --wait=0.2", @@ -25,9 +25,9 @@ "@babel/plugin-proposal-class-properties": "7.17.12", "@babel/plugin-syntax-jsx": "7.17.12", "@babel/plugin-syntax-typescript": "7.17.12", - "@blitzjs/generator": "2.0.10", + "@blitzjs/generator": "3.0.0", "arg": "5.0.1", - "blitz": "2.0.10", + "blitz": "2.1.0", "chalk": "^4.1.0", "cross-spawn": "7.0.3", "debug": "4.3.3", @@ -38,7 +38,7 @@ }, "devDependencies": { "@babel/preset-env": "7.12.10", - "@blitzjs/config": "2.0.10", + "@blitzjs/config": "3.0.0", "@types/jscodeshift": "0.11.2", "@types/node": "18.11.9", "ast-types": "0.14.2", diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md index bacd44308c..6a496dde88 100644 --- a/packages/config/CHANGELOG.md +++ b/packages/config/CHANGELOG.md @@ -1,5 +1,7 @@ # @blitzjs/config +## 3.0.0 + ## 2.0.10 ## 2.0.9 diff --git a/packages/config/package.json b/packages/config/package.json index a3403cfab7..d16cddc13d 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,7 +1,7 @@ { "name": "@blitzjs/config", "private": true, - "version": "2.0.10", + "version": "3.0.0", "license": "MIT", "dependencies": { "@typescript-eslint/eslint-plugin": "5.42.1", diff --git a/packages/generator/CHANGELOG.md b/packages/generator/CHANGELOG.md index 236db0a6d2..33125b434b 100644 --- a/packages/generator/CHANGELOG.md +++ b/packages/generator/CHANGELOG.md @@ -1,5 +1,49 @@ # @blitzjs/generator +## 3.0.0 + +### Minor Changes + +- 3b10b13e6: feat: add blitz auth support for the Web `Request` API standard + + Usage using the new `withBlitzAuth` adapter in the App Router: + + ```ts + import {withBlitzAuth} from "app/blitz-server" + + export const {POST} = withBlitzAuth({ + POST: async (_request, _params, ctx) => { + const session = ctx.session + await session.$revoke() + + return new Response( + JSON.stringify({ + userId: session.userId, + }), + {status: 200}, + ) + }, + }) + ``` + + feat: New Blitz RPC handler meant to with the next.js app router `route.ts` files + + Usage using the new `rpcAppHandler` function + + ```ts + // app/api/rpc/[[...blitz]]/route.ts + import {rpcAppHandler} from "@blitzjs/rpc" + import {withBlitzAuth} from "app/blitz-server" + + // Usage with blitz auth + export const {GET, POST, HEAD} = withBlitzAuth(rpcAppHandler()) + + // Standalone usage + export const {GET, POST, HEAD} = rpcAppHandler() + ``` + + chore: Update the app directory starter + ## 2.0.10 ## 2.0.9 diff --git a/packages/generator/package.json b/packages/generator/package.json index 86be7a0efc..8109db9138 100644 --- a/packages/generator/package.json +++ b/packages/generator/package.json @@ -1,6 +1,6 @@ { "name": "@blitzjs/generator", - "version": "2.0.10", + "version": "3.0.0", "homepage": "https://blitzjs.com/", "repository": { "type": "git", @@ -54,7 +54,7 @@ "zod": "3.20.2" }, "devDependencies": { - "@blitzjs/config": "2.0.10", + "@blitzjs/config": "3.0.0", "@juanm04/cpx": "2.0.1", "@types/babel__core": "7.1.19", "@types/diff": "5.0.2", diff --git a/packages/pkg-template/package.json b/packages/pkg-template/package.json index 1fcae8248d..7846eb8a65 100644 --- a/packages/pkg-template/package.json +++ b/packages/pkg-template/package.json @@ -25,7 +25,7 @@ "@typescript-eslint/parser": "5.9.1" }, "devDependencies": { - "@blitzjs/config": "2.0.10", + "@blitzjs/config": "3.0.0", "@types/react": "18.0.25", "@types/react-dom": "17.0.14", "react": "18.2.0", diff --git a/recipes/base-web/package.json b/recipes/base-web/package.json index f08811a7d9..65a7eda35f 100644 --- a/recipes/base-web/package.json +++ b/recipes/base-web/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/bulma/package.json b/recipes/bulma/package.json index 016178ec26..f424d2617d 100644 --- a/recipes/bulma/package.json +++ b/recipes/bulma/package.json @@ -22,7 +22,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/bumbag-ui/package.json b/recipes/bumbag-ui/package.json index 35e69ed9ec..16aa6132a4 100644 --- a/recipes/bumbag-ui/package.json +++ b/recipes/bumbag-ui/package.json @@ -24,7 +24,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/chakra-ui/package.json b/recipes/chakra-ui/package.json index ac67b334e4..00a3b33218 100644 --- a/recipes/chakra-ui/package.json +++ b/recipes/chakra-ui/package.json @@ -24,7 +24,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/emotion/package.json b/recipes/emotion/package.json index c4c0161957..b063ea4886 100644 --- a/recipes/emotion/package.json +++ b/recipes/emotion/package.json @@ -22,7 +22,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/gh-action-yarn-mariadb/package.json b/recipes/gh-action-yarn-mariadb/package.json index a520487854..c921d63bf1 100644 --- a/recipes/gh-action-yarn-mariadb/package.json +++ b/recipes/gh-action-yarn-mariadb/package.json @@ -24,6 +24,6 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10" + "blitz": "2.1.0" } } diff --git a/recipes/gh-action-yarn-postgres/package.json b/recipes/gh-action-yarn-postgres/package.json index 18cd438031..eca88ad7ee 100644 --- a/recipes/gh-action-yarn-postgres/package.json +++ b/recipes/gh-action-yarn-postgres/package.json @@ -24,6 +24,6 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10" + "blitz": "2.1.0" } } diff --git a/recipes/ghost/package.json b/recipes/ghost/package.json index 35a71c0507..e64d8df0bd 100644 --- a/recipes/ghost/package.json +++ b/recipes/ghost/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/graphql-apollo-server/package.json b/recipes/graphql-apollo-server/package.json index b82480a2a4..3754ffa56a 100644 --- a/recipes/graphql-apollo-server/package.json +++ b/recipes/graphql-apollo-server/package.json @@ -22,7 +22,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0", "uuid": "^8.3.1" }, diff --git a/recipes/logrocket/package.json b/recipes/logrocket/package.json index 811c48a7f0..23db518167 100644 --- a/recipes/logrocket/package.json +++ b/recipes/logrocket/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/material-ui/package.json b/recipes/material-ui/package.json index aaa8b46410..95a23b2cff 100644 --- a/recipes/material-ui/package.json +++ b/recipes/material-ui/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/next-ui/package.json b/recipes/next-ui/package.json index 2030b8a59a..1171a0fe7c 100644 --- a/recipes/next-ui/package.json +++ b/recipes/next-ui/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/passenger/package.json b/recipes/passenger/package.json index 8809a9b1fa..210c25386d 100644 --- a/recipes/passenger/package.json +++ b/recipes/passenger/package.json @@ -23,6 +23,6 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10" + "blitz": "2.1.0" } } diff --git a/recipes/quirrel/package.json b/recipes/quirrel/package.json index 64de6e4f65..e4ba134bb1 100644 --- a/recipes/quirrel/package.json +++ b/recipes/quirrel/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10" + "blitz": "2.1.0" } } diff --git a/recipes/reflexjs/package.json b/recipes/reflexjs/package.json index 6bb7cfc9f0..0dc4b20205 100644 --- a/recipes/reflexjs/package.json +++ b/recipes/reflexjs/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/render/package.json b/recipes/render/package.json index a39e91351a..f888767c8b 100644 --- a/recipes/render/package.json +++ b/recipes/render/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10" + "blitz": "2.1.0" } } diff --git a/recipes/secureheaders/package.json b/recipes/secureheaders/package.json index e5a4fc15da..50f7e7c830 100644 --- a/recipes/secureheaders/package.json +++ b/recipes/secureheaders/package.json @@ -22,7 +22,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0", "uuid": "^8.3.1" }, diff --git a/recipes/stitches/package.json b/recipes/stitches/package.json index 1b2f712b57..487b220c15 100644 --- a/recipes/stitches/package.json +++ b/recipes/stitches/package.json @@ -24,7 +24,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/styled-components/package.json b/recipes/styled-components/package.json index 49438681bb..c3e1370716 100644 --- a/recipes/styled-components/package.json +++ b/recipes/styled-components/package.json @@ -24,7 +24,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/tailwind/package.json b/recipes/tailwind/package.json index 3bdb5c331c..291113abd1 100644 --- a/recipes/tailwind/package.json +++ b/recipes/tailwind/package.json @@ -22,7 +22,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/theme-ui/package.json b/recipes/theme-ui/package.json index bce0e7cf46..e2a8f57b56 100644 --- a/recipes/theme-ui/package.json +++ b/recipes/theme-ui/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": { diff --git a/recipes/vanilla-extract/package.json b/recipes/vanilla-extract/package.json index 71f7af7623..b3a47e3f3f 100644 --- a/recipes/vanilla-extract/package.json +++ b/recipes/vanilla-extract/package.json @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/blitz-js/blitz#readme", "dependencies": { - "blitz": "2.0.10", + "blitz": "2.1.0", "jscodeshift": "0.13.0" }, "devDependencies": {