1
0
mirror of synced 2026-02-04 12:08:33 -05:00

Compare commits

...

4 Commits

Author SHA1 Message Date
beerose
d846fc6be9 Update pnpm-lock.yaml 2022-06-07 11:47:05 -07:00
github-actions[bot]
f5e80e3835 Version Packages (alpha) (#3405)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-07 11:46:31 -07:00
Aleksandra
17ce29e5e4 Update rpc plugin setup in templates (#3404) 2022-06-07 11:33:06 -07:00
Aleksandra
46d9f81adf Update templates directory for codemod (#3402) 2022-06-07 11:04:34 -07:00
27 changed files with 206 additions and 496 deletions

View File

@@ -47,6 +47,7 @@
"quiet-feet-travel",
"rich-chairs-invent",
"sharp-falcons-begin",
"shy-olives-hang",
"silent-colts-reply",
"small-socks-confess",
"stupid-walls-sell",
@@ -58,6 +59,7 @@
"twenty-beans-pump",
"two-kiwis-help",
"unlucky-papayas-sleep",
"violet-bags-leave",
"weak-suns-shave",
"wicked-ghosts-cough",
"wise-frogs-give"

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/rpc": patch
"@blitzjs/generator": patch
---
Update RPC plugin setup in templates

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/codemod": patch
---
Update templates directory for codemod

View File

@@ -7,12 +7,6 @@ export const { withBlitz } = setupBlitzClient({
AuthClientPlugin({
cookiePrefix: "web-cookie-prefix",
}),
BlitzRpcPlugin({
reactQueryOptions: {
queries: {
staleTime: 7000,
},
},
}),
BlitzRpcPlugin({}),
],
})

View File

@@ -29,7 +29,7 @@
"@blitzjs/rpc": "workspace:*",
"@hookform/resolvers": "2.8.8",
"@prisma/client": "3.9.0",
"blitz": "workspace:2.0.0-alpha.30",
"blitz": "workspace:2.0.0-alpha.31",
"next": "12.1.6-canary.17",
"prisma": "3.9.0",
"react": "18.0.0",

View File

@@ -7,13 +7,7 @@ const {withBlitz} = setupBlitzClient({
AuthClientPlugin({
cookiePrefix: "no-suspense-tests-cookie-prefix",
}),
BlitzRpcPlugin({
reactQueryOptions: {
queries: {
staleTime: 7000,
},
},
}),
BlitzRpcPlugin({}),
],
})

View File

@@ -7,13 +7,7 @@ const {withBlitz} = setupBlitzClient({
AuthClientPlugin({
cookiePrefix: "trailing-slash-tests-cookie-prefix",
}),
BlitzRpcPlugin({
reactQueryOptions: {
queries: {
staleTime: 7000,
},
},
}),
BlitzRpcPlugin({}),
],
})

View File

@@ -80,21 +80,7 @@ const BlitzWrapper = ({plugins, children}) => {
export function render(ui: RenderUI, {wrapper, router, ...options}: RenderOptions = {}) {
if (!wrapper) {
wrapper = ({children}) => {
return (
<BlitzWrapper
plugins={[
BlitzRpcPlugin({
reactQueryOptions: {
queries: {
staleTime: 7000,
},
},
}),
]}
>
{children}
</BlitzWrapper>
)
return <BlitzWrapper plugins={[BlitzRpcPlugin({})]}>{children}</BlitzWrapper>
}
}

View File

@@ -1,5 +1,11 @@
# @blitzjs/auth
## 2.0.0-alpha.31
### Patch Changes
- blitz@2.0.0-alpha.31
## 2.0.0-alpha.30
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/auth",
"version": "2.0.0-alpha.30",
"version": "2.0.0-alpha.31",
"scripts": {
"build": "unbuild",
"predev": "wait-on -d 250 ../blitz/dist/index-server.d.ts",
@@ -26,7 +26,7 @@
"@types/secure-password": "3.1.1",
"b64-lite": "1.4.0",
"bad-behavior": "1.0.1",
"blitz": "2.0.0-alpha.30",
"blitz": "2.0.0-alpha.31",
"cookie": "0.4.1",
"cookie-session": "2.0.0",
"debug": "4.3.3",
@@ -39,7 +39,7 @@
"url": "0.11.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-alpha.30",
"@blitzjs/config": "workspace:2.0.0-alpha.31",
"@testing-library/react": "13.0.0",
"@testing-library/react-hooks": "7.0.2",
"@types/cookie": "0.4.1",

View File

@@ -1,5 +1,12 @@
# @blitzjs/next
## 2.0.0-alpha.31
### Patch Changes
- Updated dependencies [17ce29e5]
- @blitzjs/rpc@2.0.0-alpha.31
## 2.0.0-alpha.30
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/next",
"version": "2.0.0-alpha.30",
"version": "2.0.0-alpha.31",
"scripts": {
"build": "unbuild",
"dev": "pnpm predev && pnpm watch unbuild src --wait=0.2",
@@ -23,7 +23,7 @@
"eslint.js"
],
"dependencies": {
"@blitzjs/rpc": "2.0.0-alpha.30",
"@blitzjs/rpc": "2.0.0-alpha.31",
"@types/hoist-non-react-statics": "3.3.1",
"debug": "4.3.3",
"fs-extra": "10.0.1",
@@ -32,7 +32,7 @@
"superjson": "1.8.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-alpha.30",
"@blitzjs/config": "workspace:2.0.0-alpha.31",
"@testing-library/dom": "8.13.0",
"@testing-library/jest-dom": "5.16.3",
"@testing-library/react": "13.0.0",
@@ -43,7 +43,7 @@
"@types/react": "18.0.1",
"@types/react-dom": "17.0.14",
"@types/testing-library__react-hooks": "4.0.0",
"blitz": "2.0.0-alpha.30",
"blitz": "2.0.0-alpha.31",
"cross-spawn": "7.0.3",
"find-up": "4.1.0",
"lodash.frompairs": "4.0.1",

View File

@@ -1,5 +1,13 @@
# @blitzjs/rpc
## 2.0.0-alpha.31
### Patch Changes
- 17ce29e5: Update RPC plugin setup in templates
- blitz@2.0.0-alpha.31
- @blitzjs/auth@2.0.0-alpha.31
## 2.0.0-alpha.30
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/rpc",
"version": "2.0.0-alpha.30",
"version": "2.0.0-alpha.31",
"scripts": {
"build": "unbuild",
"predev": "wait-on -d 250 ../blitz/dist/index-server.d.ts && wait-on -d 250 ../blitz-auth/dist/index-browser.d.ts",
@@ -20,7 +20,7 @@
"dist/**"
],
"dependencies": {
"@blitzjs/auth": "2.0.0-alpha.30",
"@blitzjs/auth": "2.0.0-alpha.31",
"b64-lite": "1.4.0",
"bad-behavior": "1.0.1",
"chalk": "^4.1.0",
@@ -30,11 +30,11 @@
"zod": "3.10.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-alpha.30",
"@blitzjs/config": "workspace:2.0.0-alpha.31",
"@types/debug": "4.1.7",
"@types/react": "18.0.1",
"@types/react-dom": "17.0.14",
"blitz": "2.0.0-alpha.30",
"blitz": "2.0.0-alpha.31",
"next": "12.1.6-canary.17",
"react": "18.0.0",
"react-dom": "18.0.0",
@@ -43,7 +43,7 @@
"watch": "1.0.2"
},
"peerDependencies": {
"blitz": "2.0.0-alpha.30",
"blitz": "2.0.0-alpha.31",
"next": "*"
},
"publishConfig": {

View File

@@ -10,8 +10,9 @@ interface BlitzRpcOptions {
reactQueryOptions?: DefaultOptions
}
export const BlitzRpcPlugin = createClientPlugin<BlitzRpcOptions, any>(
({reactQueryOptions}: BlitzRpcOptions) => {
(options?: BlitzRpcOptions) => {
const initializeQueryClient = () => {
const {reactQueryOptions} = options || {}
let suspenseEnabled = reactQueryOptions?.queries?.suspense ?? true
if (!process.env.CLI_COMMAND_CONSOLE && !process.env.CLI_COMMAND_DB) {
globalThis.__BLITZ_SUSPENSE_ENABLED = suspenseEnabled

View File

@@ -1,5 +1,12 @@
# blitz
## 2.0.0-alpha.31
### Patch Changes
- Updated dependencies [17ce29e5]
- @blitzjs/generator@2.0.0-alpha.31
## 2.0.0-alpha.30
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "blitz",
"version": "2.0.0-alpha.30",
"version": "2.0.0-alpha.31",
"scripts": {
"build": "unbuild",
"dev": "watch unbuild src --wait=0.2",
@@ -23,7 +23,7 @@
"blitz": "bin/blitz"
},
"dependencies": {
"@blitzjs/generator": "2.0.0-alpha.30",
"@blitzjs/generator": "2.0.0-alpha.31",
"arg": "5.0.1",
"chalk": "^4.1.0",
"console-table-printer": "2.10.0",
@@ -52,7 +52,7 @@
"watchpack": "2.1.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-alpha.30",
"@blitzjs/config": "workspace:2.0.0-alpha.31",
"@types/cookie": "0.4.1",
"@types/cross-spawn": "6.0.2",
"@types/debug": "4.1.7",

View File

@@ -1,5 +1,14 @@
# @blitzjs/codemod
## 2.0.0-alpha.31
### Patch Changes
- 46d9f81a: Update templates directory for codemod
- Updated dependencies [17ce29e5]
- @blitzjs/generator@2.0.0-alpha.31
- blitz@2.0.0-alpha.31
## 2.0.0-alpha.30
### Patch Changes

View File

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

View File

@@ -7,7 +7,6 @@ import {
findDefaultExportPath,
findFunction,
findImport,
findImportSpecifier,
findVariable,
getAllFiles,
getCollectionFromSource,
@@ -15,6 +14,8 @@ import {
} from "./utils"
import {log} from "blitz"
const isInternalBlitzMonorepoDevelopment = fs.existsSync(path.join(__dirname, "../../blitz-next"))
const upgradeLegacy = async () => {
let isTypescript = fs.existsSync(path.resolve("tsconfig.json"))
let blitzConfigFile = `blitz.config.${isTypescript ? "ts" : "js"}`
@@ -270,7 +271,7 @@ const upgradeLegacy = async () => {
require.resolve("@blitzjs/generator"),
"..",
"..",
"templates",
isInternalBlitzMonorepoDevelopment ? "templates" : "dist/templates",
)
const blitzServer = fs
.readFileSync(path.join(templatePath, "app", "app", "blitz-server.ts"))

View File

@@ -1,5 +1,7 @@
# @blitzjs/config
## 2.0.0-alpha.31
## 2.0.0-alpha.30
## 2.0.0-alpha.29

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/config",
"private": true,
"version": "2.0.0-alpha.30",
"version": "2.0.0-alpha.31",
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "5.9.1",

View File

@@ -1,5 +1,11 @@
# @blitzjs/generator
## 2.0.0-alpha.31
### Patch Changes
- 17ce29e5: Update RPC plugin setup in templates
## 2.0.0-alpha.30
## 2.0.0-alpha.29

View File

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

View File

@@ -7,12 +7,6 @@ export const { withBlitz } = setupBlitzClient({
AuthClientPlugin({
cookiePrefix: "__safeNameSlug__-cookie-prefix",
}),
BlitzRpcPlugin({
reactQueryOptions: {
queries: {
staleTime: 7000,
},
},
}),
BlitzRpcPlugin({}),
],
})

View File

@@ -25,7 +25,7 @@
"@typescript-eslint/parser": "5.9.1"
},
"devDependencies": {
"@blitzjs/config": "2.0.0-alpha.30",
"@blitzjs/config": "2.0.0-alpha.31",
"@types/react": "18.0.1",
"@types/react-dom": "17.0.14",
"react": "18.0.0",

542
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff