Skip to content

Commit b81d7e2

Browse files
authored
Merge branch 'canary' into fix/500_response_status
2 parents f59709d + f9d12d1 commit b81d7e2

File tree

1,076 files changed

+106616
-26472
lines changed

Some content is hidden

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

1,076 files changed

+106616
-26472
lines changed

.cargo/config.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,4 @@ rustflags = [
3535
"-Zshare-generics=y",
3636
"-Csymbol-mangling-version=v0",
3737
"-Aclippy::too_many_arguments",
38-
# Clippy's needless mut lint is buggy: https://github.com/rust-lang/rust-clippy/issues/11299
39-
"-Aclippy::needless_pass_by_ref_mut",
40-
# Clippy's partial_eq lint is buggy: https://github.com/rust-lang/rust-clippy/issues/11178
41-
"-Aclippy::non_canonical_partial_ord_impl",
4238
]

.eslintrc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,18 @@
213213
],
214214
"eslint-plugin/require-meta-docs-url": "error"
215215
}
216+
},
217+
{
218+
"files": ["packages/**/*.tsx", "packages/**/*.ts"],
219+
"rules": {
220+
"@typescript-eslint/consistent-type-imports": [
221+
"error",
222+
{
223+
"disallowTypeAnnotations": false
224+
}
225+
],
226+
"@typescript-eslint/no-import-type-side-effects": "error"
227+
}
216228
}
217229
],
218230
"rules": {

.github/CODEOWNERS

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828

2929
# Tooling & Telemetry
3030

31-
/packages/next/src/build/ @timneutkens @ijjk @shuding @huozhi @ztanner @vercel/web-tooling
32-
/packages/next/src/server/lib/router-utils/setup-dev.ts @timneutkens @ijjk @shuding @huozhi @feedthejim @ztanner @wyattjoh @vercel/web-tooling
33-
/packages/next/src/telemetry/ @timneutkens @ijjk @shuding @padmaia
34-
/packages/next-swc/ @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
35-
Cargo.toml @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
36-
Cargo.lock @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
37-
/.cargo/config.toml @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
38-
/.config/nextest.toml @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
39-
/test/build-turbopack-tests-manifest.js @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
40-
/test/turbopack-tests-manifest.json @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
31+
/packages/next/src/build/ @timneutkens @ijjk @shuding @huozhi @ztanner @feedthejim @vercel/web-tooling
32+
/packages/next/src/server/lib/router-utils/setup-dev-bundler.ts @timneutkens @ijjk @shuding @huozhi @feedthejim @ztanner @wyattjoh @vercel/web-tooling
33+
/packages/next/src/telemetry/ @timneutkens @ijjk @shuding @padmaia
34+
/packages/next-swc/ @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
35+
Cargo.toml @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
36+
Cargo.lock @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
37+
/.cargo/config.toml @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
38+
/.config/nextest.toml @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
39+
/test/build-turbopack-tests-manifest.js @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
40+
/test/turbopack-tests-manifest.json @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"dependencies": {
55
"async-sema": "^3.1.0",
66
"execa": "2.0.3",
7-
"fs-extra": "^8.1.0",
87
"get-port": "^5.0.0",
98
"glob": "^7.1.4",
109
"gzip-size": "^5.1.1",
@@ -20,7 +19,7 @@
2019
},
2120
"engines": {
2221
"node": ">=16.14.0",
23-
"pnpm": "8.7.1"
22+
"pnpm": "8.9.0"
2423
},
25-
"packageManager": "pnpm@8.7.1"
24+
"packageManager": "pnpm@8.9.0"
2625
}

.github/actions/next-stats-action/src/add-comment.js

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ const shortenLabel = (itemKey) =>
2424
: itemKey
2525

2626
const twoMB = 2 * 1024 * 1024
27+
const ONE_HUNDRED_BYTES = 100
28+
const ONE_HUNDRED_MS = 100
2729

2830
module.exports = async function addComment(
2931
results = [],
@@ -82,24 +84,21 @@ module.exports = async function addComment(
8284
// otherwise only show gzip values
8385
else if (!isGzipItem && !groupKey.match(gzipIgnoreRegex)) return
8486

85-
if (
86-
!itemKey.startsWith('buildDuration') ||
87-
(isBenchmark && itemKey.match(/req\/sec/))
88-
) {
89-
if (typeof mainItemVal === 'number') mainRepoTotal += mainItemVal
90-
if (typeof diffItemVal === 'number') diffRepoTotal += diffItemVal
91-
}
92-
9387
// calculate the change
9488
if (mainItemVal !== diffItemVal) {
9589
if (
9690
typeof mainItemVal === 'number' &&
9791
typeof diffItemVal === 'number'
9892
) {
99-
change = round(diffItemVal - mainItemVal, 2)
93+
const roundedValue = round(diffItemVal - mainItemVal, 2)
10094

10195
// check if there is still a change after rounding
102-
if (change !== 0) {
96+
if (
97+
roundedValue !== 0 &&
98+
((prettyType === 'ms' && roundedValue > ONE_HUNDRED_MS) ||
99+
(prettyType === 'bytes' && roundedValue > ONE_HUNDRED_BYTES))
100+
) {
101+
change = roundedValue
103102
const absChange = Math.abs(change)
104103
const warnIfNegative = isBenchmark && itemKey.match(/req\/sec/)
105104
const warn = warnIfNegative
@@ -112,12 +111,22 @@ module.exports = async function addComment(
112111
change = `${warn}${change < 0 ? '-' : '+'}${
113112
useRawValue ? absChange : prettify(absChange, prettyType)
114113
}`
114+
} else {
115+
change = 'N/A'
115116
}
116117
} else {
117118
change = 'N/A'
118119
}
119120
}
120121

122+
if (
123+
(change !== 'N/A' && !itemKey.startsWith('buildDuration')) ||
124+
(isBenchmark && itemKey.match(/req\/sec/))
125+
) {
126+
if (typeof mainItemVal === 'number') mainRepoTotal += mainItemVal
127+
if (typeof diffItemVal === 'number') diffRepoTotal += diffItemVal
128+
}
129+
121130
groupTable += `| ${
122131
isBenchmark ? itemKey : shortenLabel(itemKey)
123132
} | ${mainItemStr} | ${diffItemStr} | ${change} |\n`
@@ -169,8 +178,7 @@ module.exports = async function addComment(
169178

170179
// add diffs
171180
if (result.diffs) {
172-
const diffHeading = '#### Diffs\n'
173-
let diffContent = diffHeading
181+
let diffContent = ''
174182

175183
Object.keys(result.diffs).forEach((itemKey) => {
176184
const curDiff = result.diffs[itemKey]
@@ -187,8 +195,11 @@ module.exports = async function addComment(
187195
diffContent += `\n</details>\n`
188196
})
189197

190-
if (diffContent !== diffHeading) {
198+
if (diffContent.length > 0) {
199+
resultContent += `<details>\n`
200+
resultContent += `<summary><strong>Diff details</strong></summary>\n\n`
191201
resultContent += diffContent
202+
resultContent += `\n</details>\n\n`
192203
}
193204
}
194205
let increaseDecreaseNote = ''
@@ -199,7 +210,7 @@ module.exports = async function addComment(
199210
increaseDecreaseNote = ' (Decrease detected ✓)'
200211
}
201212

202-
comment += `<details>\n`
213+
comment += `<details open>\n`
203214
comment += `<summary><strong>${result.title}</strong>${increaseDecreaseNote}</summary>\n\n<br/>\n\n`
204215
comment += resultContent
205216
comment += '</details>\n'

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const path = require('path')
2-
const fs = require('fs-extra')
2+
const fs = require('fs/promises')
3+
const { existsSync } = require('fs')
34
const exec = require('./util/exec')
45
const logger = require('./util/logger')
56
const runConfigs = require('./run')
@@ -21,7 +22,7 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
2122

2223
;(async () => {
2324
try {
24-
if (await fs.pathExists(path.join(__dirname, '../SKIP_NEXT_STATS.txt'))) {
25+
if (existsSync(path.join(__dirname, '../SKIP_NEXT_STATS.txt'))) {
2526
console.log(
2627
'SKIP_NEXT_STATS.txt file present, exiting stats generation..'
2728
)
@@ -100,7 +101,7 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
100101
for (const dir of repoDirs) {
101102
logger(`Running initial build for ${dir}`)
102103
if (!actionInfo.skipClone) {
103-
const usePnpm = await fs.pathExists(path.join(dir, 'pnpm-lock.yaml'))
104+
const usePnpm = existsSync(path.join(dir, 'pnpm-lock.yaml'))
104105

105106
if (!statsConfig.skipInitialInstall) {
106107
await exec.spawnPromise(
@@ -121,15 +122,13 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
121122
}
122123

123124
await fs
124-
.copy(
125+
.cp(
125126
path.join(__dirname, '../native'),
126-
path.join(dir, 'packages/next-swc/native')
127+
path.join(dir, 'packages/next-swc/native'),
128+
{ recursive: true, force: true }
127129
)
128130
.catch(console.error)
129131

130-
console.log(await exec(`ls ${path.join(__dirname, '../native')}`))
131-
console.log(await exec(`cd ${dir} && ls ${dir}/packages/next-swc/native`))
132-
133132
logger(`Linking packages in ${dir}`)
134133
const isMainRepo = dir === mainRepoDir
135134
const pkgPaths = await linkPackages({

0 commit comments

Comments
 (0)