1
0
mirror of synced 2026-02-05 06:00:08 -05:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Brandon Bayer
fb32903bf9 2.0.0-alpha.4 fix more cli stuff 2022-04-14 21:13:57 -04:00
Brandon Bayer
8dedca1a29 2.0.0-alpha.3 - fix cli esm problem 2022-04-14 21:04:51 -04:00
20 changed files with 104 additions and 115 deletions

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
downgrade pkg-dir to non-esm only version

View File

@@ -14,5 +14,5 @@
"@blitzjs/generator": "2.0.0-alpha.0",
"template": "0.0.0"
},
"changesets": ["ninety-pets-heal", "poor-peas-lick"]
"changesets": ["nine-onions-admire", "ninety-pets-heal", "poor-peas-lick", "ten-rivers-burn"]
}

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
fix more cli problems

View File

@@ -17,7 +17,8 @@
"test": "turbo run test",
"clean": "turbo run clean && rm -rf node_modules",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"release": "changeset publish && git push --follow-tags"
"pre-publish": "pnpm i && pnpm build && changeset add && changeset version",
"publish-release": "changeset publish && git push --follow-tags"
},
"dependencies": {
"@blitzjs/manypkg": "0.19.1",

View File

@@ -1,5 +1,19 @@
# @blitzjs/auth
## 2.0.0-alpha.4
### Patch Changes
- Updated dependencies
- blitz@2.0.0-alpha.4
## 2.0.0-alpha.3
### Patch Changes
- Updated dependencies
- blitz@2.0.0-alpha.3
## 2.0.0-alpha.2
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/auth",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.4",
"scripts": {
"build": "unbuild",
"predev": "wait-on -d 250 ../blitz/dist/index-server.d.ts",

View File

@@ -1,5 +1,17 @@
# @blitzjs/next
## 2.0.0-alpha.4
### Patch Changes
- @blitzjs/rpc@2.0.0-alpha.4
## 2.0.0-alpha.3
### Patch Changes
- @blitzjs/rpc@2.0.0-alpha.3
## 2.0.0-alpha.2
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/next",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.4",
"scripts": {
"build": "unbuild",
"dev": "pnpm predev && pnpm watch unbuild src --wait=0.2",
@@ -20,7 +20,7 @@
"dist/**"
],
"dependencies": {
"@blitzjs/rpc": "2.0.0-alpha.2",
"@blitzjs/rpc": "2.0.0-alpha.4",
"debug": "4.3.3",
"fs-extra": "10.0.1",
"react-query": "3.21.1"

View File

@@ -1,5 +1,21 @@
# @blitzjs/rpc
## 2.0.0-alpha.4
### Patch Changes
- Updated dependencies
- blitz@2.0.0-alpha.4
- @blitzjs/auth@2.0.0-alpha.4
## 2.0.0-alpha.3
### Patch Changes
- Updated dependencies
- blitz@2.0.0-alpha.3
- @blitzjs/auth@2.0.0-alpha.3
## 2.0.0-alpha.2
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/rpc",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.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",
@@ -20,7 +20,7 @@
"dist/**"
],
"dependencies": {
"@blitzjs/auth": "2.0.0-alpha.2",
"@blitzjs/auth": "2.0.0-alpha.4",
"b64-lite": "1.4.0",
"bad-behavior": "1.0.1",
"chalk": "^4.1.0",
@@ -33,7 +33,7 @@
"@types/debug": "4.1.7",
"@types/react": "17.0.43",
"@types/react-dom": "17.0.14",
"blitz": "2.0.0-alpha.2",
"blitz": "2.0.0-alpha.4",
"next": "12.1.1",
"react": "18.0.0",
"react-dom": "18.0.0",
@@ -42,7 +42,7 @@
"watch": "1.0.2"
},
"peerDependencies": {
"blitz": "2.0.0-alpha.2",
"blitz": "2.0.0-alpha.4",
"next": "*"
},
"publishConfig": {

View File

@@ -1,5 +1,19 @@
# blitz
## 2.0.0-alpha.4
### Patch Changes
- fix more cli problems
- @blitzjs/generator@2.0.0-alpha.4
## 2.0.0-alpha.3
### Patch Changes
- downgrade pkg-dir to non-esm only version
- @blitzjs/generator@2.0.0-alpha.3
## 2.0.0-alpha.2
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "blitz",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.4",
"scripts": {
"build": "unbuild",
"dev": "watch unbuild src --wait=0.2",
@@ -38,7 +38,7 @@
"npm-which": "3.0.1",
"ora": "5.3.0",
"p-event": "4.2.0",
"pkg-dir": "6.0.1",
"pkg-dir": "5.0.0",
"prompts": "2.4.2",
"resolve-cwd": "3.0.0",
"superjson": "1.8.0",

View File

@@ -56,12 +56,15 @@ if (!foundCommand && args["--help"]) {
console.log(`
Usage
$ blitz <command>
Available commands
${Object.keys(commands).join(", ")}
Options
--env, -e App environment name
--version, -v Version number
--help, -h Displays this message
For more information run a command with the --help flag
$ blitz build --help
`)
@@ -71,20 +74,6 @@ if (!foundCommand && args["--help"]) {
const command = foundCommand ? (args._[0] as string) : defaultCommand
const forwardedArgs = foundCommand ? args._.slice(1) : args._
// Don't check for react or react-dom when running blitz new
if (command !== "new") {
;["react", "react-dom"].forEach((dependency) => {
try {
// When 'npm link' is used it checks the clone location. Not the project.
require.resolve(dependency)
} catch (err) {
console.warn(
`The module '${dependency}' was not found. Blitz.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install ${dependency}'`,
)
}
})
}
if (args["--help"]) {
forwardedArgs.push("--help")
}
@@ -117,21 +106,3 @@ commands[command]?.()
.catch((err) => {
console.log(err)
})
if (command === "dev") {
const {watchFile} = require("fs")
watchFile(`${process.cwd()}/blitz.config.js`, (cur: any, prev: any) => {
if (cur.size > 0 || prev.size > 0) {
console.log(
`\n> Found a change in blitz.config.js. Restart the server to see the changes in effect.`,
)
}
})
watchFile(`${process.cwd()}/blitz.config.ts`, (cur: any, prev: any) => {
if (cur.size > 0 || prev.size > 0) {
console.log(
`\n> Found a change in blitz.config.ts. Restart the server to see the changes in effect.`,
)
}
})
}

View File

@@ -2,12 +2,12 @@ import fs, {promises} from "fs"
import {join, resolve} from "path"
import {readJSON} from "fs-extra"
import path from "path"
import {packageDirectory} from "pkg-dir"
import pkgDir from "pkg-dir"
import resolveCwd from "resolve-cwd"
const debug = require("debug")("blitz:utils")
export async function resolveBinAsync(pkg: string, executable = pkg) {
const packageDir = await packageDirectory({cwd: resolveCwd(pkg)})
const packageDir = await pkgDir(resolveCwd(pkg))
if (!packageDir) throw new Error(`Could not find package.json for '${pkg}'`)
const {bin} = await readJSON(path.join(packageDir, "package.json"))

View File

@@ -4,7 +4,7 @@ import detect from "detect-port"
import path from "path"
import {existsSync, readJSONSync} from "fs-extra"
import * as esbuild from "esbuild"
import {packageDirectorySync} from "pkg-dir"
import pkgDir from "pkg-dir"
import type {ServerConfig} from "./config"
const debug = require("debug")("blitz:utils")
@@ -50,7 +50,7 @@ export function getCustomServerBuildPath() {
}
const getEsbuildOptions = (): esbuild.BuildOptions => {
const pkg = readJSONSync(path.join(packageDirectorySync()!, "package.json"))
const pkg = readJSONSync(path.join(pkgDir.sync()!, "package.json"))
return {
entryPoints: [getCustomServerPath()],
outfile: getCustomServerBuildPath(),

View File

@@ -1,5 +1,9 @@
# @blitzjs/config
## 2.0.0-alpha.4
## 2.0.0-alpha.3
## 2.0.0-alpha.2
## 2.0.0-alpha.1

View File

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

View File

@@ -1,5 +1,9 @@
# @blitzjs/generator
## 2.0.0-alpha.4
## 2.0.0-alpha.3
## 2.0.0-alpha.2
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/generator",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.4",
"scripts": {
"dev": "watch unbuild src --wait=0.2",
"build": "unbuild && pnpm build:templates",

75
pnpm-lock.yaml generated
View File

@@ -229,7 +229,7 @@ importers:
npm-which: 3.0.1
ora: 5.3.0
p-event: 4.2.0
pkg-dir: 6.0.1
pkg-dir: 5.0.0
prompts: 2.4.2
react: 18.0.0
resolve-cwd: 3.0.0
@@ -256,7 +256,7 @@ importers:
npm-which: 3.0.1
ora: 5.3.0
p-event: 4.2.0
pkg-dir: 6.0.1
pkg-dir: 5.0.0
prompts: 2.4.2
resolve-cwd: 3.0.0
superjson: 1.8.0
@@ -345,7 +345,7 @@ importers:
packages/blitz-next:
specifiers:
"@blitzjs/config": workspace:*
"@blitzjs/rpc": 2.0.0-alpha.1
"@blitzjs/rpc": 2.0.0-alpha.3
"@testing-library/dom": 8.13.0
"@testing-library/jest-dom": 5.16.3
"@testing-library/react": 13.0.0
@@ -397,14 +397,14 @@ importers:
packages/blitz-rpc:
specifiers:
"@blitzjs/auth": 2.0.0-alpha.1
"@blitzjs/auth": 2.0.0-alpha.3
"@blitzjs/config": workspace:*
"@types/debug": 4.1.7
"@types/react": 17.0.43
"@types/react-dom": 17.0.14
b64-lite: 1.4.0
bad-behavior: 1.0.1
blitz: 2.0.0-alpha.1
blitz: 2.0.0-alpha.3
chalk: ^4.1.0
debug: 4.3.3
next: 12.1.1
@@ -8001,17 +8001,6 @@ packages:
path-exists: 4.0.0
dev: false
/find-up/6.3.0:
resolution:
{
integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==,
}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dependencies:
locate-path: 7.1.0
path-exists: 5.0.0
dev: false
/find-yarn-workspace-root/2.0.0:
resolution:
{
@@ -10471,16 +10460,6 @@ packages:
p-locate: 5.0.0
dev: false
/locate-path/7.1.0:
resolution:
{
integrity: sha512-HNx5uOnYeK4SxEoid5qnhRfprlJeGMzFRKPLCf/15N3/B4AiofNwC/yq7VBKdVk9dx7m+PiYCJOGg55JYTAqoQ==,
}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dependencies:
p-locate: 6.0.0
dev: false
/lodash.clonedeep/4.5.0:
resolution: {integrity: sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=}
dev: false
@@ -11661,16 +11640,6 @@ packages:
yocto-queue: 0.1.0
dev: false
/p-limit/4.0.0:
resolution:
{
integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==,
}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dependencies:
yocto-queue: 1.0.0
dev: false
/p-locate/2.0.0:
resolution: {integrity: sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=}
engines: {node: ">=4"}
@@ -11708,16 +11677,6 @@ packages:
p-limit: 3.1.0
dev: false
/p-locate/6.0.0:
resolution:
{
integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==,
}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dependencies:
p-limit: 4.0.0
dev: false
/p-map/2.1.0:
resolution:
{
@@ -11869,14 +11828,6 @@ packages:
engines: {node: ">=8"}
dev: false
/path-exists/5.0.0:
resolution:
{
integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==,
}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dev: false
/path-is-absolute/1.0.1:
resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=}
engines: {node: ">=0.10.0"}
@@ -12004,14 +11955,14 @@ packages:
find-up: 4.1.0
dev: false
/pkg-dir/6.0.1:
/pkg-dir/5.0.0:
resolution:
{
integrity: sha512-C9R+PTCKGA32HG0n5I4JMYkdLL58ZpayVuncQHQrGeKa8o26A4o2x0u6BKekHG+Au0jv5ZW7Xfq1Cj6lm9Ag4w==,
integrity: sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==,
}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
engines: {node: ">=10"}
dependencies:
find-up: 6.3.0
find-up: 5.0.0
dev: false
/pkg-types/0.3.2:
@@ -15185,14 +15136,6 @@ packages:
engines: {node: ">=10"}
dev: false
/yocto-queue/1.0.0:
resolution:
{
integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==,
}
engines: {node: ">=12.20"}
dev: false
/zod/3.10.1:
resolution:
{