Skip to content

Commit

Permalink
Merge branch 'canary' into suspensey-dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Dec 5, 2022
2 parents 4b757fe + fa42c34 commit 5290c06
Show file tree
Hide file tree
Showing 113 changed files with 2,614 additions and 943 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/1.bug_report.yml
Expand Up @@ -33,13 +33,13 @@ body:
- 'ESLint (eslint-config-next)'
- 'Font optimization (@next/font)'
- 'Head component/file (next/head / head.js)'
- 'Internationalzation (i18n)'
- 'Image optmization (next/image, next/legacy/image)'
- 'Internationalization (i18n)'
- 'Image optimization (next/image, next/legacy/image)'
- 'Jest (next/jest)'
- 'Middleware / Edge (API routes, runtime)'
- 'Package manager (npm, pnpm, Yarn)'
- 'Routing (next/router, next/navigation, next/link)'
- 'Script optimizatzion (next/script)'
- 'Script optimization (next/script)'
- 'Standalone mode (output: "standalone")'
- 'Static HTML Export (next export)'
- 'SWC minifier (swcMinify: true)'
Expand Down
103 changes: 14 additions & 89 deletions .github/workflows/build_test_deploy.yml
Expand Up @@ -261,15 +261,8 @@ jobs:
fail-fast: false
matrix:
node: [16, 18]
group: [1, 2]
group: [1, 2, 3, 4]
steps:
- name: Setup node
uses: actions/setup-node@v3
if: ${{needs.build.outputs.docsChange == 'nope'}}
with:
node-version: ${{ matrix.node }}
check-latest: true

- run: echo ${{needs.build.outputs.docsChange}}

# https://github.com/actions/virtual-environments/issues/1187
Expand All @@ -289,16 +282,7 @@ jobs:
name: next-swc-test-binary
path: packages/next-swc/native

- run: npm i -g pnpm@${PNPM_VERSION}
if: ${{needs.build.outputs.docsChange == 'nope'}}

- run: npm i -g playwright-chromium@1.22.2 && npx playwright install-deps
timeout-minutes: 10
if: ${{needs.build.outputs.docsChange == 'nope'}}

# - run: npx @replayio/playwright install chromium
# if: ${{needs.build.outputs.docsChange == 'nope'}}
- run: node run-tests.js --type development --timings -g ${{ matrix.group }}/2
- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.22.2-focal /bin/bash -c "cd /work && ls && curl https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} && xvfb-run node run-tests.js --type development --timings -g ${{ matrix.group }}/4 >> /proc/1/fd/1"
name: Run test/development
if: ${{needs.build.outputs.docsChange == 'nope'}}
# env:
Expand Down Expand Up @@ -338,15 +322,8 @@ jobs:
fail-fast: false
matrix:
node: [16, 18]
group: [1, 2, 3]
group: [1, 2, 3, 4, 5, 6, 7]
steps:
- name: Setup node
uses: actions/setup-node@v3
if: ${{needs.build.outputs.docsChange == 'nope'}}
with:
node-version: ${{ matrix.node }}
check-latest: true

- run: echo ${{needs.build.outputs.docsChange}}

# https://github.com/actions/virtual-environments/issues/1187
Expand All @@ -366,16 +343,7 @@ jobs:
name: next-swc-test-binary
path: packages/next-swc/native

- run: npm i -g pnpm@${PNPM_VERSION}
if: ${{needs.build.outputs.docsChange == 'nope'}}

- run: npm i -g playwright-chromium@1.22.2 && npx playwright install-deps
timeout-minutes: 10
if: ${{needs.build.outputs.docsChange == 'nope'}}

# - run: npx @replayio/playwright install chromium
# if: ${{needs.build.outputs.docsChange == 'nope'}}
- run: node run-tests.js --type e2e --timings -g ${{ matrix.group }}/3
- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.22.2-focal /bin/bash -c "cd /work && ls && curl https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} && xvfb-run node run-tests.js --type e2e --timings -g ${{ matrix.group }}/7 >> /proc/1/fd/1"
name: Run test/e2e (dev)
if: ${{needs.build.outputs.docsChange == 'nope'}}
env:
Expand Down Expand Up @@ -415,15 +383,8 @@ jobs:
fail-fast: false
matrix:
node: [16, 18]
group: [1, 2]
group: [1, 2, 3]
steps:
- name: Setup node
uses: actions/setup-node@v3
if: ${{needs.build.outputs.docsChange == 'nope'}}
with:
node-version: ${{ matrix.node }}
check-latest: true

- run: echo ${{needs.build.outputs.docsChange}}

# https://github.com/actions/virtual-environments/issues/1187
Expand All @@ -443,16 +404,7 @@ jobs:
name: next-swc-test-binary
path: packages/next-swc/native

- run: npm i -g pnpm@${PNPM_VERSION}
if: ${{needs.build.outputs.docsChange == 'nope'}}

- run: npm i -g playwright-chromium@1.22.2 && npx playwright install-deps
timeout-minutes: 10
if: ${{needs.build.outputs.docsChange == 'nope'}}

# - run: npx @replayio/playwright install chromium
# if: ${{needs.build.outputs.docsChange == 'nope'}}
- run: node run-tests.js --type production --timings -g ${{ matrix.group }}/2
- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.22.2-focal /bin/bash -c "cd /work && ls && curl https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} && xvfb-run node run-tests.js --type production --timings -g ${{ matrix.group }}/3 >> /proc/1/fd/1"
name: Run test/production
if: ${{needs.build.outputs.docsChange == 'nope'}}
# env:
Expand Down Expand Up @@ -482,15 +434,8 @@ jobs:
fail-fast: false
matrix:
node: [16, 18]
group: [1, 2, 3]
group: [1, 2, 3, 4, 5, 6, 7]
steps:
- name: Setup node
uses: actions/setup-node@v3
if: ${{needs.build.outputs.docsChange == 'nope'}}
with:
node-version: ${{ matrix.node }}
check-latest: true

- run: echo ${{needs.build.outputs.docsChange}}

# https://github.com/actions/virtual-environments/issues/1187
Expand All @@ -510,16 +455,7 @@ jobs:
name: next-swc-test-binary
path: packages/next-swc/native

- run: npm i -g pnpm@${PNPM_VERSION}
if: ${{needs.build.outputs.docsChange == 'nope'}}

- run: npm i -g playwright-chromium@1.22.2 && npx playwright install-deps
timeout-minutes: 10
if: ${{needs.build.outputs.docsChange == 'nope'}}

# - run: npx @replayio/playwright install chromium
# if: ${{needs.build.outputs.docsChange == 'nope'}}
- run: node run-tests.js --type e2e --timings -g ${{ matrix.group }}/3
- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.22.2-focal /bin/bash -c "cd /work && ls && curl https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} && xvfb-run node run-tests.js --type e2e --timings -g ${{ matrix.group }}/7 >> /proc/1/fd/1"
name: Run test/e2e (production)
if: ${{needs.build.outputs.docsChange == 'nope'}}
env:
Expand Down Expand Up @@ -571,15 +507,13 @@ jobs:
18,
19,
20,
21,
22,
23,
24,
25,
]
steps:
- name: Setup node
uses: actions/setup-node@v3
if: ${{needs.build.outputs.docsChange == 'nope'}}
with:
node-version: 16
check-latest: true

- run: echo ${{needs.build.outputs.docsChange}}

# https://github.com/actions/virtual-environments/issues/1187
Expand All @@ -599,16 +533,7 @@ jobs:
name: next-swc-test-binary
path: packages/next-swc/native

- run: npm i -g pnpm@${PNPM_VERSION}
if: ${{needs.build.outputs.docsChange == 'nope'}}

- run: npm i -g playwright-chromium@1.22.2 && npx playwright install-deps
timeout-minutes: 10
if: ${{needs.build.outputs.docsChange == 'nope'}}

# - run: npx @replayio/playwright install chromium
# if: ${{needs.build.outputs.docsChange == 'nope'}}
- run: xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/20
- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.22.2-focal /bin/bash -c "cd /work && ls && curl https://install-node.vercel.app/v16 | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} && xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/25 >> /proc/1/fd/1"
if: ${{needs.build.outputs.docsChange == 'nope'}}
# env:
# RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testIntegration / Group ${{ matrix.group }}
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Expand Up @@ -6,6 +6,7 @@
{ "language": "typescriptreact", "autoFix": true }
],
"debug.javascript.unmapMissingSources": true,
"jest.autoRun": "off",
"files.exclude": {
"**/node_modules": false,
"node_modules": true,
Expand Down
13 changes: 12 additions & 1 deletion docs/deployment.md
Expand Up @@ -136,7 +136,18 @@ Next.js will automatically load the latest version of your application in the ba

Sometimes you might want to run some cleanup code on process signals like `SIGTERM` or `SIGINT`.

You can do that by setting the env variable `NEXT_MANUAL_SIG_HANDLE` to `true` and then register a handler for that signal inside your `_document.js` file.
You can do that by setting the env variable `NEXT_MANUAL_SIG_HANDLE` to `true` and then register a handler for that signal inside your `_document.js` file. Please note that you need to register env variable directly in the system env variable, not in the `.env` file.

```json
// package.json
{
"scripts": {
"dev": "NEXT_MANUAL_SIG_HANDLE=true next dev",
"build": "next build",
"start": "NEXT_MANUAL_SIG_HANDLE=true next start"
}
}
```

```js
// pages/_document.js
Expand Down
3 changes: 2 additions & 1 deletion examples/with-cloudinary/package.json
Expand Up @@ -26,6 +26,7 @@
"postcss": "^8.4.18",
"prettier": "^2.7.1",
"prettier-plugin-tailwindcss": "^0.1.13",
"tailwindcss": "^3.2.1"
"tailwindcss": "^3.2.1",
"typescript": "4.8.4"
}
}
2 changes: 1 addition & 1 deletion lerna.json
Expand Up @@ -16,5 +16,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "13.0.7-canary.0"
"version": "13.0.7-canary.1"
}
14 changes: 13 additions & 1 deletion package.json
Expand Up @@ -57,6 +57,7 @@
"@edge-runtime/jest-environment": "2.0.0",
"@fullhuman/postcss-purgecss": "1.3.0",
"@mdx-js/loader": "^1.5.1",
"@mdx-js/react": "^1.6.18",
"@next/bundle-analyzer": "workspace:*",
"@next/env": "workspace:*",
"@next/eslint-plugin-next": "workspace:*",
Expand Down Expand Up @@ -114,7 +115,9 @@
"alex": "9.1.0",
"amphtml-validator": "1.0.35",
"async-sema": "3.0.1",
"body-parser": "1.20.1",
"browserslist": "4.20.2",
"buffer": "5.6.0",
"chalk": "5.0.1",
"cheerio": "0.22.0",
"cookie": "0.4.1",
Expand All @@ -140,6 +143,7 @@
"express": "4.17.0",
"faker": "5.5.3",
"faunadb": "2.6.1",
"find-up": "4.1.0",
"firebase": "7.14.5",
"flat": "5.0.2",
"form-data": "4.0.0",
Expand All @@ -149,15 +153,18 @@
"gzip-size": "5.1.1",
"html-validator": "5.1.18",
"husky": "8.0.0",
"http-proxy": "1.18.1",
"image-size": "0.9.3",
"is-animated": "2.0.2",
"isomorphic-unfetch": "3.0.0",
"jest": "27.0.6",
"jest-extended": "1.2.1",
"json5": "2.2.1",
"ky": "0.19.1",
"ky-universal": "0.6.0",
"lerna": "4.0.0",
"lint-staged": "10.1.7",
"lodash": "4.17.20",
"lost": "8.3.1",
"minimatch": "3.0.4",
"moment": "^2.24.0",
Expand Down Expand Up @@ -197,7 +204,9 @@
"selenium-webdriver": "4.0.0-beta.4",
"semver": "7.3.7",
"shell-quote": "1.7.3",
"strip-ansi": "6.0.0",
"styled-components": "6.0.0-beta.5",
"styled-jsx": "5.1.0",
"styled-jsx-plugin-postcss": "3.0.2",
"swr": "2.0.0-rc.0",
"tailwindcss": "1.1.3",
Expand All @@ -206,9 +215,12 @@
"tsec": "0.2.1",
"turbo": "1.6.3",
"typescript": "4.8.2",
"unfetch": "4.2.0",
"wait-port": "0.2.2",
"whatwg-fetch": "3.0.0",
"webpack": "5.74.0",
"webpack-bundle-analyzer": "4.7.0"
"webpack-bundle-analyzer": "4.7.0",
"ws": "8.2.3"
},
"resolutions": {
"browserslist": "4.20.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "13.0.7-canary.0",
"version": "13.0.7-canary.1",
"keywords": [
"react",
"next",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-next-app/templates/app/js/README-template.md
Expand Up @@ -12,9 +12,9 @@ yarn dev

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
You can start editing the page by modifying `app/page.jsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

Expand Down

0 comments on commit 5290c06

Please sign in to comment.