Skip to content

Commit 3b03fc2

Browse files
committed
Merge remote-tracking branch 'origin' into image-component-update-fill-sizing
2 parents 72320f0 + d9bb645 commit 3b03fc2

File tree

347 files changed

+16918
-4143
lines changed

Some content is hidden

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

347 files changed

+16918
-4143
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 @Timer @ijjk @lfades
5-
/docs/ @timneutkens @Timer @ijjk @lfades @chibicode
6-
/examples/ @timneutkens @Timer @ijjk @lfades @chibicode
4+
* @timneutkens @Timer @ijjk @lfades @divmain
5+
/docs/ @timneutkens @Timer @ijjk @lfades @divmain @leerob
6+
/examples/ @timneutkens @Timer @ijjk @lfades @divmain @leerob

.github/ISSUE_TEMPLATE/1.bug_report.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,65 +3,73 @@ about: Create a bug report for the Next.js core
33
title: ''
44
labels: 'template: bug'
55
issue_body: true
6-
inputs:
7-
- type: description
6+
body:
7+
- type: markdown
88
attributes:
99
value: Thanks for taking the time to file a bug report! Please fill out this form as completely as possible.
10-
- type: description
10+
- type: markdown
1111
attributes:
1212
value: If you leave out sections there is a high likelihood it will be moved to the GitHub Discussions "Help" section.
13-
- type: description
13+
- type: markdown
1414
attributes:
1515
value: 'Please first verify if your issue exists in the Next.js canary release line: `npm install next@canary`.'
16-
- type: description
16+
- type: markdown
1717
attributes:
1818
value: 'next@canary is the beta version of Next.js. It includes all features and fixes that are pending to land on the stable release line.'
1919
- type: input
2020
attributes:
2121
label: What version of Next.js are you using?
2222
description: 'For example: 10.0.1'
23+
validations:
2324
required: true
2425
- type: input
2526
attributes:
2627
label: What version of Node.js are you using?
2728
description: 'For example: 12.0.0'
29+
validations:
2830
required: true
2931
- type: input
3032
attributes:
3133
label: What browser are you using?
3234
description: 'For example: Chrome, Safari'
35+
validations:
3336
required: true
3437
- type: input
3538
attributes:
3639
label: What operating system are you using?
3740
description: 'For example: macOS, Windows'
41+
validations:
3842
required: true
3943
- type: input
4044
attributes:
4145
label: How are you deploying your application?
4246
description: 'For example: next start, next export, Vercel, Other platform'
47+
validations:
4348
required: true
4449
- type: textarea
4550
attributes:
4651
label: Describe the Bug
4752
description: A clear and concise description of what the bug is.
53+
validations:
4854
required: true
4955
- type: textarea
5056
attributes:
5157
label: Expected Behavior
5258
description: A clear and concise description of what you expected to happen.
59+
validations:
5360
required: true
5461
- type: textarea
5562
attributes:
5663
label: To Reproduce
5764
description: Steps to reproduce the behavior, please provide a clear code snippets that always reproduces the issue or a GitHub repository. Screenshots can be provided in the issue body below.
65+
validations:
5866
required: true
59-
- type: description
67+
- type: markdown
6068
attributes:
6169
value: Before posting the issue go through the steps you've written down to make sure the steps provided are detailed and clear.
62-
- type: description
70+
- type: markdown
6371
attributes:
6472
value: Contributors should be able to follow the steps provided in order to reproduce the bug.
65-
- type: description
73+
- type: markdown
6674
attributes:
6775
value: These steps are used to add integration tests to ensure the same issue does not happen again. Thanks in advance!

.github/ISSUE_TEMPLATE/2.example_bug_report.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,64 +3,73 @@ about: Create a bug report for the examples
33
title: ''
44
labels: 'type: example,template: bug'
55
issue_body: true
6-
inputs:
7-
- type: description
6+
body:
7+
- type: markdown
88
attributes:
99
value: Thanks for taking the time to file a examples bug report! Please fill out this form as completely as possible.
10-
- type: description
10+
- type: markdown
1111
attributes:
1212
value: If you leave out sections there is a high likelihood it will be moved to the GitHub Discussions "Help" section.
1313
- type: input
1414
attributes:
1515
label: What example does this report relate to?
1616
description: 'For example: with-styled-components'
17+
validations:
1718
required: true
1819
- type: input
1920
attributes:
2021
label: What version of Next.js are you using?
2122
description: 'For example: 10.0.1'
23+
validations:
2224
required: true
2325
- type: input
2426
attributes:
2527
label: What version of Node.js are you using?
2628
description: 'For example: 12.0.0'
29+
validations:
2730
required: true
2831
- type: input
2932
attributes:
3033
label: What browser are you using?
3134
description: 'For example: Chrome, Safari'
35+
validations:
3236
required: true
3337
- type: input
3438
attributes:
3539
label: What operating system are you using?
3640
description: 'For example: macOS, Windows'
41+
validations:
3742
required: true
3843
- type: input
3944
attributes:
4045
label: How are you deploying your application?
4146
description: 'For example: next start, next export, Vercel, Other platform'
47+
validations:
4248
required: true
4349
- type: textarea
4450
attributes:
4551
label: Describe the Bug
4652
description: A clear and concise description of what the bug is.
53+
validations:
4754
required: true
4855
- type: textarea
4956
attributes:
5057
label: Expected Behavior
5158
description: A clear and concise description of what you expected to happen.
59+
validations:
5260
required: true
5361
- type: textarea
5462
attributes:
5563
label: To Reproduce
5664
description: Steps to reproduce the behavior, please provide a clear code snippets that always reproduces the issue or a GitHub repository. Screenshots can be provided in the issue body below.
65+
validations:
5766
required: true
58-
- type: description
67+
- type: markdown
5968
attributes:
6069
value: Before posting the issue go through the steps you've written down to make sure the steps provided are detailed and clear.
61-
- type: description
70+
- type: markdown
6271
attributes:
6372
value: Contributors should be able to follow the steps provided in order to reproduce the bug.
64-
- type: description
73+
- type: markdown
6574
attributes:
6675
value: Thanks in advance!

.github/ISSUE_TEMPLATE/3.feature_request.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,28 @@ about: Create a feature request for the Next.js core
33
title: ''
44
labels: 'template: story'
55
issue_body: true
6-
inputs:
7-
- type: description
6+
body:
7+
- type: markdown
88
attributes:
99
value: Thanks for taking the time to file a feature request! Please fill out this form as completely as possible.
10-
- type: description
10+
- type: markdown
1111
attributes:
1212
value: 'Feature requests will be converted to the GitHub Discussions "Ideas" section.'
1313
- type: textarea
1414
attributes:
1515
label: Describe the feature you'd like to request
1616
description: A clear and concise description of what you want and what your use case is.
17+
validations:
1718
required: true
1819
- type: textarea
1920
attributes:
2021
label: Describe the solution you'd like
2122
description: A clear and concise description of what you want to happen.
23+
validations:
2224
required: true
2325
- type: textarea
2426
attributes:
2527
label: Describe alternatives you've considered
2628
description: A clear and concise description of any alternative solutions or features you've considered.
29+
validations:
2730
required: true

.github/actions/next-stats-action/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"node-fetch": "^2.6.0",
1414
"prettier": "^1.18.2",
1515
"pretty-bytes": "^5.3.0",
16-
"pretty-ms": "^5.0.0"
16+
"pretty-ms": "^5.0.0",
17+
"semver": "7.3.4"
1718
}
1819
}

.github/actions/next-stats-action/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
7474
logger('Release detected, resetting mainRepo to last stable tag')
7575
const lastStableTag = await getLastStable(mainRepoDir, actionInfo.prRef)
7676
if (!lastStableTag) throw new Error('failed to get last stable tag')
77+
console.log('using latestStable', lastStableTag)
7778
await checkoutRef(lastStableTag, mainRepoDir)
7879

7980
/* eslint-disable-next-line */

.github/actions/next-stats-action/src/prepare/repo-setup.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const fs = require('fs-extra')
33
const exec = require('../util/exec')
44
const { remove } = require('fs-extra')
55
const logger = require('../util/logger')
6+
const semver = require('semver')
67

78
module.exports = (actionInfo) => {
89
return {
@@ -22,8 +23,9 @@ module.exports = (actionInfo) => {
2223
const curTag = tags[i]
2324
// stable doesn't include `-canary` or `-beta`
2425
if (!curTag.includes('-') && !ref.includes(curTag)) {
25-
lastStableTag = curTag
26-
break
26+
if (!lastStableTag || semver.gt(curTag, lastStableTag)) {
27+
lastStableTag = curTag
28+
}
2729
}
2830
}
2931
return lastStableTag

.github/workflows/build_test_deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ jobs:
181181
- run: yarn install --check-files
182182
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
183183

184-
- run: xvfb-run node run-tests.js test/integration/{link-ref,production,basic,async-modules,font-optimization,ssr-ctx}/test/index.test.js test/acceptance/*.test.js
184+
- run: xvfb-run node run-tests.js test/integration/{fallback-modules,link-ref,production,basic,async-modules,font-optimization,ssr-ctx}/test/index.test.js test/acceptance/*.test.js
185185
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
186186

187187
testLegacyReact:
@@ -282,7 +282,7 @@ jobs:
282282
publishRelease:
283283
name: Potentially publish release
284284
runs-on: ubuntu-latest
285-
needs: [testsPass]
285+
needs: build
286286
env:
287287
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
288288
steps:

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@
2525
"port": 9229,
2626
"outFiles": ["${workspaceFolder}/packages/next/dist/**/*"]
2727
},
28+
{
29+
"name": "Launch app build trace",
30+
"type": "node",
31+
"request": "launch",
32+
"cwd": "${workspaceFolder}",
33+
"runtimeExecutable": "yarn",
34+
"runtimeArgs": ["run", "trace-debug", "build", "test/integration/basic"],
35+
"skipFiles": ["<node_internals>/**"],
36+
"port": 9229,
37+
"outFiles": ["${workspaceFolder}/packages/next/dist/**/*"]
38+
},
2839
{
2940
"name": "Launch app production",
3041
"type": "node",

bench/capture-trace.js

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
const http = require('http')
2+
const fs = require('fs')
3+
4+
const PORT = 9411
5+
const HOST = '0.0.0.0'
6+
7+
const traces = []
8+
9+
const onReady = () => console.log(`Listening on http://${HOST}:${PORT}`)
10+
const onRequest = async (req, res) => {
11+
if (
12+
req.method !== 'POST' ||
13+
req.url !== '/api/v2/spans' ||
14+
(req.headers && req.headers['content-type']) !== 'application/json'
15+
) {
16+
res.writeHead(200)
17+
return res.end()
18+
}
19+
20+
try {
21+
const body = JSON.parse(await getBody(req))
22+
for (const traceEvent of body) {
23+
traces.push(traceEvent)
24+
}
25+
res.writeHead(200)
26+
} catch (err) {
27+
console.warn(err)
28+
res.writeHead(500)
29+
}
30+
31+
res.end()
32+
}
33+
34+
const getBody = (req) =>
35+
new Promise((resolve, reject) => {
36+
let data = ''
37+
req.on('data', (chunk) => {
38+
data += chunk
39+
})
40+
req.on('end', () => {
41+
if (!req.complete) {
42+
return reject('Connection terminated before body was received.')
43+
}
44+
resolve(data)
45+
})
46+
req.on('aborted', () => reject('Connection aborted.'))
47+
req.on('error', () => reject('Connection error.'))
48+
})
49+
50+
const main = () => {
51+
const args = process.argv.slice(2)
52+
const outFile = args[0] || `./trace-${Date.now()}.json`
53+
54+
process.on('SIGINT', () => {
55+
console.log(`\nSaving to ${outFile}...`)
56+
fs.writeFileSync(outFile, JSON.stringify(traces, null, 2))
57+
process.exit()
58+
})
59+
60+
const server = http.createServer(onRequest)
61+
server.listen(PORT, HOST, onReady)
62+
}
63+
64+
if (require.main === module) {
65+
main()
66+
}

0 commit comments

Comments
 (0)