Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename experimental tracing to outputFileTracing #29267

Merged
merged 6 commits into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/next/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ export default async function build(
)
})

if (config.experimental.nftTracing) {
if (config.experimental.outputFileTracing) {
pageTraceIncludes.set(page, workerResult.traceIncludes || [])
pageTraceExcludes.set(page, workerResult.traceExcludes || [])
}
Expand Down Expand Up @@ -994,7 +994,7 @@ export default async function build(
)
}

if (config.experimental.nftTracing) {
if (config.experimental.outputFileTracing) {
const globOrig =
require('next/dist/compiled/glob') as typeof import('next/dist/compiled/glob')
const glob = (pattern: string): Promise<string[]> => {
Expand Down
2 changes: 1 addition & 1 deletion packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ export default async function getBaseWebpackConfig(
pagesDir,
}),
!isServer && new DropClientPage(),
config.experimental.nftTracing &&
config.experimental.outputFileTracing &&
!isLikeServerless &&
isServer &&
!dev &&
Expand Down
4 changes: 2 additions & 2 deletions packages/next/server/config-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export type NextConfig = { [key: string]: any } & {
esmExternals?: boolean | 'loose'
staticPageGenerationTimeout?: number
isrMemoryCacheSize?: number
nftTracing?: boolean
outputFileTracing?: boolean
ijjk marked this conversation as resolved.
Show resolved Hide resolved
concurrentFeatures?: boolean
}
}
Expand Down Expand Up @@ -219,7 +219,7 @@ export const defaultConfig: NextConfig = {
staticPageGenerationTimeout: 60,
// default to 50MB limit
isrMemoryCacheSize: 50 * 1024 * 1024,
nftTracing: false,
outputFileTracing: false,
concurrentFeatures: false,
},
future: {
Expand Down
10 changes: 10 additions & 0 deletions packages/next/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,16 @@ function assignDefaults(userConfig: { [key: string]: any }) {
}
}

if (result.experimental && 'nftTracing' in (result.experimental as any)) {
// TODO: remove this warning and assignment when we leave experimental phase
Log.warn(
`Experimental \`nftTracing\` has been renamed to \`outputFileTracing\`. Please update your next.config.js file accordingly.`
)
result.experimental.outputFileTracing = (
result.experimental as any
).nftTracing
}

// TODO: Change defaultConfig type to NextConfigComplete
// so we don't need "!" here.
setHttpAgentOptions(
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/prerender-native-module.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('prerender native module', () => {
},
nextConfig: {
experimental: {
nftTracing: true,
outputFileTracing: true,
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/prerender.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Prerender', () => {
},
nextConfig: {
experimental: {
nftTracing: true,
outputFileTracing: true,
},
async rewrites() {
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path')

module.exports = {
experimental: {
nftTracing: true,
outputFileTracing: true,
},
webpack(cfg, { isServer }) {
console.log(cfg.entry)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/production/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ setInterval(() => {}, 250)

module.exports = {
experimental: {
nftTracing: true,
outputFileTracing: true,
},
onDemandEntries: {
// Make sure entries are not getting disposed.
Expand Down
2 changes: 1 addition & 1 deletion test/integration/required-server-files/app/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
// ensure incorrect target is overridden by env
target: 'serverless',
experimental: {
nftTracing: true,
outputFileTracing: true,
},
eslint: {
ignoreDuringBuilds: true,
Expand Down