1
0
mirror of synced 2026-02-09 00:00:11 -05:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Brandon Bayer
a0e6eeb7c5 v0.29.3 2021-01-20 17:22:57 -05:00
Brandon Bayer
0e7faefaf0 Fix relative imports from within API routes (patch) (#1761) 2021-01-20 17:18:09 -05:00
depfu[bot]
1008b2aebd Fix logging issues: Update tslog: 3.0.5 → 3.1.0 (patch) (#1760)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2021-01-20 17:17:54 -05:00
29 changed files with 79 additions and 67 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@examples/auth",
"version": "0.29.2",
"version": "0.29.3",
"scripts": {
"start": "blitz start",
"studio": "blitz prisma studio",
@@ -40,7 +40,7 @@
"dependencies": {
"@prisma/cli": "2.14.0",
"@prisma/client": "2.14.0",
"blitz": "0.29.2",
"blitz": "0.29.3",
"final-form": "4.20.1",
"passport-auth0": "1.4.0",
"passport-github2": "0.1.12",

View File

@@ -1,6 +1,6 @@
{
"name": "@examples/custom-server",
"version": "0.29.2",
"version": "0.29.3",
"scripts": {
"start": "nodemon --watch server.js --exec 'blitz start'",
"build": "blitz build",
@@ -41,7 +41,7 @@
"dependencies": {
"@prisma/cli": "2.14.0",
"@prisma/client": "2.14.0",
"blitz": "0.29.2",
"blitz": "0.29.3",
"final-form": "4.20.1",
"react": "0.0.0-experimental-4ead6b530",
"react-dom": "0.0.0-experimental-4ead6b530",

View File

@@ -1,6 +1,6 @@
{
"name": "@examples/fauna",
"version": "0.29.2",
"version": "0.29.3",
"scripts": {
"start": "blitz start",
"studio": "blitz prisma studio",
@@ -27,7 +27,7 @@
]
},
"dependencies": {
"blitz": "0.29.2",
"blitz": "0.29.3",
"final-form": "4.20.1",
"graphql": "15.4.0",
"graphql-request": "3.4.0",

View File

@@ -1,6 +1,6 @@
{
"name": "no-prisma",
"version": "0.29.2",
"version": "0.29.3",
"scripts": {
"start": "blitz start",
"build": "blitz build",
@@ -26,7 +26,7 @@
]
},
"dependencies": {
"blitz": "0.29.2",
"blitz": "0.29.3",
"knex": "0.21.15",
"react": "0.0.0-experimental-3310209d0",
"react-dom": "0.0.0-experimental-3310209d0",

View File

@@ -1,6 +1,6 @@
{
"name": "@examples/plain-js",
"version": "0.29.2",
"version": "0.29.3",
"scripts": {
"start": "blitz start",
"build": "blitz prisma migrate deploy --preview-feature && blitz build",
@@ -31,7 +31,7 @@
"dependencies": {
"@prisma/cli": "2.14.0",
"@prisma/client": "2.14.0",
"blitz": "0.29.2",
"blitz": "0.29.3",
"react": "0.0.0-experimental-3310209d0",
"react-dom": "0.0.0-experimental-3310209d0"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@examples/store",
"version": "0.29.2",
"version": "0.29.3",
"private": true,
"scripts": {
"build": "blitz prisma migrate deploy --preview-feature && blitz build",
@@ -22,7 +22,7 @@
"dependencies": {
"@prisma/cli": "2.14.0",
"@prisma/client": "2.14.0",
"blitz": "0.29.2",
"blitz": "0.29.3",
"final-form": "4.20.1",
"react": "0.0.0-experimental-3310209d0",
"react-dom": "0.0.0-experimental-3310209d0",

View File

@@ -1,5 +1,5 @@
{
"version": "0.29.2",
"version": "0.29.3",
"packages": ["packages/*"],
"npmClient": "yarn",
"useWorkspaces": true,

View File

@@ -1,7 +1,7 @@
{
"name": "blitz",
"description": "Blitz is a Rails-like framework for monolithic, full-stack React apps — built on Next.js",
"version": "0.29.2",
"version": "0.29.3",
"license": "MIT",
"scripts": {
"clean": "rimraf dist",
@@ -40,13 +40,13 @@
"url": "https://github.com/blitz-js/blitz"
},
"dependencies": {
"@blitzjs/cli": "0.29.2",
"@blitzjs/config": "0.29.2",
"@blitzjs/core": "0.29.2",
"@blitzjs/display": "0.29.2",
"@blitzjs/generator": "0.29.2",
"@blitzjs/installer": "0.29.2",
"@blitzjs/server": "0.29.2",
"@blitzjs/cli": "0.29.3",
"@blitzjs/config": "0.29.3",
"@blitzjs/core": "0.29.3",
"@blitzjs/display": "0.29.3",
"@blitzjs/generator": "0.29.3",
"@blitzjs/installer": "0.29.3",
"@blitzjs/server": "0.29.3",
"envinfo": "^7.7.3",
"os-name": "^4.0.0",
"pkg-dir": "^5.0.0",

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/cli",
"description": "Blitz.js CLI",
"version": "0.29.2",
"version": "0.29.3",
"license": "MIT",
"scripts": {
"b": "./bin/run",
@@ -30,8 +30,8 @@
"/lib"
],
"dependencies": {
"@blitzjs/display": "0.29.2",
"@blitzjs/repl": "0.29.2",
"@blitzjs/display": "0.29.3",
"@blitzjs/repl": "0.29.3",
"@oclif/command": "1.8.0",
"@oclif/config": "1.17.0",
"@oclif/plugin-autocomplete": "0.3.0",
@@ -60,9 +60,9 @@
"v8-compile-cache": "2.2.0"
},
"devDependencies": {
"@blitzjs/generator": "0.29.2",
"@blitzjs/installer": "0.29.2",
"@blitzjs/server": "0.29.2",
"@blitzjs/generator": "0.29.3",
"@blitzjs/installer": "0.29.3",
"@blitzjs/server": "0.29.3",
"@oclif/dev-cli": "1.26.0",
"@oclif/test": "1.2.8",
"@prisma/cli": "2.14.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/config",
"version": "0.29.2",
"version": "0.29.3",
"description": "Loads the blitz app config",
"license": "MIT",
"scripts": {

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/core",
"description": "Blitz.js core functionality",
"version": "0.29.2",
"version": "0.29.3",
"license": "MIT",
"scripts": {
"clean": "rimraf dist",
@@ -40,7 +40,7 @@
"url": "https://github.com/blitz-js/blitz"
},
"dependencies": {
"@blitzjs/display": "0.29.2",
"@blitzjs/display": "0.29.3",
"@types/secure-password": "3.1.0",
"b64-lite": "^1.4.0",
"bad-behavior": "^1.0.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/display",
"version": "0.29.2",
"version": "0.29.3",
"description": "Display package for the Blitz CLI",
"homepage": "https://github.com/blitz-js/blitz#readme",
"license": "MIT",
@@ -33,10 +33,10 @@
"url": "git+https://github.com/blitz-js/blitz.git"
},
"dependencies": {
"@blitzjs/display": "0.29.2",
"@blitzjs/display": "0.29.3",
"chalk": "^4.1.0",
"console-table-printer": "^2.7.5",
"ora": "^5.2.0",
"tslog": "^3.0.5"
"tslog": "^3.1.0"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/file-pipeline",
"version": "0.29.2",
"version": "0.29.3",
"description": "Display package for the Blitz CLI",
"homepage": "https://github.com/blitz-js/blitz#readme",
"license": "MIT",
@@ -32,7 +32,7 @@
"url": "git+https://github.com/blitz-js/blitz.git"
},
"dependencies": {
"@blitzjs/display": "0.29.2",
"@blitzjs/display": "0.29.3",
"chalk": "^4.1.0",
"chokidar": "3.4.3",
"flush-write-stream": "2.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/generator",
"version": "0.29.2",
"version": "0.29.3",
"description": "File generation for the Blitz CLI",
"homepage": "https://github.com/blitz-js/blitz#readme",
"license": "MIT",
@@ -36,7 +36,7 @@
"dependencies": {
"@babel/core": "7.12.10",
"@babel/plugin-transform-typescript": "7.12.1",
"@blitzjs/display": "0.29.2",
"@blitzjs/display": "0.29.3",
"@types/jscodeshift": "0.7.2",
"chalk": "^4.1.0",
"cross-spawn": "7.0.3",

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/installer",
"version": "0.29.2",
"version": "0.29.3",
"description": "Package installation for the Blitz CLI",
"homepage": "https://github.com/blitz-js/blitz#readme",
"license": "MIT",
@@ -36,9 +36,9 @@
"dependencies": {
"@babel/core": "7.12.10",
"@babel/plugin-transform-typescript": "7.12.1",
"@blitzjs/config": "0.29.2",
"@blitzjs/display": "0.29.2",
"@blitzjs/generator": "0.29.2",
"@blitzjs/config": "0.29.3",
"@blitzjs/display": "0.29.3",
"@blitzjs/generator": "0.29.3",
"@types/jscodeshift": "0.7.2",
"cross-spawn": "7.0.3",
"diff": "5.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/repl",
"version": "0.29.2",
"version": "0.29.3",
"description": "Repl package for Blitz CLI",
"homepage": "https://github.com/blitz-js/blitz/packages/repl/#readme",
"license": "MIT",

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/server",
"description": "Blitz.js server functionality",
"version": "0.29.2",
"version": "0.29.3",
"license": "MIT",
"bin": {
"next-patched": "./bin/next-patched"
@@ -34,7 +34,7 @@
]
},
"dependencies": {
"@blitzjs/file-pipeline": "0.29.2",
"@blitzjs/file-pipeline": "0.29.3",
"b64-lite": "^1.4.0",
"cookie": "^0.4.1",
"cross-spawn": "7.0.3",
@@ -65,7 +65,7 @@
"vinyl": "2.2.1"
},
"devDependencies": {
"@blitzjs/core": "0.29.2",
"@blitzjs/core": "0.29.3",
"next-transpile-modules": "6.0.0"
},
"gitHead": "d3b9fce0bdd251c2b1890793b0aa1cd77c1c0922"

View File

@@ -10,7 +10,7 @@ export function pagesPathTransformer(path: string) {
}
export function apiPathTransformer(path: string) {
const regex = /(?:[\\/]?app[\\/].*?[\\/]?)(api[\\/].+)$/
const regex = /(?:[\\/]?app[\\/].*?[\\/]?)(api[\\/].+(?<!\.test))$/
const matchedPath = (regex.exec(path) || [])[1]
return matchedPath ? join("pages", matchedPath) : path
}

View File

@@ -6,7 +6,7 @@ const isJavaScriptFile = (filepath: string) => filepath.match(/\.(ts|tsx|js|jsx)
const isInSpecialFolderInAppFolder = (s: string, cwd: string) => {
const filepath = s.replace(cwd + path.sep, "")
return /^app[/\\].*(pages|queries|mutations)[/\\]/.test(filepath)
return /^app[/\\].*(pages|api|queries|mutations)[/\\]/.test(filepath)
}
/**

View File

@@ -58,6 +58,12 @@ import from '../thing/bar'`,
import from "../thing/bar"
import from '../thing/bar'`,
},
{
path: normalize("/projects/blitz/blitz/app/auth/api/auth/foo.js"),
contents: `import {getFoo} from 'app/foo/bar';
import from "../thing/bar"
import from '../../thing/bar'`,
},
]
const expected = [
@@ -113,6 +119,12 @@ import from 'app/thing/bar'`,
import from "app/thing/bar"
import from 'app/thing/bar'`,
},
{
path: normalize("/projects/blitz/blitz/app/auth/api/auth/foo.js"),
contents: `import {getFoo} from 'app/foo/bar';
import from "app/auth/api/thing/bar"
import from 'app/auth/thing/bar'`,
},
]
const {stream} = createStageRelative(mockStageArgs({cwd: normalize("/projects/blitz/blitz")}))

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-base-web",
"private": true,
"version": "0.29.2",
"version": "0.29.3",
"description": "The Blitz Recipe for installing Base Web",
"main": "index.ts",
"scripts": {
@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"@blitzjs/installer": "0.29.2",
"@blitzjs/installer": "0.29.3",
"jscodeshift": "0.11.0"
},
"devDependencies": {

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-chakra",
"private": true,
"version": "0.29.2",
"version": "0.29.3",
"description": "The Blitz Recipe for installing Chakra UI",
"main": "index.ts",
"scripts": {
@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"@blitzjs/installer": "0.29.2",
"@blitzjs/installer": "0.29.3",
"jscodeshift": "0.11.0"
},
"devDependencies": {

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-emotion",
"private": true,
"version": "0.29.2",
"version": "0.29.3",
"description": "The Blitz Recipe for installing Emotion",
"main": "index.ts",
"scripts": {
@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"@blitzjs/installer": "0.29.2",
"@blitzjs/installer": "0.29.3",
"jscodeshift": "0.11.0"
},
"devDependencies": {

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-material-ui",
"private": true,
"version": "0.29.2",
"version": "0.29.3",
"description": "The Blitz Recipe for installing Material-UI",
"main": "index.ts",
"scripts": {
@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"@blitzjs/installer": "0.29.2",
"@blitzjs/installer": "0.29.3",
"jscodeshift": "0.11.0"
},
"devDependencies": {

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-reflexjs",
"private": true,
"version": "0.29.2",
"version": "0.29.3",
"description": "The Blitz Recipe for installing Reflexjs",
"main": "index.ts",
"scripts": {
@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"@blitzjs/installer": "0.29.2",
"@blitzjs/installer": "0.29.3",
"jscodeshift": "0.11.0"
},
"devDependencies": {

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-render",
"private": true,
"version": "0.29.2",
"version": "0.29.3",
"description": "The Blitz Recipe for adding render.yaml",
"main": "index.ts",
"scripts": {
@@ -22,6 +22,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"@blitzjs/installer": "0.29.2"
"@blitzjs/installer": "0.29.3"
}
}

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-tailwind",
"private": true,
"version": "0.29.2",
"version": "0.29.3",
"description": "The Blitz Recipe for installing Tailwind CSS",
"main": "index.ts",
"scripts": {
@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"@blitzjs/installer": "0.29.2",
"@blitzjs/installer": "0.29.3",
"jscodeshift": "0.11.0"
},
"devDependencies": {

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-theme-ui",
"private": true,
"version": "0.29.2",
"version": "0.29.3",
"description": "The Blitz Recipe for installing Theme UI",
"main": "index.ts",
"scripts": {
@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"@blitzjs/installer": "0.29.2",
"@blitzjs/installer": "0.29.3",
"jscodeshift": "0.11.0"
},
"devDependencies": {

View File

@@ -17830,10 +17830,10 @@ tslib@^1, tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tslog@^3.0.5:
version "3.0.5"
resolved "https://registry.yarnpkg.com/tslog/-/tslog-3.0.5.tgz#ea4243cde2bd64e5fbfedbec0a78d298b9504c46"
integrity sha512-WyI2zFa6rVzXja6bKIZ9VeRKwHceqlUzCCo2IMsi6X5oswij95s3GJKve1Pr5bdlVIUMTsWaT/wtBiL7MT4PLQ==
tslog@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/tslog/-/tslog-3.1.0.tgz#e169c974c297bdec160a17a4dc19acd86f65b4e8"
integrity sha512-q3Itu9GGBd9ijZ3HF+lUB6E4N+qlGxVpGxBTIIMuMSQbYDE3gg/TOCsywtKFxVtqvmS9aCyKw/xeUxfvrx+oMQ==
dependencies:
source-map-support "^0.5.19"