Skip to content

Commit 1cbf9c4

Browse files
committed
Merge branch 'canary' into fix/error-loop
2 parents 0b47b7a + 72318a7 commit 1cbf9c4

File tree

227 files changed

+1415
-919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+1415
-919
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Learn how to add code owners here:
22
# https://help.github.com/en/articles/about-code-owners
33

4-
* @timneutkens @ijjk @lfades @divmain @shuding
5-
/docs/ @timneutkens @ijjk @lfades @divmain @shuding @leerob
6-
/examples/ @timneutkens @ijjk @lfades @divmain @shuding @leerob
4+
* @timneutkens @ijjk @shuding @styfle @huozhi @padmaia
5+
/docs/ @timneutkens @ijjk @shuding @styfle @huozhi @padmaia @leerob @lfades
6+
/examples/ @timneutkens @ijjk @shuding @styfle @huozhi @padmaia @leerob @lfades

.github/labeler.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,22 @@
99
"packages/react-refresh-utils/**",
1010
"packages/next-codemod/**"
1111
],
12-
"type: chrome": [
12+
"created-by: Chrome Aurora": [
1313
{ "type": "user", "pattern": "spanicker" },
1414
{ "type": "user", "pattern": "housseindjirdeh" },
1515
{ "type": "user", "pattern": "devknoll" },
1616
{ "type": "user", "pattern": "janicklas-ralph" },
1717
{ "type": "user", "pattern": "atcastle" },
1818
{ "type": "user", "pattern": "Joonpark13" }
19+
],
20+
"created-by: Next.js team": [
21+
{ "type": "user", "pattern": "ijjk" },
22+
{ "type": "user", "pattern": "padmaia" },
23+
{ "type": "user", "pattern": "huozhi" },
24+
{ "type": "user", "pattern": "shuding" },
25+
{ "type": "user", "pattern": "sokra" },
26+
{ "type": "user", "pattern": "styfle" },
27+
{ "type": "user", "pattern": "timneutkens" }
1928
]
2029
}
2130
}

azure-pipelines.yml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -111,36 +111,37 @@ stages:
111111
- script: |
112112
node run-tests.js -g 1/1 --timings --azure --type unit
113113
displayName: 'Run tests'
114-
115-
- job: test_chrome_integration
116-
pool:
117-
vmImage: 'windows-2019'
118-
strategy:
119-
matrix:
120-
nodejs-1:
121-
group: 1/4
122-
nodejs-2:
123-
group: 2/4
124-
nodejs-3:
125-
group: 3/4
126-
nodejs-4:
127-
group: 4/4
128-
steps:
129-
- checkout: none
130-
- script: |
131-
wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
132-
displayName: 'List Chrome version'
133-
- task: NodeTool@0
134-
inputs:
135-
versionSpec: $(node_version)
136-
displayName: 'Install Node.js'
137-
- task: Cache@2
138-
inputs:
139-
# use deterministic cache key that is specific
140-
# to this test run
141-
key: $(Build.SourceVersion)
142-
path: $(System.DefaultWorkingDirectory)
143-
displayName: Cache Build
144-
- script: |
145-
node run-tests.js -g $(group) --timings --azure
146-
displayName: 'Run tests'
114+
# TODO: investigate re-enabling when stability matches running in
115+
# tests in ubuntu environment
116+
# - job: test_chrome_integration
117+
# pool:
118+
# vmImage: 'windows-2019'
119+
# strategy:
120+
# matrix:
121+
# nodejs-1:
122+
# group: 1/4
123+
# nodejs-2:
124+
# group: 2/4
125+
# nodejs-3:
126+
# group: 3/4
127+
# nodejs-4:
128+
# group: 4/4
129+
# steps:
130+
# - checkout: none
131+
# - script: |
132+
# wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
133+
# displayName: 'List Chrome version'
134+
# - task: NodeTool@0
135+
# inputs:
136+
# versionSpec: $(node_version)
137+
# displayName: 'Install Node.js'
138+
# - task: Cache@2
139+
# inputs:
140+
# # use deterministic cache key that is specific
141+
# # to this test run
142+
# key: $(Build.SourceVersion)
143+
# path: $(System.DefaultWorkingDirectory)
144+
# displayName: Cache Build
145+
# - script: |
146+
# node run-tests.js -g $(group) --timings --azure
147+
# displayName: 'Run tests'

docs/api-reference/next.config.js/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = (phase, { defaultConfig }) => {
2626
}
2727
```
2828

29-
`phase` is the current context in which the configuration is loaded. You can see the [available phases](https://github.com/vercel/next.js/blob/canary/packages/next/next-server/lib/constants.ts#L1-L4). Phases can be imported from `next/constants`:
29+
`phase` is the current context in which the configuration is loaded. You can see the [available phases](https://github.com/vercel/next.js/blob/canary/packages/next/shared/lib/constants.ts#L1-L4). Phases can be imported from `next/constants`:
3030

3131
```js
3232
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
@@ -44,7 +44,7 @@ module.exports = (phase, { defaultConfig }) => {
4444
}
4545
```
4646

47-
The commented lines are the place where you can put the configs allowed by `next.config.js`, which are [defined in this file](https://github.com/vercel/next.js/blob/canary/packages/next/next-server/server/config-shared.ts#L68).
47+
The commented lines are the place where you can put the configs allowed by `next.config.js`, which are [defined in this file](https://github.com/vercel/next.js/blob/canary/packages/next/server/config-shared.ts#L68).
4848

4949
However, none of the configs are required, and it's not necessary to understand what each config does. Instead, search for the features you need to enable or modify in this section and they will show you what to do.
5050

docs/api-reference/next/image.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ When `responsive`, the image will scale the dimensions down for smaller
102102
viewports and scale up for larger viewports.
103103

104104
When `fill`, the image will stretch both width and height to the dimensions of
105-
the parent element, usually paired with the [`objectFit`](#objectFit) property.
105+
the parent element, provided the parent element is relative. This is usually paired with the [`objectFit`](#objectFit) property.
106106

107107
Try it out:
108108

docs/basic-features/typescript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ The `next.config.js` file must be a JavaScript file as it does not get parsed by
152152
// @ts-check
153153

154154
/**
155-
* @type {import('next/dist/next-server/server/config').NextConfig}
155+
* @type {import('next').NextConfig}
156156
**/
157157
const nextConfig = {
158158
/* config options here */

examples/layout-component/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Layout component example
22

3-
This example shows a very common use case when building websites where you need to repeat some sort of layout for all your pages. Our pages are: `home`, `about` and `contact` and they all share the same `<head>` settings, the `<nav>` and the `<footer>`. Further more, the title (and potentially other head elements) can be sent as a prop to the layout component so that it's customizable in all pages.
3+
This example shows a very common use case when building websites where you need to repeat some sort of layout for all your pages. Our pages are: `home`, `about` and `contact` and they all share the same layout and sidebar.
44

55
## Preview
66

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,13 @@
1-
import Link from 'next/link'
21
import Head from 'next/head'
2+
import styles from './layout.module.css'
33

4-
export default function Layout({
5-
children,
6-
title = 'This is the default title',
7-
}) {
4+
export default function Layout({ children }) {
85
return (
9-
<div>
6+
<>
107
<Head>
11-
<title>{title}</title>
12-
<meta charSet="utf-8" />
13-
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
8+
<title>Layouts Example</title>
149
</Head>
15-
<header>
16-
<nav>
17-
<Link href="/">
18-
<a>Home</a>
19-
</Link>{' '}
20-
|
21-
<Link href="/about">
22-
<a>About</a>
23-
</Link>{' '}
24-
|
25-
<Link href="/contact">
26-
<a>Contact</a>
27-
</Link>
28-
</nav>
29-
</header>
30-
31-
{children}
32-
33-
<footer>{'I`m here to stay'}</footer>
34-
</div>
10+
<main className={styles.main}>{children}</main>
11+
</>
3512
)
3613
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.main {
2+
display: flex;
3+
height: calc(100vh - 64px);
4+
background-color: white;
5+
}
6+
7+
.main > section {
8+
padding: 32px;
9+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import Link from 'next/link'
2+
import styles from './sidebar.module.css'
3+
4+
export default function Sidebar() {
5+
return (
6+
<nav className={styles.nav}>
7+
<input className={styles.input} placeholder="Search..." />
8+
<Link href="/">
9+
<a>Home</a>
10+
</Link>
11+
<Link href="/about">
12+
<a>About</a>
13+
</Link>
14+
<Link href="/contact">
15+
<a>Contact</a>
16+
</Link>
17+
</nav>
18+
)
19+
}

0 commit comments

Comments
 (0)