Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f2b5ac7fd | ||
|
|
2ca414097a | ||
|
|
aef27ff9ec | ||
|
|
43f9cc2fc8 | ||
|
|
7b4dbda691 | ||
|
|
4e8d1144c8 | ||
|
|
8a4fdd9afe | ||
|
|
012fce30bb | ||
|
|
47db0c0252 |
@@ -2870,6 +2870,15 @@
|
||||
"test",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ricardo-rp",
|
||||
"name": "Ricardo Romero",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/30808767?v=4",
|
||||
"profile": "https://github.com/ricardo-rp",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
|
||||
228
.github/workflows/main.yml
vendored
228
.github/workflows/main.yml
vendored
@@ -50,13 +50,11 @@ jobs:
|
||||
env:
|
||||
CI: true
|
||||
|
||||
build:
|
||||
build-linux:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
outputs:
|
||||
docsChange: ${{ steps.docs-change.outputs.DOCS_CHANGE }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
@@ -82,34 +80,26 @@ jobs:
|
||||
- run: yarn install --frozen-lockfile --check-files
|
||||
- name: Build Packages
|
||||
run: yarn build
|
||||
- run: node run-tests.js --timings --write-timings -g 1/1
|
||||
working-directory: nextjs
|
||||
- name: Check docs only change
|
||||
working-directory: nextjs
|
||||
run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
|
||||
id: docs-change
|
||||
- run: echo ${{steps.docs-change.outputs.DOCS_CHANGE}}
|
||||
- uses: actions/cache@v2
|
||||
id: cache-build
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
key: ${{ runner.os }}-${{ github.sha }}
|
||||
|
||||
testBlitzPackages:
|
||||
name: Blitz - Test Packages
|
||||
needs: build
|
||||
needs: build-linux
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
steps:
|
||||
- uses: actions/cache@v2
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
id: restore-build
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
key: ${{ runner.os }}-${{ github.sha }}
|
||||
- name: Setup kernel to increase watchers
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
if: runner.os == 'Linux'
|
||||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
- name: Test Blitz Packages
|
||||
run: yarn testonly:packages
|
||||
@@ -118,11 +108,33 @@ jobs:
|
||||
|
||||
testBlitzExamples:
|
||||
timeout-minutes: 30
|
||||
name: Blitz - Test Example Apps
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: Blitz - Test Example Apps (ubuntu-latest)
|
||||
needs: build-linux
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
steps:
|
||||
- uses: actions/cache@v2
|
||||
id: restore-build
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ runner.os }}-${{ github.sha }}
|
||||
# Needed to get cypress binary
|
||||
- run: yarn cypress install
|
||||
- name: Install sass
|
||||
run: yarn install -W sass
|
||||
- name: Setup kernel to increase watchers
|
||||
if: runner.os == 'Linux'
|
||||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
- name: Test examples
|
||||
run: yarn testonly:examples
|
||||
env:
|
||||
CI: true
|
||||
|
||||
testBlitzExamplesWin:
|
||||
timeout-minutes: 30
|
||||
name: Blitz - Test Example Apps (windows-latest)
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
steps:
|
||||
@@ -134,31 +146,26 @@ jobs:
|
||||
with:
|
||||
node-version: "14"
|
||||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: Cache node_modules
|
||||
id: yarn-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
**/node_modules
|
||||
key: ${{ runner.os }}-${{ runner.node_version}}-yarn-v13-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ runner.node_version}}-yarn-v13-
|
||||
# - name: Get yarn cache directory path
|
||||
# id: yarn-cache-dir-path
|
||||
# run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
# - name: Cache node_modules
|
||||
# id: yarn-cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: |
|
||||
# ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
# **/node_modules
|
||||
# key: ${{ runner.os }}-${{ runner.node_version}}-yarn-v13-${{ hashFiles('yarn.lock') }}
|
||||
# restore-keys: |
|
||||
# ${{ runner.os }}-${{ runner.node_version}}-yarn-v13-
|
||||
- run: yarn install --frozen-lockfile --check-files
|
||||
# - run: yarn cpy node_modules/.blitz packages/core/node_modules/.blitz
|
||||
# if: matrix.os == 'windows-latest'
|
||||
- name: Build Packages
|
||||
run: yarn build
|
||||
# Needed to get cypress binary
|
||||
- run: yarn cypress install
|
||||
- name: Install sass
|
||||
run: yarn install -W sass
|
||||
- name: Setup kernel to increase watchers
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
- name: Test examples
|
||||
run: yarn testonly:examples
|
||||
env:
|
||||
@@ -170,18 +177,16 @@ jobs:
|
||||
run:
|
||||
working-directory: nextjs
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: build-linux
|
||||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
steps:
|
||||
- uses: actions/cache@v2
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
id: restore-build
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
key: ${{ runner.os }}-${{ github.sha }}
|
||||
- run: ./check-pre-compiled.sh
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
|
||||
testUnit:
|
||||
name: Nextjs - Test Unit
|
||||
@@ -189,47 +194,74 @@ jobs:
|
||||
run:
|
||||
working-directory: nextjs
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: build-linux
|
||||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
NEXT_TEST_JOB: 1
|
||||
HEADLESS: true
|
||||
steps:
|
||||
- uses: actions/cache@v2
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
id: restore-build
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
|
||||
- run: node run-tests.js --timings --type unit -g 1/1
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
key: ${{ runner.os }}-${{ github.sha }}
|
||||
- run: node run-tests.js --type unit -g 1/1
|
||||
|
||||
testIntegrationBlitz:
|
||||
name: Blitz - Test Integration
|
||||
needs: build-linux
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
NEXT_TEST_JOB: 1
|
||||
HEADLESS: true
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- run: echo ${{needs.build.outputs.docsChange}}
|
||||
- uses: actions/cache@v2
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
id: restore-build
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
key: ${{ runner.os }}-${{ github.sha }}
|
||||
|
||||
# TODO: remove after we fix watchpack watching too much
|
||||
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
- name: Setup kernel to increase watchers
|
||||
if: runner.os == 'Linux'
|
||||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
|
||||
- run: xvfb-run node nextjs/run-tests.js -c 3
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
|
||||
testIntegrationBlitzWin:
|
||||
name: Blitz - Test Integration (Windows)
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
NEXT_TEST_JOB: 1
|
||||
HEADLESS: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 25
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "14"
|
||||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
||||
# - name: Get yarn cache directory path
|
||||
# id: yarn-cache-dir-path
|
||||
# run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
# - name: Cache node_modules
|
||||
# id: yarn-cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: |
|
||||
# ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
# **/node_modules
|
||||
# key: ${{ runner.os }}-${{ runner.node_version}}-yarn-v13-${{ hashFiles('yarn.lock') }}
|
||||
# restore-keys: |
|
||||
# ${{ runner.os }}-${{ runner.node_version}}-yarn-v13-
|
||||
- run: yarn install --frozen-lockfile --check-files
|
||||
- name: Build Packages
|
||||
run: yarn build
|
||||
- run: node nextjs/run-tests.js
|
||||
|
||||
testIntegration:
|
||||
name: Nextjs - Test Integration
|
||||
@@ -237,7 +269,7 @@ jobs:
|
||||
run:
|
||||
working-directory: nextjs
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: build-linux
|
||||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
NEXT_TEST_JOB: 1
|
||||
@@ -247,21 +279,52 @@ jobs:
|
||||
matrix:
|
||||
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
||||
steps:
|
||||
- run: echo ${{needs.build.outputs.docsChange}}
|
||||
working-directory: ./
|
||||
- uses: actions/cache@v2
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
id: restore-build
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
key: ${{ runner.os }}-${{ github.sha }}
|
||||
|
||||
# TODO: remove after we fix watchpack watching too much
|
||||
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
- name: Setup kernel to increase watchers
|
||||
if: runner.os == 'Linux'
|
||||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
- run: xvfb-run node run-tests.js -g ${{ matrix.group }}/20 -c 3
|
||||
|
||||
- run: xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/20 -c 3
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
testIntegrationWin:
|
||||
name: Nextjs - Test Integration (Windows)
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
NEXT_TEST_JOB: 1
|
||||
HEADLESS: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 25
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "14"
|
||||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
||||
# - name: Get yarn cache directory path
|
||||
# id: yarn-cache-dir-path
|
||||
# run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
# - name: Cache node_modules
|
||||
# id: yarn-cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: |
|
||||
# ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
# **/node_modules
|
||||
# key: ${{ runner.os }}-${{ runner.node_version}}-yarn-v13-${{ hashFiles('yarn.lock') }}
|
||||
# restore-keys: |
|
||||
# ${{ runner.os }}-${{ runner.node_version}}-yarn-v13-
|
||||
- run: yarn install --frozen-lockfile --check-files
|
||||
- name: Build Packages
|
||||
run: yarn build
|
||||
- run: node run-tests.js test/integration/basic/test/index.test.js test/integration/production/test/index.test.js test/integration/multi-pages/test/index.test.js
|
||||
working-directory: nextjs
|
||||
|
||||
testElectron:
|
||||
name: Nextjs - Test Electron
|
||||
@@ -269,7 +332,7 @@ jobs:
|
||||
run:
|
||||
working-directory: nextjs
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: build-linux
|
||||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
NEXT_TEST_JOB: 1
|
||||
@@ -277,21 +340,16 @@ jobs:
|
||||
TEST_ELECTRON: 1
|
||||
steps:
|
||||
- uses: actions/cache@v2
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
id: restore-build
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
key: ${{ runner.os }}-${{ github.sha }}
|
||||
|
||||
# TODO: remove after we fix watchpack watching too much
|
||||
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
|
||||
- name: Setup kernel to increase watchers
|
||||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
- run: cd test/integration/with-electron/app && yarn
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
|
||||
- run: xvfb-run node run-tests.js test/integration/with-electron/test/index.test.js
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
|
||||
testsPass:
|
||||
name: thank you, next
|
||||
@@ -301,9 +359,11 @@ jobs:
|
||||
checkPrecompiled,
|
||||
testIntegration,
|
||||
testIntegrationBlitz,
|
||||
testIntegrationBlitzWin,
|
||||
testUnit,
|
||||
testBlitzPackages,
|
||||
testBlitzExamples,
|
||||
testBlitzExamplesWin,
|
||||
]
|
||||
steps:
|
||||
- run: exit 0
|
||||
@@ -314,20 +374,18 @@ jobs:
|
||||
run:
|
||||
working-directory: nextjs
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: build-linux
|
||||
env:
|
||||
HEADLESS: true
|
||||
BROWSER_NAME: "firefox"
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
steps:
|
||||
- uses: actions/cache@v2
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
id: restore-build
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
key: ${{ runner.os }}-${{ github.sha }}
|
||||
- run: node run-tests.js -c 1 test/integration/production/test/index.test.js
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
|
||||
testSafari:
|
||||
name: Nextjs - Test Safari (production)
|
||||
@@ -335,7 +393,7 @@ jobs:
|
||||
run:
|
||||
working-directory: nextjs
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: build-linux
|
||||
env:
|
||||
BROWSERSTACK: true
|
||||
BROWSER_NAME: "safari"
|
||||
@@ -345,13 +403,11 @@ jobs:
|
||||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
|
||||
steps:
|
||||
- uses: actions/cache@v2
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
id: restore-build
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
key: ${{ runner.os }}-${{ github.sha }}
|
||||
- run: '[[ -z "$BROWSERSTACK_ACCESS_KEY" ]] && echo "Skipping for PR" || node run-tests.js -c 1 test/integration/production/test/index.test.js'
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
|
||||
testSafariOld:
|
||||
name: Nextjs - Test Safari 10.1 (nav)
|
||||
@@ -359,7 +415,7 @@ jobs:
|
||||
run:
|
||||
working-directory: nextjs
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, testSafari]
|
||||
needs: [build-linux, testSafari]
|
||||
env:
|
||||
BROWSERSTACK: true
|
||||
LEGACY_SAFARI: true
|
||||
@@ -370,10 +426,8 @@ jobs:
|
||||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
|
||||
steps:
|
||||
- uses: actions/cache@v2
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
id: restore-build
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
key: ${{ runner.os }}-${{ github.sha }}
|
||||
- run: '[[ -z "$BROWSERSTACK_ACCESS_KEY" ]] && echo "Skipping for PR" || node run-tests.js test/integration/production-nav/test/index.test.js'
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
|
||||
12
README.md
12
README.md
@@ -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-304-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-305-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">
|
||||
@@ -182,7 +182,6 @@ _Code ownership, pull request approvals and merging, etc_ (see [Maintainers L2](
|
||||
<!-- markdownlint-disable -->
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="http://robdrosenberg.com"><img src="https://avatars0.githubusercontent.com/u/20813991?v=4" width="100px;" alt=""/><br /><sub><b>Robert Rosenberg</b></sub></a><br />Website/Docs</td>
|
||||
<td align="center"><a href="http://simonknott.de"><img src="https://avatars1.githubusercontent.com/u/14912729?v=4" width="100px;" alt=""/><br /><sub><b>Simon Knott</b></sub></a><br />SuperJSON</td>
|
||||
<td align="center"><a href="https://juanm04.com"><img src="https://avatars0.githubusercontent.com/u/16712703?v=4" width="100px;" alt=""/><br /><sub><b>Juan Martín Seery</b></sub></a><br />Website/Docs</td>
|
||||
</tr>
|
||||
@@ -229,6 +228,14 @@ _Issue triage, pull request triage, community encouragement and moderation, etc_
|
||||
</sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://builtforfifty.com">
|
||||
<img src="https://avatars.githubusercontent.com/abuuzayr" width="100px;" alt="Abu Uzayr avatar" /><br />
|
||||
<sub>
|
||||
<b>Abu Uzayr</b>
|
||||
</sub>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- markdownlint-enable -->
|
||||
@@ -636,6 +643,7 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
|
||||
<td align="center"><a href="http://anolilab.de"><img src="https://avatars.githubusercontent.com/u/2716058?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Daniel Bannert</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=prisis" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://benjakugler96.github.io/"><img src="https://avatars.githubusercontent.com/u/53273645?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Benja Kugler</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=benjakugler96" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://semeniuc.ml/"><img src="https://avatars.githubusercontent.com/u/3838856?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Eric Semeniuc</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=esemeniuc" title="Tests">⚠️</a> <a href="https://github.com/blitz-js/blitz/commits?author=esemeniuc" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/ricardo-rp"><img src="https://avatars.githubusercontent.com/u/30808767?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ricardo Romero</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ricardo-rp" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/client": "2.24.1",
|
||||
"blitz": "0.38.3-canary.1",
|
||||
"blitz": "0.38.3",
|
||||
"final-form": "4.20.1",
|
||||
"passport-auth0": "1.4.0",
|
||||
"passport-github2": "0.1.12",
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/client": "2.24.1",
|
||||
"blitz": "0.38.3-canary.1",
|
||||
"blitz": "0.38.3",
|
||||
"final-form": "4.20.1",
|
||||
"prisma": "2.24.1",
|
||||
"react": "0.0.0-experimental-6a589ad71",
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"blitz": "0.38.3-canary.1",
|
||||
"blitz": "0.38.3",
|
||||
"final-form": "4.20.1",
|
||||
"graphql": "15.5.0",
|
||||
"graphql-request": "3.4.0",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"blitz": "0.38.3-canary.1",
|
||||
"blitz": "0.38.3",
|
||||
"knex": "0.21.16",
|
||||
"react": "0.0.0-experimental-6a589ad71",
|
||||
"react-dom": "0.0.0-experimental-6a589ad71",
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/client": "2.24.1",
|
||||
"blitz": "0.38.3-canary.1",
|
||||
"blitz": "0.38.3",
|
||||
"prisma": "2.24.1",
|
||||
"react": "0.0.0-experimental-6a589ad71",
|
||||
"react-dom": "0.0.0-experimental-6a589ad71"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/client": "2.24.1",
|
||||
"blitz": "0.38.3-canary.1",
|
||||
"blitz": "0.38.3",
|
||||
"final-form": "4.20.1",
|
||||
"prisma": "2.24.1",
|
||||
"react": "0.0.0-experimental-6a589ad71",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/client": "2.24.1",
|
||||
"blitz": "0.38.3-canary.1",
|
||||
"blitz": "0.38.3",
|
||||
"final-form": "4.20.1",
|
||||
"prisma": "2.24.1",
|
||||
"react": "0.0.0-experimental-6a589ad71",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "0.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"packages": ["packages/*"],
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
|
||||
@@ -118,13 +118,19 @@ commands[command]()
|
||||
})
|
||||
|
||||
if (command === 'dev') {
|
||||
const { CONFIG_FILE } = require('../next-server/lib/constants')
|
||||
const { watchFile } = require('fs')
|
||||
watchFile(`${process.cwd()}/${CONFIG_FILE}`, (cur: any, prev: any) => {
|
||||
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.`
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -163,8 +163,8 @@ export async function getConfigSrcPath(dir: string | null) {
|
||||
} else if (existsSync(jsPath)) {
|
||||
return jsPath
|
||||
} else if (existsSync(legacyPath)) {
|
||||
const isInternalDevelopment = __dirname.includes(
|
||||
'packages/next/dist/next-server'
|
||||
const isInternalDevelopment = __dirname.match(
|
||||
/[\\/]packages[\\/]next[\\/]dist[\\/]next-server/
|
||||
)
|
||||
if (isInternalDevelopment || process.env.VERCEL_BUILDER) {
|
||||
// We read from next.config.js that Vercel automatically adds
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "next",
|
||||
"version": "0.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"nextjsVersion": "11.0.1",
|
||||
"description": "The React Framework",
|
||||
"main": "./dist/server/next.js",
|
||||
|
||||
@@ -2,7 +2,10 @@ import { join, sep as pathSeparator, normalize } from 'path'
|
||||
import chalk from 'chalk'
|
||||
import { warn } from '../../build/output/log'
|
||||
import { promises } from 'fs'
|
||||
import { denormalizePagePath } from '../../next-server/server/normalize-page-path'
|
||||
import {
|
||||
denormalizePagePath,
|
||||
normalizePathSep,
|
||||
} from '../../next-server/server/normalize-page-path'
|
||||
// import { fileExists } from '../../lib/file-exists'
|
||||
import { recursiveFindPages } from '../../lib/recursive-readdir'
|
||||
import { buildPageExtensionRegex } from '../../build/utils'
|
||||
@@ -24,9 +27,8 @@ export async function findPageFile(
|
||||
normalizedPagePath: string,
|
||||
pageExtensions: string[]
|
||||
): Promise<string | null> {
|
||||
// console.log('[findPageFile]', { rootDir, normalizedPagePath })
|
||||
|
||||
const page = denormalizePagePath(normalizedPagePath)
|
||||
// console.log('[findPageFile]', { rootDir, normalizedPagePath, page })
|
||||
|
||||
const allPages = await recursiveFindPages(
|
||||
rootDir,
|
||||
@@ -50,9 +52,11 @@ export async function findPageFile(
|
||||
nameMatch = `(${page}|${page}/index)`
|
||||
}
|
||||
|
||||
// Make the regex work for dynamic routes like [...auth].ts
|
||||
nameMatch = nameMatch.replace(/[[\]\\]/g, '\\$&')
|
||||
|
||||
const foundPagePaths = allPages.filter((path) =>
|
||||
path.match(
|
||||
normalizePathSep(path).match(
|
||||
new RegExp(`${prefix}${nameMatch}\\.(?:${pageExtensions.join('|')})$`)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1434,7 +1434,15 @@ test('server-side only compilation errors', async () => {
|
||||
try {
|
||||
await patch()
|
||||
} catch (error) {
|
||||
await patch()
|
||||
try {
|
||||
await patch()
|
||||
} catch (error) {
|
||||
try {
|
||||
await patch()
|
||||
} catch (error) {
|
||||
await patch()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
expect(await session.hasRedbox(true)).toBe(true)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/babel-preset",
|
||||
"version": "0.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
|
||||
@@ -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.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
@@ -51,13 +51,13 @@
|
||||
"url": "https://github.com/blitz-js/blitz"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blitzjs/babel-preset": "0.38.3-canary.1",
|
||||
"@blitzjs/cli": "0.38.3-canary.1",
|
||||
"@blitzjs/config": "0.38.3-canary.1",
|
||||
"@blitzjs/core": "0.38.3-canary.1",
|
||||
"@blitzjs/display": "0.38.3-canary.1",
|
||||
"@blitzjs/generator": "0.38.3-canary.1",
|
||||
"@blitzjs/server": "0.38.3-canary.1",
|
||||
"@blitzjs/babel-preset": "0.38.4",
|
||||
"@blitzjs/cli": "0.38.4",
|
||||
"@blitzjs/config": "0.38.4",
|
||||
"@blitzjs/core": "0.38.4",
|
||||
"@blitzjs/display": "0.38.4",
|
||||
"@blitzjs/generator": "0.38.4",
|
||||
"@blitzjs/server": "0.38.4",
|
||||
"@testing-library/jest-dom": "5.11.9",
|
||||
"@testing-library/react": "11.2.5",
|
||||
"@testing-library/react-hooks": "^4.0.1",
|
||||
@@ -66,7 +66,7 @@
|
||||
"cross-spawn": "7.0.3",
|
||||
"debug": "4.3.1",
|
||||
"envinfo": "^7.7.3",
|
||||
"eslint-config-blitz": "0.38.3-canary.1",
|
||||
"eslint-config-blitz": "0.38.4",
|
||||
"jest": "^26.6.3",
|
||||
"jest-watch-typeahead": "^0.6.1",
|
||||
"minimist": "1.2.5",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@blitzjs/cli",
|
||||
"description": "Blitz.js CLI",
|
||||
"version": "0.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "rimraf lib && tsc --watch --pretty --preserveWatchOutput",
|
||||
@@ -22,8 +22,8 @@
|
||||
"/lib"
|
||||
],
|
||||
"dependencies": {
|
||||
"@blitzjs/display": "0.38.3-canary.1",
|
||||
"@blitzjs/repl": "0.38.3-canary.1",
|
||||
"@blitzjs/display": "0.38.4",
|
||||
"@blitzjs/repl": "0.38.4",
|
||||
"@oclif/command": "1.8.0",
|
||||
"@oclif/config": "1.17.0",
|
||||
"@oclif/plugin-autocomplete": "0.3.0",
|
||||
@@ -56,9 +56,9 @@
|
||||
"v8-compile-cache": "2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/generator": "0.38.3-canary.1",
|
||||
"@blitzjs/installer": "0.38.3-canary.1",
|
||||
"@blitzjs/server": "0.38.3-canary.1",
|
||||
"@blitzjs/generator": "0.38.4",
|
||||
"@blitzjs/installer": "0.38.4",
|
||||
"@blitzjs/server": "0.38.4",
|
||||
"@oclif/dev-cli": "1.26.0",
|
||||
"@oclif/test": "1.2.8",
|
||||
"nock": "13.0.6",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/config",
|
||||
"version": "0.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"description": "Loads the blitz app config",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@blitzjs/core",
|
||||
"description": "Blitz.js core functionality",
|
||||
"version": "0.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
@@ -31,8 +31,8 @@
|
||||
"server"
|
||||
],
|
||||
"dependencies": {
|
||||
"@blitzjs/config": "0.38.3-canary.1",
|
||||
"@blitzjs/display": "0.38.3-canary.1",
|
||||
"@blitzjs/config": "0.38.4",
|
||||
"@blitzjs/display": "0.38.4",
|
||||
"@types/secure-password": "3.1.0",
|
||||
"b64-lite": "^1.4.0",
|
||||
"bad-behavior": "^1.0.1",
|
||||
@@ -44,7 +44,7 @@
|
||||
"jsonwebtoken": "8.5.1",
|
||||
"lodash.frompairs": "4.0.1",
|
||||
"nanoid": "^3.1.20",
|
||||
"next": "0.38.3-canary.1",
|
||||
"next": "0.38.4",
|
||||
"npm-which": "^3.0.1",
|
||||
"null-loader": "4.0.1",
|
||||
"passport": "0.4.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/display",
|
||||
"version": "0.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"description": "Display package for the Blitz CLI",
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"license": "MIT",
|
||||
@@ -28,8 +28,8 @@
|
||||
"url": "git+https://github.com/blitz-js/blitz.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blitzjs/config": "0.38.3-canary.1",
|
||||
"@blitzjs/display": "0.38.3-canary.1",
|
||||
"@blitzjs/config": "0.38.4",
|
||||
"@blitzjs/display": "0.38.4",
|
||||
"chalk": "^4.1.0",
|
||||
"console-table-printer": "^2.7.5",
|
||||
"ora": "^5.3.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eslint-config-blitz",
|
||||
"version": "0.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"description": "Blitz.js eslint config",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/file-pipeline",
|
||||
"version": "0.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"description": "Display package for the Blitz CLI",
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"license": "MIT",
|
||||
@@ -28,7 +28,7 @@
|
||||
"url": "git+https://github.com/blitz-js/blitz.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blitzjs/display": "0.38.3-canary.1",
|
||||
"@blitzjs/display": "0.38.4",
|
||||
"chalk": "^4.1.0",
|
||||
"chokidar": "3.5.1",
|
||||
"flush-write-stream": "2.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/generator",
|
||||
"version": "0.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"description": "File generation for the Blitz CLI",
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"license": "MIT",
|
||||
@@ -33,8 +33,8 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "7.12.10",
|
||||
"@babel/plugin-transform-typescript": "7.12.1",
|
||||
"@blitzjs/display": "0.38.3-canary.1",
|
||||
"@blitzjs/server": "0.38.3-canary.1",
|
||||
"@blitzjs/display": "0.38.4",
|
||||
"@blitzjs/server": "0.38.4",
|
||||
"@mrleebo/prisma-ast": "^0.2.4",
|
||||
"@types/jscodeshift": "0.7.2",
|
||||
"chalk": "^4.1.0",
|
||||
|
||||
@@ -8,20 +8,17 @@ import {
|
||||
useQueryErrorResetBoundary,
|
||||
} from "blitz"
|
||||
import LoginForm from "app/auth/components/LoginForm"
|
||||
import { Suspense } from "react"
|
||||
|
||||
export default function App({ Component, pageProps }: AppProps) {
|
||||
const getLayout = Component.getLayout || ((page) => page)
|
||||
|
||||
return (
|
||||
<Suspense fallback="Loading...">
|
||||
<ErrorBoundary
|
||||
FallbackComponent={RootErrorFallback}
|
||||
onReset={useQueryErrorResetBoundary().reset}
|
||||
>
|
||||
{getLayout(<Component {...pageProps} />)}
|
||||
</ErrorBoundary>
|
||||
</Suspense>
|
||||
<ErrorBoundary
|
||||
FallbackComponent={RootErrorFallback}
|
||||
onReset={useQueryErrorResetBoundary().reset}
|
||||
>
|
||||
{getLayout(<Component {...pageProps} />)}
|
||||
</ErrorBoundary>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/installer",
|
||||
"version": "0.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"description": "Package installation for the Blitz CLI",
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"license": "MIT",
|
||||
@@ -30,9 +30,9 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "7.12.10",
|
||||
"@babel/plugin-transform-typescript": "7.12.1",
|
||||
"@blitzjs/config": "0.38.3-canary.1",
|
||||
"@blitzjs/display": "0.38.3-canary.1",
|
||||
"@blitzjs/generator": "0.38.3-canary.1",
|
||||
"@blitzjs/config": "0.38.4",
|
||||
"@blitzjs/display": "0.38.4",
|
||||
"@blitzjs/generator": "0.38.4",
|
||||
"@mrleebo/prisma-ast": "^0.2.4",
|
||||
"@prisma/sdk": "2.19.0",
|
||||
"@types/jscodeshift": "0.7.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/repl",
|
||||
"version": "0.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"description": "Repl package for Blitz CLI",
|
||||
"homepage": "https://github.com/blitz-js/blitz/packages/repl/#readme",
|
||||
"license": "MIT",
|
||||
@@ -28,7 +28,7 @@
|
||||
"url": "git+https://github.com/blitz-js/blitz.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blitzjs/config": "0.38.3-canary.1",
|
||||
"@blitzjs/config": "0.38.4",
|
||||
"chokidar": "3.5.1",
|
||||
"globby": "11.0.2",
|
||||
"pkg-dir": "^5.0.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@blitzjs/server",
|
||||
"description": "Blitz.js server functionality",
|
||||
"version": "0.38.3-canary.1",
|
||||
"version": "0.38.4",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"next-patched": "./bin/next-patched"
|
||||
@@ -23,10 +23,10 @@
|
||||
"register"
|
||||
],
|
||||
"dependencies": {
|
||||
"@blitzjs/config": "0.38.3-canary.1",
|
||||
"@blitzjs/core": "0.38.3-canary.1",
|
||||
"@blitzjs/display": "0.38.3-canary.1",
|
||||
"@blitzjs/file-pipeline": "0.38.3-canary.1",
|
||||
"@blitzjs/config": "0.38.4",
|
||||
"@blitzjs/core": "0.38.4",
|
||||
"@blitzjs/display": "0.38.4",
|
||||
"@blitzjs/file-pipeline": "0.38.4",
|
||||
"cross-spawn": "7.0.3",
|
||||
"detect-port": "1.3.0",
|
||||
"esbuild": "^0.11.12",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1",
|
||||
"@blitzjs/installer": "0.38.3",
|
||||
"jscodeshift": "0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1",
|
||||
"@blitzjs/installer": "0.38.3",
|
||||
"jscodeshift": "0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1",
|
||||
"@blitzjs/installer": "0.38.3",
|
||||
"jscodeshift": "0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1",
|
||||
"@blitzjs/installer": "0.38.3",
|
||||
"jscodeshift": "0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1"
|
||||
"@blitzjs/installer": "0.38.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1"
|
||||
"@blitzjs/installer": "0.38.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1",
|
||||
"@blitzjs/installer": "0.38.3",
|
||||
"jscodeshift": "0.11.0",
|
||||
"uuid": "^8.3.1"
|
||||
},
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1"
|
||||
"@blitzjs/installer": "0.38.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1",
|
||||
"@blitzjs/installer": "0.38.3",
|
||||
"jscodeshift": "0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1"
|
||||
"@blitzjs/installer": "0.38.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1",
|
||||
"@blitzjs/installer": "0.38.3",
|
||||
"jscodeshift": "0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1"
|
||||
"@blitzjs/installer": "0.38.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1",
|
||||
"@blitzjs/installer": "0.38.3",
|
||||
"jscodeshift": "0.11.0",
|
||||
"uuid": "^8.3.1"
|
||||
},
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1",
|
||||
"@blitzjs/installer": "0.38.3",
|
||||
"jscodeshift": "0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1",
|
||||
"@blitzjs/installer": "0.38.3",
|
||||
"jscodeshift": "0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||
"dependencies": {
|
||||
"@blitzjs/installer": "0.38.3-canary.1",
|
||||
"@blitzjs/installer": "0.38.3",
|
||||
"jscodeshift": "0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -114,6 +114,7 @@ const runTests = (mode: string) => {
|
||||
describe("prefetching", () => {
|
||||
it("should prefetch from the query cache #2281", async () => {
|
||||
const browser = await webdriver(appPort, "/prefetching")
|
||||
await waitFor(100)
|
||||
await browser.waitForElementByCss("#content")
|
||||
const text = await browser.elementByCss("#content").text()
|
||||
expect(text).toMatch(/noauth-basic-result/)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import delay from "delay"
|
||||
|
||||
export default async function getBasic() {
|
||||
await delay(250)
|
||||
return "basic-result"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import delay from "delay"
|
||||
|
||||
export default async function getError() {
|
||||
await delay(10)
|
||||
return "should-not-succeed"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/* eslint-env jest */
|
||||
import fs from "fs-extra"
|
||||
import {
|
||||
blitzBuild,
|
||||
blitzExport,
|
||||
@@ -27,12 +26,10 @@ describe("Misc", () => {
|
||||
afterAll(() => killApp(context.server))
|
||||
|
||||
describe("body parser config", () => {
|
||||
it("should render query result", async () => {
|
||||
it("should not render query result", async () => {
|
||||
const browser = await webdriver(context.appPort, "/body-parser")
|
||||
let text = await browser.elementByCss("#page").text()
|
||||
expect(text).toMatch(/Loading/)
|
||||
await browser.waitForElementByCss("#error")
|
||||
text = await browser.elementByCss("#error").text()
|
||||
let text = await browser.elementByCss("#error").text()
|
||||
expect(text).toMatch(/query failed/)
|
||||
if (browser) await browser.close()
|
||||
})
|
||||
@@ -48,20 +45,16 @@ describe("Misc", () => {
|
||||
if (browser) await browser.close()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
const appDir = join(__dirname, "../")
|
||||
const outdir = join(appDir, "out")
|
||||
const appDir = join(__dirname, "../")
|
||||
const outdir = join(appDir, "out")
|
||||
|
||||
describe("blitz export", () => {
|
||||
it("should build successfully", async () => {
|
||||
await fs.remove(join(appDir, ".next"))
|
||||
const {code} = await blitzBuild(appDir)
|
||||
if (code !== 0) throw new Error(`build failed with status ${code}`)
|
||||
})
|
||||
|
||||
it("should export successfully", async () => {
|
||||
const {code} = await blitzExport(appDir, {outdir})
|
||||
if (code !== 0) throw new Error(`export failed with status ${code}`)
|
||||
})
|
||||
describe("blitz export", () => {
|
||||
it("should export successfully", async () => {
|
||||
const {code} = await blitzBuild(appDir)
|
||||
if (code !== 0) throw new Error(`export failed with status ${code}`)
|
||||
const {code: exportCode} = await blitzExport(appDir, {outdir})
|
||||
if (exportCode !== 0) throw new Error(`export failed with status ${exportCode}`)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import delay from "delay"
|
||||
|
||||
export default async function getBasic() {
|
||||
await delay(500)
|
||||
return "basic-result"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import delay from "delay"
|
||||
|
||||
export default async function getBasic() {
|
||||
await delay(250)
|
||||
return "basic-result"
|
||||
}
|
||||
|
||||
@@ -202,12 +202,11 @@ export function runBlitzLaunchCommand(
|
||||
...opts.env,
|
||||
}
|
||||
|
||||
const command = opts.blitzStart ? "start" : "dev"
|
||||
console.log(`Running command "blitz ${command}" `)
|
||||
|
||||
return new Promise<void | string | ChildProcess>((resolve, reject) => {
|
||||
const instance = spawn(
|
||||
"node",
|
||||
["--no-deprecation", blitzBin, opts.blitzStart ? "start" : "dev", ...argv],
|
||||
{cwd, env},
|
||||
)
|
||||
const instance = spawn("node", ["--no-deprecation", blitzBin, command, ...argv], {cwd, env})
|
||||
let didResolve = false
|
||||
|
||||
function handleStdout(data: Buffer) {
|
||||
|
||||
Reference in New Issue
Block a user