Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
e3b81e05
Unverified
Commit
e3b81e05
authored
Mar 31, 2026
by
Niklas Mischkulnig
Committed by
GitHub
Mar 31, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
telemetry: set turboFlag correctly (#92149)
parent
a215ea60
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
5 deletions
+16
-5
index.ts
packages/next/src/build/index.ts
+7
-3
index.ts
packages/next/src/export/index.ts
+2
-1
types.ts
packages/next/src/export/types.ts
+2
-0
config.test.ts
test/integration/telemetry/test/config.test.ts
+5
-1
No files found.
packages/next/src/build/index.ts
View file @
e3b81e05
...
...
@@ -874,7 +874,8 @@ async function writeFullyStaticExport(
enabledDirectories
:
NextEnabledDirectories
,
configOutDir
:
string
,
nextBuildSpan
:
Span
,
appDirOnly
:
boolean
appDirOnly
:
boolean
,
bundler
:
Bundler
// TODO: Reusing the worker seems to break finding if it's `.html` or a JS page.
// Because writeFullyStaticExport is called after `exportApp` has been called before
// worker: StaticWorker | undefined
...
...
@@ -892,6 +893,7 @@ async function writeFullyStaticExport(
outdir
:
path
.
join
(
dir
,
configOutDir
),
numWorkers
:
getNumberOfWorkers
(
config
),
appDirOnly
,
bundler
,
},
nextBuildSpan
// worker
...
...
@@ -1166,7 +1168,7 @@ export default async function build(
isSrcDir
,
hasNowJson
:
!!
(
await
findUp
(
'now.json'
,
{
cwd
:
dir
})),
isCustomServer
:
null
,
turboFlag
:
false
,
turboFlag
:
bundler
===
Bundler
.
Turbopack
,
pagesDir
:
!!
pagesDir
,
appDir
:
!!
appDir
,
})
...
...
@@ -2997,6 +2999,7 @@ export default async function build(
statusMessage
:
`Generating static pages using
${
numberOfWorkers
}
worker
${
numberOfWorkers
>
1
?
's'
:
''
}
`
,
numWorkers
:
numberOfWorkers
,
appDirOnly
,
bundler
,
},
nextBuildSpan
,
staticWorker
...
...
@@ -4123,7 +4126,8 @@ export default async function build(
enabledDirectories
,
configOutDir
,
nextBuildSpan
,
appDirOnly
appDirOnly
,
bundler
// staticWorker
)
})
...
...
packages/next/src/export/index.ts
View file @
e3b81e05
...
...
@@ -73,6 +73,7 @@ import { getParams } from './helpers/get-params'
import
{
isDynamicRoute
}
from
'../shared/lib/router/utils/is-dynamic'
import
{
normalizeAppPath
}
from
'../shared/lib/router/utils/app-paths'
import
type
{
Params
}
from
'../server/request/params'
import
{
Bundler
}
from
'../lib/bundler'
export
class
ExportError
extends
Error
{
code
=
'NEXT_EXPORT_ERROR'
...
...
@@ -220,7 +221,7 @@ async function exportAppImpl(
isSrcDir
:
null
,
hasNowJson
:
!!
(
await
findUp
(
'now.json'
,
{
cwd
:
dir
})),
isCustomServer
:
null
,
turboFlag
:
false
,
turboFlag
:
options
.
bundler
===
Bundler
.
Turbopack
,
pagesDir
:
null
,
appDir
:
null
,
})
...
...
packages/next/src/export/types.ts
View file @
e3b81e05
...
...
@@ -16,6 +16,7 @@ import type { FetchMetrics } from '../server/base-http'
import
type
{
RouteMetadata
}
from
'./routes/types'
import
type
{
RenderResumeDataCache
}
from
'../server/resume-data-cache/resume-data-cache'
import
type
{
StaticWorker
}
from
'../build'
import
type
{
Bundler
}
from
'../lib/bundler'
export
type
ExportPathEntry
=
ExportPathMap
[
keyof
ExportPathMap
]
&
{
path
:
string
...
...
@@ -113,6 +114,7 @@ export interface ExportAppOptions {
hasOutdirFromCli
?:
boolean
numWorkers
:
number
appDirOnly
:
boolean
bundler
:
Bundler
}
export
type
ExportPageMetadata
=
{
...
...
test/integration/telemetry/test/config.test.ts
View file @
e3b81e05
...
...
@@ -81,7 +81,11 @@ describe('config telemetry', () => {
expect
(
event1
).
toMatch
(
/"nextConfigOutput": null/
)
expect
(
event1
).
toMatch
(
/"trailingSlashEnabled": false/
)
expect
(
event1
).
toMatch
(
/"reactStrictMode": false/
)
expect
(
event1
).
toMatch
(
/"turboFlag": false/
)
if
(
process
.
env
.
IS_TURBOPACK_TEST
)
{
expect
(
event1
).
toMatch
(
/"turboFlag": true/
)
}
else
{
expect
(
event1
).
toMatch
(
/"turboFlag": false/
)
}
expect
(
event1
).
toMatch
(
/"pagesDir": true/
)
expect
(
event1
).
toMatch
(
/"appDir": true/
)
}
catch
(
err
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment