Skip to content

Commit

Permalink
Merge branch 'canary' into move-display-package
Browse files Browse the repository at this point in the history
  • Loading branch information
beerose committed Nov 19, 2021
2 parents 906b41a + b23c2cd commit 3cac34d
Show file tree
Hide file tree
Showing 105 changed files with 380 additions and 652 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -3471,6 +3471,16 @@
"contributions": [
"doc"
]
},
{
"login": "noxify",
"name": "Marcus Reinhardt",
"avatar_url": "https://avatars.githubusercontent.com/u/521777?v=4",
"profile": "https://jammeryhq.com",
"contributions": [
"doc",
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-368-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-369-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/canary/LICENSE">
<img alt="" src="https://img.shields.io/npm/l/blitz.svg?style=for-the-badge&labelColor=000000&color=blue">
Expand Down Expand Up @@ -728,6 +728,7 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
<td align="center"><a href="https://danestves.com/"><img src="https://avatars.githubusercontent.com/u/31737273?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Daniel Esteves</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=danestves" title="Documentation">📖</a></td>
<td align="center"><a href="http://www.bitnative.com"><img src="https://avatars.githubusercontent.com/u/1688997?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cory House</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=coryhouse" title="Documentation">📖</a></td>
<td align="center"><a href="https://auspham.dev/"><img src="https://avatars.githubusercontent.com/u/16440123?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Austin (Thang Pham)</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=rockmanvnx6" title="Documentation">📖</a></td>
<td align="center"><a href="https://jammeryhq.com"><img src="https://avatars.githubusercontent.com/u/521777?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Marcus Reinhardt</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=noxify" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=noxify" title="Code">💻</a></td>
</tr>
</table>

Expand Down
2 changes: 1 addition & 1 deletion examples/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"dependencies": {
"@prisma/client": "2.24.1",
"blitz": "0.42.4",
"blitz": "0.43.0",
"final-form": "4.20.1",
"passport-auth0": "1.4.0",
"passport-github2": "0.1.12",
Expand Down
5 changes: 3 additions & 2 deletions examples/custom-server/app/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import {Link, BlitzPage, useMutation} from "blitz"
import {Link, BlitzPage, useMutation, Image} from "blitz"
import Layout from "app/layouts/Layout"
import logout from "app/auth/mutations/logout"
import {useCurrentUser} from "app/hooks/useCurrentUser"
import {Suspense} from "react"
import logo from "public/logo.png"

/*
* This file is just for a pleasant getting started page for your new app.
Expand Down Expand Up @@ -54,7 +55,7 @@ const Home: BlitzPage = () => {
<div className="container">
<main>
<div className="logo">
<img src="/logo.png" alt="blitz.js" />
<Image src={logo} alt="blitz.js" />
</div>
<p>
<strong>Congrats!</strong> Your app is ready, including user sign-up and log-in.
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@prisma/client": "2.24.1",
"blitz": "0.42.4",
"blitz": "0.43.0",
"final-form": "4.20.1",
"prisma": "2.24.1",
"react": "0.0.0-experimental-6a589ad71",
Expand Down
2 changes: 1 addition & 1 deletion examples/cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"dependencies": {
"@prisma/client": "2.24.1",
"blitz": "0.42.4",
"blitz": "0.43.0",
"final-form": "4.20.1",
"react": "0.0.0-experimental-6a589ad71",
"react-dom": "0.0.0-experimental-6a589ad71",
Expand Down
2 changes: 1 addition & 1 deletion examples/fauna/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
]
},
"dependencies": {
"blitz": "0.42.4",
"blitz": "0.43.0",
"final-form": "4.20.1",
"graphql": "15.5.0",
"graphql-request": "3.4.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { LabeledTextField } from "app/core/components/LabeledTextField"
import { Form, FORM_ERROR } from "app/core/components/Form"
import login from "app/auth/mutations/login"
import { Login } from "app/auth/validations"
import { useI18n, I18nProps } from "next-rosetta"
import { useI18n } from "next-rosetta"
import type { MyLocale } from "app/core/i18n"

type LoginFormProps = {
Expand Down
2 changes: 1 addition & 1 deletion examples/i18n-next-rosetta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"@prisma/client": "2.24.1",
"blitz": "0.42.4",
"blitz": "0.43.0",
"final-form": "4.20.1",
"next-rosetta": "1.3.1",
"react": "0.0.0-experimental-6a589ad71",
Expand Down
2 changes: 1 addition & 1 deletion examples/no-prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
]
},
"dependencies": {
"blitz": "0.42.4",
"blitz": "0.43.0",
"knex": "0.21.16",
"react": "0.0.0-experimental-6a589ad71",
"react-dom": "0.0.0-experimental-6a589ad71",
Expand Down
2 changes: 1 addition & 1 deletion examples/plain-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@prisma/client": "2.24.1",
"blitz": "0.42.4",
"blitz": "0.43.0",
"prisma": "2.24.1",
"react": "0.0.0-experimental-6a589ad71",
"react-dom": "0.0.0-experimental-6a589ad71"
Expand Down
5 changes: 3 additions & 2 deletions examples/static/app/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { BlitzPage } from "blitz"
import { BlitzPage, Image } from "blitz"
import Layout from "app/core/layouts/Layout"
import logo from "public/logo.png"

const Home: BlitzPage = () => {
return (
<div className="container">
<main>
<div className="logo">
<img src="/logo.png" alt="blitz.js" />
<Image src={logo} alt="blitz.js" />
</div>
<p>
<strong>Congrats!</strong> Your static app is ready.
Expand Down
2 changes: 1 addition & 1 deletion examples/static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@prisma/client": "2.24.1",
"blitz": "0.42.4",
"blitz": "0.43.0",
"final-form": "4.20.1",
"prisma": "2.24.1",
"react": "0.0.0-experimental-6a589ad71",
Expand Down
2 changes: 1 addition & 1 deletion examples/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"@prisma/client": "2.24.1",
"blitz": "0.42.4",
"blitz": "0.43.0",
"final-form": "4.20.1",
"prisma": "2.24.1",
"react": "0.0.0-experimental-6a589ad71",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.42.4",
"version": "0.43.0",
"packages": ["packages/*"],
"npmClient": "yarn",
"useWorkspaces": true,
Expand Down
2 changes: 1 addition & 1 deletion nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"tailwindcss": "1.1.3",
"taskr": "1.1.0",
"tree-kill": "1.2.2",
"typescript": "4.4.2",
"typescript": "4.5.2",
"wait-port": "0.2.2",
"web-streams-polyfill": "2.1.1",
"webpack-bundle-analyzer": "4.3.0",
Expand Down
2 changes: 1 addition & 1 deletion nextjs/packages/create-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"prompts": "2.1.0",
"rimraf": "3.0.0",
"tar": "6.1.11",
"typescript": "4.3.4",
"typescript": "4.5.2",
"update-check": "1.5.4",
"validate-npm-package-name": "3.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion nextjs/packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-blitz",
"version": "0.42.4",
"version": "0.43.0",
"description": "Blitz.js eslint config",
"main": "index.js",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions nextjs/packages/next/build/babel/loader/get-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ function getPlugins(
{ type: 'plugin' }
)
: null
const fixNodeFileTraceItem =
isServer && isPageFile
? createConfigItem([require('../plugins/fix-node-file-trace')], {
type: 'plugin',
})
: null

return [
noAnonymousDefaultExportItem,
Expand All @@ -158,6 +164,7 @@ function getPlugins(
transformDefineItem,
nextSsgItem,
commonJsItem,
fixNodeFileTraceItem,
].filter(Boolean)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ function wrapInHOF(
): t.Expression {
const program = path.findParent(t.isProgram) as NodePath<t.Program>
if (!program) throw new Error('Missing parent')
// eslint-disable-next-line no-shadow
const hasMiddlewareExport = program.node.body.find((path) => {
if (!t.isExportNamedDeclaration(path)) return null
if (!path.declaration) return null
if (!t.isVariableDeclaration(path.declaration)) return null
// eslint-disable-next-line no-shadow
const variableDeclarator = path.declaration.declarations.find((path) =>
t.isVariableDeclarator(path)
)
Expand Down
Loading

0 comments on commit 3cac34d

Please sign in to comment.