1
0
mirror of synced 2026-02-04 03:01:17 -05:00

Compare commits

...

18 Commits

Author SHA1 Message Date
Siddharth Suresh
9be4d86174 Version Packages (beta) (#4035)
* Version Packages (beta)

* Version Packages (beta)

* pnpm lock

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-04 01:16:55 +05:30
Siddharth Suresh
249e7cf527 Revert "Version Packages (beta) (#4012)" (#4034)
This reverts commit 76df5db1c3.
2023-01-04 00:54:38 +05:30
github-actions[bot]
76df5db1c3 Version Packages (beta) (#4012)
* Version Packages (beta)

* pnpmlock

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2023-01-04 00:37:02 +05:30
Brandon Bayer
556f5cd13d update CODEOWNERS 2023-01-03 14:02:03 -05:00
Dillon Raphael
d692b4c1d7 Fix suspense error codegen patch for latest nextjs version (#4031)
* Use the new nextjs constant to check if SSR and fix suspense for nextjs 13.1 and above

* satisfy version from 13 to 13.0.6

* check for DYNAMIC_SERVER_USAGE error string for nextjs versions 13-13.0.6

* Create fluffy-coats-flow.md

* revert toolkit-app update to next 13.1

* set error message for compatability with next 13.0.7

* fix changeset
2023-01-03 13:49:53 -05:00
Blitz.js Bot
bd4db6d701 (meta) added @Trancever as contributor 2023-01-02 14:18:58 -05:00
Dawid Urbaniak
82e8b64f59 fix: properly add authError query param to redirect url (#4027) 2023-01-02 14:18:53 -05:00
Tobias
e9dfbcf85a Reference vitest.config.ts instead of jest for README|s (#4019)
* Reference `vitest.config.ts` instead of jest for README|s

* Update apps/toolkit-app/README.md

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-12-29 14:51:14 -05:00
Blitz.js Bot
a4294ad29c (meta) updated @tordans contributions 2022-12-28 15:23:30 -05:00
Tobias
ea83f0d174 Update README.md|s to use src/ instead ofapp/ (#4018)
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-12-28 15:23:25 -05:00
Blitz.js Bot
f32f6d3ac9 (meta) added @iagormoraes as contributor 2022-12-28 13:12:38 -05:00
Iagor Moraes
d5b8faa860 React Suspense on Next 13 patch fix (#4009)
* fix: add regex to support inline and non-inline codebase

- add proper regex test for package version

* chore: add changelog

* chore: update lock file

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-12-28 13:12:33 -05:00
Blitz.js Bot
4a6612b942 (meta) added @tordans as contributor 2022-12-28 10:13:58 -05:00
Tobias
c941d993a8 SignupForm.tsx: Improve helper comment (#4016)
This comment was helpful but could be even more helpful if it clearly stated that it referenced the "P"-Code; and link to docs to learn more.

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-12-28 10:13:53 -05:00
Blitz.js Bot
3633f23ceb (meta) added @a11rew as contributor 2022-12-26 18:59:00 -05:00
Andrew Glago
10f98c681d feat(cli): add href property to RouteURLObject (#3892)
* feat(cli): add href property to RouteURLObject

* Create thick-moons-fry.md

* update playwright install github action

* add browser path env variable to test stage

* revert

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-12-26 18:58:54 -05:00
Datner
0025856b9e support invalidate all queries (#3899)
* support invalidate all queries

* Add changeset

* Update .changeset/stupid-rabbits-jump.md

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>

Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-12-20 15:09:15 -05:00
Dillon Raphael
77b7da0f38 Remove husky prepush hook & update precommit hook to only run prettier (#3984)
* Remove husky prepush hook & update precommit hook to only run prettier for full app & minimal app templates

* pnpmlock
2022-12-20 14:44:15 -05:00
82 changed files with 518 additions and 332 deletions

View File

@@ -3775,6 +3775,46 @@
"contributions": [
"doc"
]
},
{
"login": "a11rew",
"name": "Andrew Glago",
"avatar_url": "https://avatars.githubusercontent.com/u/87580113?v=4",
"profile": "a11rew.dev",
"contributions": [
"doc",
"code"
]
},
{
"login": "tordans",
"name": "Tobias",
"avatar_url": "https://avatars.githubusercontent.com/u/111561?v=4",
"profile": "http://tobiasjordans.de",
"contributions": [
"code",
"doc"
]
},
{
"login": "iagormoraes",
"name": "Iagor Moraes",
"avatar_url": "https://avatars.githubusercontent.com/u/13892132?v=4",
"profile": "https://www.linkedin.com/in/iagor-moraes/",
"contributions": [
"doc",
"code"
]
},
{
"login": "Trancever",
"name": "Dawid Urbaniak",
"avatar_url": "https://avatars.githubusercontent.com/u/18584155?v=4",
"profile": "https://twitter.com/trensik",
"contributions": [
"doc",
"code"
]
}
],
"contributorsPerLine": 7,

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Remove husky prepush hook & update precommit hook to only run prettier

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/auth": patch
---
Fixes adding authError query param in Passport adapter.

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/rpc": patch
"blitz": patch
---
Fix suspense error codegen patch for nextjs versions 13-13.0.6

View File

@@ -67,6 +67,7 @@
"calm-papayas-protect",
"calm-tomatoes-drive",
"chilled-carrots-own",
"chilly-candles-care",
"chilly-nails-nail",
"clean-hats-pump",
"clean-walls-wink",
@@ -81,6 +82,7 @@
"cyan-cars-greet",
"dirty-monkeys-greet",
"dirty-planets-chew",
"dull-rings-arrive",
"early-lamps-itch",
"eighty-apes-sleep",
"eleven-humans-sort",
@@ -99,6 +101,7 @@
"few-hounds-worry",
"few-shrimps-leave",
"flat-bees-approve",
"fluffy-coats-flow",
"fluffy-mangos-begin",
"fluffy-mice-wash",
"forty-timers-rhyme",
@@ -248,6 +251,7 @@
"stale-parents-yawn",
"strong-apes-reply",
"strong-keys-lie",
"stupid-rabbits-jump",
"stupid-walls-sell",
"sweet-kiwis-cross",
"swift-drinks-dress",
@@ -260,10 +264,12 @@
"ten-rivers-burn",
"tender-cooks-tie",
"tender-pianos-check",
"thick-moons-fry",
"thick-parrots-float",
"thirty-countries-build",
"thirty-spies-applaud",
"three-lies-pull",
"three-toes-sell",
"tidy-clouds-smoke",
"tidy-llamas-compare",
"tough-toes-pull",

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/rpc": patch
---
Support full api of tanstack invalidateQueries

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/next": patch
"blitz": patch
---
Add an href property to the generated route manifest that will return a string of the pathname and included query params.

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
add regex to support inline and non-inline codebase and proper next.js package version check

4
.github/CODEOWNERS vendored
View File

@@ -1,5 +1,5 @@
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
* @dillonraphael
* @flybayer
packages/generator/templates**/* @flybayer
# packages/generator/templates**/* @flybayer

View File

@@ -141,7 +141,7 @@ jobs:
- name: Install playwright
run: |
npm i -g playwright
PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers npx playwright install
PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers npx playwright install --with-deps
shell: bash
- name: Build

View File

@@ -6,7 +6,7 @@
<img alt="" src="https://img.shields.io/badge/Join%20our%20community-6700EB.svg?style=for-the-badge&labelColor=000000&logoWidth=20&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAQ9SURBVHgB7d3dVdtAEIbhcSpICUoH0IEogQqSVBBSAU4FSSpIOoAORAfQgSghHXzZ1U/YcMD4R9rZmf2ec3y448LyiNf27iLiGIAmPLrweC9Un3DhrzG6EarLNP09nlwJ1SOZ/lQr5N80/S/p2QMVCBf5N17XCfm1Y/rBHqjAG9PPHvBsz+mf9WAP+HLA9M/YA14cOP2payH7jpj+VCtk1wnTP+vj7xCy6cTpn7EHLMLp059iD1iD8eveJbVCNsSLheX1YA/YgOWnf8YeKB3Wmf7Ud6Fy4f/FHmtpxbl3YlC4MJ/Cj0bWdwPnPbARg+L0S54XQHS32WwuxClzd4CM0z9rPfeAuTtA5ulPXYQ7wZ04Y+oOoDD9KZc9YOoOoDj9s4dwFzgXR6w1wIPoOvPWA9buAHEJ173o3gWiy3AnuBUHLEbgmYwvAk1/wuM8vAgexThzbwPDkx7/DHwVXfFOxP2GmsKd4Ab6zPeAyU8CI7AHFmH2BRCBPXAyk18GzUrqAXCTiR4ssyj0VFw/oCU8+e+RZ33AWz6KMaYbIIWxB+JSLs1bsbkeMN0AqakHvoku9oA2sAfqBvbAQdw0QArsgb25aYBUQT3QgT2gB+yBuqGcHij2UCqXDZACe2Anlw2QYg/QAOyBuoE98CL3DZDCuK4/rh/Q7oGL6U+TOvcNkJoijN8X1C48+T+g75eQDrAH/qmqAVJgDwyqaoAUe4AGYA/UDZX3QLUNkEIZPRCd5+6BahsgVUgPROwBTSijB7jpVAvGHriHvmw9wAZ4BpX1ABvgmakHtPcbRuwBTWAPULgAV9D/jKDY9YRvwvgEaurD44uQHvAol7qBW7WKluVtIHiUS7GyvA0s6CiXDnxrpQfsgbqBS7GKk/2jYHCrVlGyfxTMrVo0ALdq1Q3sgSKofh0M9oA61a+D2QM0AHugbmAPqClmSRjK2apVVQ8UsySsoK1aHdgDesCtWnUDeyCrIpeFg1u3sylyWTi3btMA7IG6gT2wuuK3hoE9sKrit4YVslWLPaAN7IG6ocKt2zmY2h4O9sDiTG0PZw/QANy6XTewBxZj9ogYVHy025LMHhEz9cBn0We6B0yfERReBLfhx0/R1YQHPx/QBPbA0VwcEwf2wNFcHBPHHjiem3MC2QPHcXdSaJjA+KfgTPQ8hhfjBzHC40mhlzJ+Xq9lK4a4PCs43AVaGTed5mZq+iOXZwWHi3AnOj2wFWNcnxYe7gTxLtBKHuamP/J+Wnh8a5irB7ZC5Yk9gPX1QuXC+usHWqGyhYvUYR0a7zboUOFCNVhnk0krZAOW7wFOvzXhom2xnEbIHizTA1wEYhWW6YFGyC6c1gOcfg9wfA80Qj7g8B7g9HuCww+haIR8wf49wOn3Cvv9k8tGyC/s7gFOv3fY3QONkH+v9MBWqB7PeqDn9FcIT//kcitUn6kHOu/T/xfWzlQy3dEHhwAAAABJRU5ErkJggg==">
</a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a aria-label="All Contributors" href="#contributors-"><img alt="" src="https://img.shields.io/badge/all_contributors-399-17BB8A.svg?style=for-the-badge&labelColor=000000"></a>
<a aria-label="All Contributors" href="#contributors-"><img alt="" src="https://img.shields.io/badge/all_contributors-403-17BB8A.svg?style=for-the-badge&labelColor=000000"></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<a aria-label="License" href="https://github.com/blitz-js/blitz/blob/main/LICENSE">
<img alt="" src="https://img.shields.io/npm/l/blitz.svg?style=for-the-badge&labelColor=000000&color=blue">
@@ -734,6 +734,12 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
<td align="center"><a href="https://github.com/selcukfatihsevinc"><img src="https://avatars.githubusercontent.com/u/384836?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Selçuk Fatih Sevinç</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=selcukfatihsevinc" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=selcukfatihsevinc" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/usamaster"><img src="https://avatars.githubusercontent.com/u/5255330?v=4?s=100" width="100px;" alt=""/><br /><sub><b>usamaster</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=usamaster" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="a11rew.dev"><img src="https://avatars.githubusercontent.com/u/87580113?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrew Glago</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=a11rew" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=a11rew" title="Code">💻</a></td>
<td align="center"><a href="http://tobiasjordans.de"><img src="https://avatars.githubusercontent.com/u/111561?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tobias</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tordans" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=tordans" title="Documentation">📖</a></td>
<td align="center"><a href="https://www.linkedin.com/in/iagor-moraes/"><img src="https://avatars.githubusercontent.com/u/13892132?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Iagor Moraes</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=iagormoraes" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=iagormoraes" title="Code">💻</a></td>
<td align="center"><a href="https://twitter.com/trensik"><img src="https://avatars.githubusercontent.com/u/18584155?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dawid Urbaniak</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=Trancever" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=Trancever" title="Code">💻</a></td>
</tr>
</table>
<!-- markdownlint-restore -->

View File

@@ -67,7 +67,7 @@ Here is the starting structure of your app.
```
__name__
├── app/
├── src/
│ ├── api/
│ ├── auth/
│ │ ├── components/
@@ -131,7 +131,7 @@ __name__
These files are:
- The `app/` folder is a container for most of your project. This is where youll put any pages or API routes.
- The `src/` folder is a container for most of your project. This is where youll put any pages or API routes.
- `db/` is where your database configuration goes. If youre writing models or checking migrations, this is where to go.

View File

@@ -30,7 +30,7 @@
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.0",
"blitz": "workspace:2.0.0-beta.20",
"blitz": "workspace:2.0.0-beta.21",
"next": "12.2.5",
"openid-client": "5.2.1",
"prisma": "4.6.0",

View File

@@ -67,7 +67,7 @@ Here is the starting structure of your app.
```
__name__
├── app/
├── src/
│ ├── api/
│ ├── auth/
│ │ ├── components/
@@ -122,7 +122,7 @@ __name__
├── .eslintrc.js
├── babel.config.js
├── blitz.config.ts
├── jest.config.ts
├── vitest.config.ts
├── package.json
├── README.md
├── tsconfig.json
@@ -131,7 +131,7 @@ __name__
These files are:
- The `app/` folder is a container for most of your project. This is where youll put any pages or API routes.
- The `src/` folder is a container for most of your project. This is where youll put any pages or API routes.
- `db/` is where your database configuration goes. If youre writing models or checking migrations, this is where to go.
@@ -149,7 +149,7 @@ These files are:
- `blitz.config.ts` is for advanced custom configuration of Blitz. [Here you can learn how to use it](https://blitzjs.com/docs/blitz-config).
- `jest.config.js` contains config for Jest tests. You can [customize it if needed](https://jestjs.io/docs/en/configuration).
- `vitest.config.ts` contains config for Vitest tests. You can [customize it if needed](https://vitejs.dev/config/).
You can read more about it in the [File Structure](https://blitzjs.com/docs/file-structure) section of the documentation.

View File

@@ -31,7 +31,7 @@
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.0",
"blitz": "workspace:2.0.0-beta.20",
"blitz": "workspace:2.0.0-beta.21",
"next": "12.2.5",
"prisma": "4.6.0",
"react": "18.2.0",

View File

@@ -24,7 +24,7 @@ export const SignupForm = (props: SignupFormProps) => {
props.onSuccess?.()
} catch (error: any) {
if (error.code === "P2002" && error.meta?.target?.includes("email")) {
// This error comes from Prisma
// Error "P2002" comes from Prisma (https://www.prisma.io/docs/reference/api-reference/error-reference#p2002)
return { email: "This email is already being used" }
} else {
return { [FORM_ERROR]: error.toString() }

View File

@@ -17,14 +17,14 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "workspace:2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/next": "workspace:2.0.0-beta.20",
"@blitzjs/rpc": "workspace:2.0.0-beta.20",
"@blitzjs/auth": "workspace:2.0.0-beta.21",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@blitzjs/next": "workspace:2.0.0-beta.21",
"@blitzjs/rpc": "workspace:2.0.0-beta.21",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.0",
"blitz": "workspace:2.0.0-beta.20",
"blitz": "workspace:2.0.0-beta.21",
"delay": "5.0.0",
"next": "12.2.5",
"prisma": "4.6.0",

View File

@@ -17,11 +17,11 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "workspace:2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/next": "workspace:2.0.0-beta.20",
"@blitzjs/auth": "workspace:2.0.0-beta.21",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@blitzjs/next": "workspace:2.0.0-beta.21",
"@prisma/client": "4.6.0",
"blitz": "workspace:2.0.0-beta.20",
"blitz": "workspace:2.0.0-beta.21",
"lowdb": "3.0.0",
"next": "12.2.5",
"prisma": "4.6.0",

View File

@@ -16,11 +16,11 @@
"schema": "db/schema.prisma"
},
"dependencies": {
"@blitzjs/auth": "workspace:2.0.0-beta.20",
"@blitzjs/next": "workspace:2.0.0-beta.20",
"@blitzjs/rpc": "workspace:2.0.0-beta.20",
"@blitzjs/auth": "workspace:2.0.0-beta.21",
"@blitzjs/next": "workspace:2.0.0-beta.21",
"@blitzjs/rpc": "workspace:2.0.0-beta.21",
"@prisma/client": "4.6.0",
"blitz": "workspace:2.0.0-beta.20",
"blitz": "workspace:2.0.0-beta.21",
"lowdb": "3.0.0",
"next": "12.2.5",
"prisma": "4.6.0",
@@ -28,7 +28,7 @@
"react-dom": "18.2.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",

View File

@@ -11,10 +11,10 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
},
"dependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/next": "workspace:2.0.0-beta.20",
"@blitzjs/rpc": "workspace:2.0.0-beta.20",
"blitz": "workspace:2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@blitzjs/next": "workspace:2.0.0-beta.21",
"@blitzjs/rpc": "workspace:2.0.0-beta.21",
"blitz": "workspace:2.0.0-beta.21",
"next": "12.2.5",
"react": "18.2.0",
"react-dom": "18.2.0"

View File

@@ -16,11 +16,11 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "workspace:2.0.0-beta.20",
"@blitzjs/next": "workspace:2.0.0-beta.20",
"@blitzjs/rpc": "workspace:2.0.0-beta.20",
"@blitzjs/auth": "workspace:2.0.0-beta.21",
"@blitzjs/next": "workspace:2.0.0-beta.21",
"@blitzjs/rpc": "workspace:2.0.0-beta.21",
"@prisma/client": "4.6.0",
"blitz": "workspace:2.0.0-beta.20",
"blitz": "workspace:2.0.0-beta.21",
"lowdb": "3.0.0",
"next": "12.2.5",
"prisma": "4.6.0",
@@ -28,7 +28,7 @@
"react-dom": "18.2.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",

View File

@@ -8,13 +8,13 @@
"clean": "rm -rf .turbo && rm -rf node_modules"
},
"dependencies": {
"@blitzjs/auth": "workspace:2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/next": "workspace:2.0.0-beta.20",
"@blitzjs/rpc": "workspace:2.0.0-beta.20",
"@blitzjs/auth": "workspace:2.0.0-beta.21",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@blitzjs/next": "workspace:2.0.0-beta.21",
"@blitzjs/rpc": "workspace:2.0.0-beta.21",
"@prisma/client": "4.6.0",
"@tanstack/react-query": "4.0.10",
"blitz": "workspace:2.0.0-beta.20",
"blitz": "workspace:2.0.0-beta.21",
"next": "12.2.5",
"prisma": "4.6.0",
"react": "18.2.0",

View File

@@ -16,10 +16,10 @@
"schema": "db/schema.prisma"
},
"dependencies": {
"@blitzjs/next": "workspace:2.0.0-beta.20",
"@blitzjs/rpc": "workspace:2.0.0-beta.20",
"@blitzjs/next": "workspace:2.0.0-beta.21",
"@blitzjs/rpc": "workspace:2.0.0-beta.21",
"@prisma/client": "4.6.0",
"blitz": "workspace:2.0.0-beta.20",
"blitz": "workspace:2.0.0-beta.21",
"lowdb": "3.0.0",
"next": "12.2.5",
"prisma": "4.6.0",
@@ -27,7 +27,7 @@
"react-dom": "18.2.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",

View File

@@ -7,10 +7,10 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
},
"dependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/next": "workspace:2.0.0-beta.20",
"@blitzjs/rpc": "workspace:2.0.0-beta.20",
"blitz": "workspace:2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@blitzjs/next": "workspace:2.0.0-beta.21",
"@blitzjs/rpc": "workspace:2.0.0-beta.21",
"blitz": "workspace:2.0.0-beta.21",
"next": "12.2.5",
"react": "18.2.0",
"react-dom": "18.2.0"

View File

@@ -7,10 +7,10 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
},
"dependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/next": "workspace:2.0.0-beta.20",
"@blitzjs/rpc": "workspace:2.0.0-beta.20",
"blitz": "workspace:2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@blitzjs/next": "workspace:2.0.0-beta.21",
"@blitzjs/rpc": "workspace:2.0.0-beta.21",
"blitz": "workspace:2.0.0-beta.21",
"next": "12.2.5",
"react": "18.2.0",
"react-dom": "18.2.0"

View File

@@ -16,11 +16,11 @@
"schema": "db/schema.prisma"
},
"dependencies": {
"@blitzjs/auth": "workspace:2.0.0-beta.20",
"@blitzjs/next": "workspace:2.0.0-beta.20",
"@blitzjs/rpc": "workspace:2.0.0-beta.20",
"@blitzjs/auth": "workspace:2.0.0-beta.21",
"@blitzjs/next": "workspace:2.0.0-beta.21",
"@blitzjs/rpc": "workspace:2.0.0-beta.21",
"@prisma/client": "4.6.0",
"blitz": "workspace:2.0.0-beta.20",
"blitz": "workspace:2.0.0-beta.21",
"lowdb": "3.0.0",
"next": "12.2.5",
"prisma": "4.6.0",
@@ -28,7 +28,7 @@
"react-dom": "18.2.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",

View File

@@ -1,5 +1,15 @@
# @blitzjs/auth
## 2.0.0-beta.21
### Patch Changes
- 82e8b64f5: Fixes adding authError query param in Passport adapter.
- Updated dependencies [d692b4c1d]
- Updated dependencies [10f98c681]
- Updated dependencies [d5b8faa86]
- blitz@2.0.0-beta.21
## 2.0.0-beta.20
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/auth",
"version": "2.0.0-beta.20",
"version": "2.0.0-beta.21",
"scripts": {
"build": "unbuild",
"predev": "wait-on -d 250 ../blitz/dist/index-server.d.ts",
@@ -39,10 +39,10 @@
"url": "0.11.0"
},
"peerDependencies": {
"blitz": "2.0.0-beta.20"
"blitz": "2.0.0-beta.21"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@testing-library/react": "13.4.0",
"@testing-library/react-hooks": "8.0.1",
"@types/cookie": "0.4.1",
@@ -50,7 +50,7 @@
"@types/jsonwebtoken": "8.5.8",
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "^4.8.4",

View File

@@ -172,8 +172,13 @@ export function passportAuth(config: BlitzPassportConfig): ApiHandler {
if (error) {
console.error(`Login via ${strategyName} was unsuccessful.`)
console.error(error)
const authErrorQueryStringKey = redirectUrl.includes("?")
? "&authError="
: "?authError="
redirectUrl +=
"?authError=" + encodeURIComponent(truncateString(error.toString(), 100))
authErrorQueryStringKey +
encodeURIComponent(truncateString(error.toString(), 100))
res.setHeader("Location", redirectUrl)
res.statusCode = 302
res.end()

View File

@@ -1,5 +1,17 @@
# @blitzjs/next
## 2.0.0-beta.21
### Patch Changes
- 10f98c681: Add an href property to the generated route manifest that will return a string of the pathname and included query params.
- Updated dependencies [d692b4c1d]
- Updated dependencies [0025856b9]
- Updated dependencies [10f98c681]
- Updated dependencies [d5b8faa86]
- @blitzjs/rpc@2.0.0-beta.21
- blitz@2.0.0-beta.21
## 2.0.0-beta.20
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/next",
"version": "2.0.0-beta.20",
"version": "2.0.0-beta.21",
"scripts": {
"build": "unbuild",
"dev": "pnpm predev && pnpm watch unbuild src --wait=0.2",
@@ -24,7 +24,7 @@
"eslint.js"
],
"dependencies": {
"@blitzjs/rpc": "2.0.0-beta.20",
"@blitzjs/rpc": "2.0.0-beta.21",
"@tanstack/react-query": "4.0.10",
"@types/hoist-non-react-statics": "3.3.1",
"debug": "4.3.3",
@@ -34,12 +34,12 @@
"supports-color": "8.1.1"
},
"peerDependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"next": "*",
"react": "*"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@testing-library/dom": "8.13.0",
"@testing-library/jest-dom": "5.16.3",
"@testing-library/react": "13.4.0",
@@ -49,7 +49,7 @@
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"@types/testing-library__react-hooks": "4.0.0",
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"cross-spawn": "7.0.3",
"find-up": "4.1.0",
"next": "12.2.5",

View File

@@ -51,7 +51,7 @@ export type BlitzProviderProps = {
hydrateOptions?: HydrateOptions
}
interface RouteUrlObject extends Pick<UrlObject, "pathname" | "query"> {
interface RouteUrlObject extends Pick<UrlObject, "pathname" | "query" | "href"> {
pathname: string
}

View File

@@ -1,5 +1,16 @@
# @blitzjs/rpc
## 2.0.0-beta.21
### Patch Changes
- d692b4c1d: Fix suspense error codegen patch for nextjs versions 13-13.0.6
- 0025856b9: Support full api of tanstack invalidateQueries
- Updated dependencies [d692b4c1d]
- Updated dependencies [10f98c681]
- Updated dependencies [d5b8faa86]
- blitz@2.0.0-beta.21
## 2.0.0-beta.20
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/rpc",
"version": "2.0.0-beta.20",
"version": "2.0.0-beta.21",
"scripts": {
"build": "unbuild",
"predev": "wait-on -d 400 ../blitz/dist/index-server.d.ts && wait-on -d 400 ../blitz-auth/dist/index-browser.d.ts",
@@ -30,17 +30,17 @@
"supports-color": "8.1.1"
},
"peerDependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"next": "*",
"react": "*"
},
"devDependencies": {
"@blitzjs/auth": "2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/auth": "2.0.0-beta.21",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@types/debug": "4.1.7",
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"next": "12.2.5",
"react": "18.2.0",
"react-dom": "18.2.0",

View File

@@ -164,23 +164,20 @@ export function getInfiniteQueryKey<TInput, TResult, T extends AsyncFunc>(
return [...queryKey, "infinite"]
}
type InvalidateQueryTypeWithParams = <TInput, TResult, T extends AsyncFunc>(
resolver: T | Resolver<TInput, TResult> | RpcClient<TInput, TResult>,
...params: [TInput]
) => Promise<void>
type InvalidateQueryTypeAllQueries = <TInput, TResult, T extends AsyncFunc>(
resolver: T | Resolver<TInput, TResult> | RpcClient<TInput, TResult>,
) => Promise<void>
type InvalidateQueryType = InvalidateQueryTypeWithParams & InvalidateQueryTypeAllQueries
interface InvalidateQuery {
<TInput, TResult, T extends AsyncFunc>(
resolver: T | Resolver<TInput, TResult> | RpcClient<TInput, TResult>,
...params: [TInput]
): Promise<void>
<TInput, TResult, T extends AsyncFunc>(
resolver: T | Resolver<TInput, TResult> | RpcClient<TInput, TResult>,
): Promise<void>
(): Promise<void>
}
export const invalidateQuery: InvalidateQueryType = (resolver, ...params: []) => {
if (typeof resolver === "undefined") {
throw new Error(
"invalidateQuery is missing the first argument - it must be a resolver function",
)
}
const fullQueryKey = getQueryKey(resolver, ...params)
export const invalidateQuery: InvalidateQuery = (resolver = undefined, ...params: []) => {
const fullQueryKey =
typeof resolver === "undefined" ? undefined : getQueryKey(resolver, ...params)
return getQueryClient().invalidateQueries(fullQueryKey)
}

View File

@@ -29,6 +29,10 @@ type QueryNonLazyOptions =
| {suspense: true; enabled: true}
| {suspense?: never; enabled?: never}
class NextError extends Error {
digest?: string
}
// -------------------------
// useQuery
// -------------------------
@@ -93,8 +97,11 @@ export function useQuery<
(!options || !("suspense" in options) || options.suspense) &&
(!options || !("enabled" in options) || options.enabled)
) {
const e = new Error()
const e = new NextError()
e.name = "Rendering Suspense fallback..."
e.digest = "DYNAMIC_SERVER_USAGE"
// Backwards compatibility for nextjs 13.0.7
e.message = "DYNAMIC_SERVER_USAGE"
delete e.stack
throw e
}
@@ -173,8 +180,11 @@ export function usePaginatedQuery<
(!options || !("suspense" in options) || options.suspense) &&
(!options || !("enabled" in options) || options.enabled)
) {
const e = new Error()
const e = new NextError()
e.name = "Rendering Suspense fallback..."
e.digest = "DYNAMIC_SERVER_USAGE"
// Backwards compatibility for nextjs 13.0.7
e.message = "DYNAMIC_SERVER_USAGE"
delete e.stack
throw e
}
@@ -265,8 +275,11 @@ export function useInfiniteQuery<
(!options || !("suspense" in options) || options.suspense) &&
(!options || !("enabled" in options) || options.enabled)
) {
const e = new Error()
const e = new NextError()
e.name = "Rendering Suspense fallback..."
e.digest = "DYNAMIC_SERVER_USAGE"
// Backwards compatibility for nextjs 13.0.7
e.message = "DYNAMIC_SERVER_USAGE"
delete e.stack
throw e
}

View File

@@ -1,5 +1,15 @@
# blitz
## 2.0.0-beta.21
### Patch Changes
- d692b4c1d: Fix suspense error codegen patch for nextjs versions 13-13.0.6
- 10f98c681: Add an href property to the generated route manifest that will return a string of the pathname and included query params.
- d5b8faa86: add regex to support inline and non-inline codebase and proper next.js package version check
- Updated dependencies [77b7da0f3]
- @blitzjs/generator@2.0.0-beta.21
## 2.0.0-beta.20
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "blitz",
"version": "2.0.0-beta.20",
"version": "2.0.0-beta.21",
"scripts": {
"build": "unbuild",
"dev": "rm -rf dist && pnpm run predev && watch unbuild src --wait=0.2",
@@ -25,7 +25,7 @@
"blitz": "bin/blitz"
},
"dependencies": {
"@blitzjs/generator": "2.0.0-beta.20",
"@blitzjs/generator": "2.0.0-beta.21",
"@mrleebo/prisma-ast": "0.2.6",
"@types/global-agent": "2.1.1",
"arg": "5.0.1",
@@ -64,6 +64,7 @@
"resolve-cwd": "3.0.0",
"resolve-from": "5.0.0",
"rimraf": "3.0.2",
"semver": "7.3.8",
"superjson": "1.11.0",
"supports-color": "8.1.1",
"tar": "6.1.11",
@@ -73,7 +74,7 @@
"watchpack": "2.1.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.20",
"@blitzjs/config": "workspace:2.0.0-beta.21",
"@types/cookie": "0.4.1",
"@types/cross-spawn": "6.0.2",
"@types/debug": "4.1.7",

View File

@@ -5,11 +5,12 @@ import {join} from "path"
import fs from "fs-extra"
import {getPackageJson} from "./get-package-json"
import {runPrisma} from "../../utils/run-prisma"
import semver from "semver"
import resolveFrom from "resolve-from"
export const codegenTasks = async () => {
try {
/*
/*
Updates the user's nextjs file and adds onRecoverableError to the hydrateRoot 3rd parameter object.
We can remove this when https://github.com/vercel/next.js/pull/38207 is merged into next.js
*/
@@ -18,21 +19,22 @@ export const codegenTasks = async () => {
const readFile = await fs.readFile(nextClientIndex)
const packageJson = await getPackageJson()
const nextVersion = packageJson.dependencies.next
if (nextVersion && nextVersion.startsWith("12")) {
if (nextVersion && /^([~^])?12/.test(nextVersion)) {
const updatedFile = readFile
.toString()
.replace(
/ReactDOM\.hydrateRoot\(.*?\);/,
`ReactDOM.hydrateRoot(domEl, reactEl, {onRecoverableError: (err) => (err.toString().includes("could not finish this Suspense boundary") || err.toString().includes("Minified React error #419")) ? null : console.error(err)});`,
`ReactDOM.hydrateRoot(domEl, reactEl, {onRecoverableError: (err) => (err.toString().includes("DYNAMIC_SERVER_USAGE") || err.toString().includes("could not finish this Suspense boundary") || err.toString().includes("Minified React error #419")) ? null : console.error(err)});`,
)
await fs.writeFile(nextClientIndex, updatedFile)
log.success("Next.js was successfully patched with a React Suspense fix")
} else if (nextVersion && nextVersion.startsWith("13")) {
} else if (nextVersion && semver.satisfies(nextVersion, "13 - 13.0.6")) {
const updatedFile = readFile
.toString()
.replace(
/_client.default\.hydrateRoot\(.*?\);/,
`_client.default.hydrateRoot(domEl, reactEl, {onRecoverableError: (err) => (err.toString().includes("could not finish this Suspense boundary") || err.toString().includes("Minified React error #419")) ? null : console.error(err)});`,
`_client.default.hydrateRoot(domEl, reactEl, {onRecoverableError: (err) => (err.toString().includes("DYNAMIC_SERVER_USAGE") || err.toString().includes("could not finish this Suspense boundary") || err.toString().includes("Minified React error #419")) ? null : console.error(err)});`,
)
await fs.writeFile(nextClientIndex, updatedFile)
log.success("Next.js was successfully patched with a React Suspense fix")

View File

@@ -368,9 +368,32 @@ export function setupManifest(routes: Record<string, RouteManifestEntry>): {
const routesWithoutDuplicates = dedupeBy(Object.entries(routes), ([_path, {name}]) => name)
const implementationLines = routesWithoutDuplicates.map(
([path, {name}]) => `${name}: (query) => ({ pathname: "${path}", query })`,
([path, {name}]) => `${name}: (query) => ({
pathname: "${path}",
query,
href: query
? replaceSlugsWithValues(
"${path}",
Object.keys(query),
Object.values(query)
)
: "${path}",
})`,
)
const implementationHelpers = [
`function replaceSlugsWithValues(str, slugs, values) {
let result = str;
slugs.forEach((slug, i) => {
const value = values[i];
if (value) {
result = result.replace('[' + slug + ']', String(value));
}
});
return result;
}`,
]
const declarationLines = routesWithoutDuplicates.map(
([_path, {name, parameters, multipleParameters}]) => {
if (parameters.length === 0 && multipleParameters.length === 0) {
@@ -392,7 +415,11 @@ export function setupManifest(routes: Record<string, RouteManifestEntry>): {
return {
implementation:
"exports.Routes = {\n" + implementationLines.map((line) => " " + line).join(",\n") + "\n}",
"exports.Routes = {\n" +
implementationLines.map((line) => " " + line).join(",\n") +
"\n}" +
"\n" +
implementationHelpers.join("\n"),
declaration: `
import type { ParsedUrlQueryInput } from "querystring"
import type { RouteUrlObject } from "blitz"

View File

@@ -79,8 +79,8 @@ export async function executeCommand(input: CliCommand): Promise<void> {
const cp = spawn(`${command[0]}`, command.slice(1), {
stdio: ["inherit", "pipe", "pipe"],
})
cp.on("exit", resolve);
cp.stdout.on('data', () => {});
cp.on("exit", resolve)
cp.stdout.on("data", () => {})
})
}

View File

@@ -2,12 +2,13 @@ import {UrlObject} from "url"
// Context for plugins to declaration merge stuff into
export interface Ctx {}
export interface AuthenticatedMiddlewareCtx {}
export interface RouteUrlObject extends Pick<UrlObject, "pathname" | "query"> {
export interface RouteUrlObject extends Pick<UrlObject, "pathname" | "query" | "href"> {
pathname: string
href: string
}
export interface AuthenticatedMiddlewareCtx {}
export type EventHooks = {
onSessionCreated?: OnSessionCreated
onRpcError?: OnRpcError
@@ -35,7 +36,13 @@ export type BlitzCliConfig = {
}
export const isRouteUrlObject = (x: any): x is RouteUrlObject => {
return typeof x === "object" && "pathname" in x && typeof x.pathname === "string"
return (
typeof x === "object" &&
"pathname" in x &&
typeof x.pathname === "string" &&
"href" in x &&
typeof x.href === "string"
)
}
export type AsyncFunc = (...args: any) => Promise<any>

View File

@@ -40,7 +40,9 @@ export const enhancePrisma = <TPrismaClientCtor extends Constructor>(
const process = spawn(prismaBin, ["migrate", "reset", "--force", "--skip-generate"], {
stdio: "ignore",
})
process.on("exit", (code) => (code === 0 ? res(0) : rej(new Error(`db.$reset() failed with code ${code}`))))
process.on("exit", (code) =>
code === 0 ? res(0) : rej(new Error(`db.$reset() failed with code ${code}`)),
)
})
globalThis._blitz_prismaClient.$disconnect()
}

View File

@@ -1,5 +1,16 @@
# @blitzjs/codemod
## 2.0.0-beta.21
### Patch Changes
- Updated dependencies [77b7da0f3]
- Updated dependencies [d692b4c1d]
- Updated dependencies [10f98c681]
- Updated dependencies [d5b8faa86]
- @blitzjs/generator@2.0.0-beta.21
- blitz@2.0.0-beta.21
## 2.0.0-beta.20
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/codemod",
"version": "2.0.0-beta.20",
"version": "2.0.0-beta.21",
"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.0-beta.20",
"@blitzjs/generator": "2.0.0-beta.21",
"arg": "5.0.1",
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"chalk": "^4.1.0",
"cross-spawn": "7.0.3",
"debug": "4.3.3",

View File

@@ -1,5 +1,7 @@
# @blitzjs/config
## 2.0.0-beta.21
## 2.0.0-beta.20
## 2.0.0-beta.19

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/config",
"private": true,
"version": "2.0.0-beta.20",
"version": "2.0.0-beta.21",
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "5.42.1",

View File

@@ -1,5 +1,11 @@
# @blitzjs/generator
## 2.0.0-beta.21
### Patch Changes
- 77b7da0f3: Remove husky prepush hook & update precommit hook to only run prettier
## 2.0.0-beta.20
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/generator",
"version": "2.0.0-beta.20",
"version": "2.0.0-beta.21",
"scripts": {
"dev": "watch unbuild src --wait=0.2",
"build": "unbuild && pnpm build:templates",
@@ -47,7 +47,7 @@
"vinyl": "2.2.1"
},
"devDependencies": {
"@blitzjs/config": "2.0.0-beta.20",
"@blitzjs/config": "2.0.0-beta.21",
"@juanm04/cpx": "2.0.1",
"@types/babel__core": "7.1.19",
"@types/diff": "5.0.2",

View File

@@ -41,17 +41,9 @@ export class AppGenerator extends Generator<AppGeneratorOptions> {
filesToIgnore() {
if (!this.options.useTs) {
return [
"tsconfig.json",
"next-env.d.ts",
"jest.config.ts",
"package.ts.json",
"vitest-config.ts",
"pre-push-ts",
"types.ts",
]
return ["tsconfig.json", "next-env.d.ts", "vitest-config.ts", "package.ts.json", "types.ts"]
}
return ["jsconfig.json", "package.js.json", "vitest.config.js", "pre-push-js"]
return ["jsconfig.json", "package.js.json", "vitest.config.js"]
}
async getTemplateValues() {
@@ -70,10 +62,6 @@ export class AppGenerator extends Generator<AppGeneratorOptions> {
async preCommit() {
this.fs.move(this.destinationPath("gitignore"), this.destinationPath(".gitignore"))
this.fs.move(this.destinationPath("npmrc"), this.destinationPath(".npmrc"))
this.fs.move(
this.destinationPath(this.options.useTs ? ".husky/pre-push-ts" : ".husky/pre-push-js"),
this.destinationPath(".husky/pre-push"),
)
this.fs.move(
this.destinationPath(this.options.useTs ? "package.ts.json" : "package.js.json"),
this.destinationPath("package.json"),

View File

@@ -1,5 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
npx pretty-quick --staged

View File

@@ -1,5 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run lint
npm run test

View File

@@ -1,6 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx tsc
npm run lint
npm run test

View File

@@ -65,7 +65,7 @@ Here is the starting structure of your app.
```
__name__
├── app/
├── src/
│ ├── api/
│ ├── auth/
│ │ ├── components/
@@ -120,7 +120,7 @@ __name__
├── .eslintrc.js
├── babel.config.js
├── blitz.config.ts
├── jest.config.ts
├── vitest.config.ts
├── package.json
├── README.md
├── tsconfig.json
@@ -129,7 +129,7 @@ __name__
These files are:
- The `app/` folder is a container for most of your project. This is where youll put any pages or API routes.
- The `src/` folder is a container for most of your project. This is where youll put any pages or API routes.
- `db/` is where your database configuration goes. If youre writing models or checking migrations, this is where to go.
@@ -147,7 +147,7 @@ These files are:
- `blitz.config.ts` is for advanced custom configuration of Blitz. [Here you can learn how to use it](https://blitzjs.com/docs/blitz-config).
- `jest.config.js` contains config for Jest tests. You can [customize it if needed](https://jestjs.io/docs/en/configuration).
- `vitest.config.ts` contains config for Vitest tests. You can [customize it if needed](https://vitejs.dev/config/).
You can read more about it in the [File Structure](https://blitzjs.com/docs/file-structure) section of the documentation.

View File

@@ -1,5 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
npx pretty-quick --staged

View File

@@ -1,5 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run lint
npm run test

View File

@@ -1,6 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx tsc
npm run lint
npm run test

View File

@@ -51,7 +51,7 @@ Here is the starting structure of your app.
```
__name__
├── app/
├── src/
│ ├── pages/
│ │ ├── _app.tsx
│ │ ├── _document.tsx
@@ -67,7 +67,7 @@ __name__
├── .eslintrc.js
├── babel.config.js
├── blitz.config.ts
├── jest.config.ts
├── vitest.config.ts
├── package.json
├── README.md
├── tsconfig.json
@@ -76,7 +76,7 @@ __name__
These files are:
- The `app/` folder is a container for most of your project. This is where youll put any pages or API routes.
- The `src/` folder is a container for most of your project. This is where youll put any pages or API routes.
- `public/` is a folder where you will put any static assets. If you have images, files, or videos which you want to use in your app, this is where to put them.
@@ -90,7 +90,7 @@ These files are:
- `blitz.config.ts` is for advanced custom configuration of Blitz. [Here you can learn how to use it](https://blitzjs.com/docs/blitz-config).
- `jest.config.js` contains config for Jest tests. You can [customize it if needed](https://jestjs.io/docs/en/configuration).
- `vitest.config.ts` contains config for Vitest tests. You can [customize it if needed](https://vitejs.dev/config/).
You can read more about it in the [File Structure](https://blitzjs.com/docs/file-structure) section of the documentation.

View File

@@ -25,7 +25,7 @@
"@typescript-eslint/parser": "5.9.1"
},
"devDependencies": {
"@blitzjs/config": "2.0.0-beta.20",
"@blitzjs/config": "2.0.0-beta.21",
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"react": "18.2.0",

316
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -24,7 +24,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -24,7 +24,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -24,6 +24,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20"
"blitz": "2.0.0-beta.21"
}
}

View File

@@ -24,6 +24,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20"
"blitz": "2.0.0-beta.21"
}
}

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0",
"uuid": "^8.3.1"
},

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -23,6 +23,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20"
"blitz": "2.0.0-beta.21"
}
}

View File

@@ -22,6 +22,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20"
"blitz": "2.0.0-beta.21"
}
}

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -22,6 +22,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20"
"blitz": "2.0.0-beta.21"
}
}

View File

@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0",
"uuid": "^8.3.1"
},

View File

@@ -24,7 +24,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -24,7 +24,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -25,7 +25,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.20",
"blitz": "2.0.0-beta.21",
"jscodeshift": "0.13.0"
},
"devDependencies": {