Skip to content

Commit

Permalink
Merge branch 'main' into fix/generator-loads-hardcoded-prisma-schema-…
Browse files Browse the repository at this point in the history
…path
  • Loading branch information
Zeko369 authored Oct 3, 2022
2 parents 26cdd04 + 8e0c9d7 commit ef3efc9
Show file tree
Hide file tree
Showing 175 changed files with 8,350 additions and 347 deletions.
2 changes: 1 addition & 1 deletion .changeset/honest-cherries-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"blitz": patch
---

Add a global Blitz version check when generating a new Blitz project to ensure users use the latest Blitz.
Add a global Blitz version check when generating a new Blitz project to ensure users use the latest Blitz.
5 changes: 5 additions & 0 deletions .changeset/thirty-spies-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@blitzjs/rpc": patch
"blitz": patch
---
Migrate over recipe functionality from legacy framework & expose recipe builder helper functions that find and modify next.config.js, blitz-server & blitz-client.
3 changes: 1 addition & 2 deletions .github/workflows/changeset_check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Changeset

on:
on:
pull_request:
types: [opened, synchronize, labeled, unlabeled]

Expand All @@ -24,4 +24,3 @@ jobs:
- name: Check if changeset is added
run: |
npx @changesets/[email protected] status --since=origin/${GITHUB_BASE_REF}
8 changes: 8 additions & 0 deletions integration-tests/get-initial-props/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {defineConfig} from "vitest/config"

export default defineConfig({
test: {
testTimeout: 5000 * 60 * 2,
hookTimeout: 100000,
},
})
1 change: 1 addition & 0 deletions integration-tests/middleware/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {defineConfig} from "vitest/config"

export default defineConfig({
test: {
testTimeout: 5000 * 60 * 2,
hookTimeout: 100000,
},
})
10 changes: 6 additions & 4 deletions integration-tests/qm/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/// <reference types="vitest" />

import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import {defineConfig} from "vitest/config"
import react from "@vitejs/plugin-react"

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
test: {
environment: 'jsdom',
environment: "jsdom",
testTimeout: 5000 * 60 * 2,
hookTimeout: 100000,
},
})
})
8 changes: 8 additions & 0 deletions integration-tests/trailing-slash/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {defineConfig} from "vitest/config"

export default defineConfig({
test: {
testTimeout: 5000 * 60 * 2,
hookTimeout: 100000,
},
})
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"workspaces": [
"apps/*",
"packages/*",
"integration-tests/*"
"integration-tests/*",
"recipes/*"
],
"scripts": {
"preinstall": "npx only-allow pnpm",
Expand Down Expand Up @@ -38,7 +39,7 @@
"wait-on": "6.0.1"
},
"npmClient": "pnpm",
"packageManager": "pnpm@7.4.0-1",
"packageManager": "pnpm@7.11.0",
"manypkg": {
"ignoredRules": [
"EXTERNAL_MISMATCH"
Expand Down
2 changes: 1 addition & 1 deletion packages/blitz-rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.0.0-beta.4",
"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",
"predev": "wait-on -d 400 ../blitz/dist/index-server.d.ts && wait-on -d 400 ../blitz-auth/dist/index-browser.d.ts",
"dev": "pnpm run predev && watch unbuild src --wait=0.2",
"lint": "eslint . --fix",
"test": "vitest run",
Expand Down
2 changes: 1 addition & 1 deletion packages/blitz/build.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {BuildConfig} from "unbuild"

const config: BuildConfig = {
entries: ["./src/index-browser", "./src/index-server", "./src/cli/index"],
entries: ["./src/index-browser", "./src/index-server", "./src/cli/index", "./src/installer"],
externals: ["index-browser.cjs", "index-browser.mjs", "index.cjs", "zod", "react"],
declaration: true,
rollup: {
Expand Down
1 change: 1 addition & 0 deletions packages/blitz/installer.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./dist/installer"
1 change: 1 addition & 0 deletions packages/blitz/installer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("./dist/installer.cjs")
17 changes: 15 additions & 2 deletions packages/blitz/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"version": "2.0.0-beta.4",
"scripts": {
"build": "unbuild",
"dev": "watch unbuild src --wait=0.2",
"dev": "pnpm run predev && watch unbuild src --wait=0.2",
"lint": "eslint . --fix",
"test": "vitest run",
"test-watch": "vitest",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"predev": "wait-on -d 250 ../generator/dist/index.d.ts"
},
"main": "./dist/index-server.cjs",
"module": "./dist/index-server.mjs",
Expand All @@ -24,23 +25,32 @@
},
"dependencies": {
"@blitzjs/generator": "2.0.0-beta.4",
"@mrleebo/prisma-ast": "0.2.6",
"@types/global-agent": "2.1.1",
"arg": "5.0.1",
"ast-types": "0.14.2",
"boxen": "7.0.0",
"chalk": "^4.1.0",
"chokidar": "3.5.3",
"console-table-printer": "2.10.0",
"cross-spawn": "7.0.3",
"debug": "4.3.3",
"detect-port": "1.3.0",
"diff": "5.0.0",
"dotenv": "16.0.0",
"dotenv-expand": "8.0.3",
"envinfo": "7.8.1",
"esbuild": "0.14.34",
"esbuild-register": "3.3.3",
"find-up": "4.1.0",
"fs-extra": "10.0.1",
"global-agent": "3.0.0",
"globby": "13.1.2",
"got": "^11.8.1",
"hasbin": "1.2.3",
"ink": "3.2.0",
"ink-spinner": "4.0.3",
"jscodeshift": "0.13.0",
"node-fetch": "3.2.3",
"npm-which": "3.0.1",
"ora": "5.3.0",
Expand All @@ -49,10 +59,12 @@
"pkg-dir": "5.0.0",
"progress": "2.0.3",
"prompts": "2.4.2",
"recast": "0.20.5",
"resolve-cwd": "3.0.0",
"resolve-from": "5.0.0",
"superjson": "1.9.1",
"supports-color": "8.1.1",
"tar": "6.1.11",
"ts-node": "10.7.0",
"tsconfig-paths": "4.0.0",
"tslog": "3.3.1",
Expand All @@ -68,6 +80,7 @@
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",
"@types/hasbin": "1.2.0",
"@types/jscodeshift": "0.11.2",
"@types/node-fetch": "2.6.1",
"@types/npm-which": "3.0.1",
"@types/progress": "2.0.5",
Expand Down
4 changes: 1 addition & 3 deletions packages/blitz/src/cli/commands/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ const consoleREPL: CliCommand = async () => {
process.env.CLI_COMMAND_CONSOLE = "true"
log.branded("You have entered the Blitz console")
console.log(chalk.yellow("Tips: - Exit by typing .exit or pressing Ctrl-D"))
console.log(
chalk.yellow(` - Use your db like this: ${getDbFolder()}.project.findMany()`),
)
console.log(chalk.yellow(` - Use your db like this: ${getDbFolder()}.project.findMany()`))
console.log(chalk.yellow(" - Use your queries/mutations like this: getProjects({})"))

const {register} = require("esbuild-register/dist/node")
Expand Down
Loading

0 comments on commit ef3efc9

Please sign in to comment.