@@ -86,11 +86,6 @@ import { getNodeDebugType } from '../lib/utils'
8686import { getNextErrorFeedbackMiddleware } from '../../client/components/react-dev-overlay/server/get-next-error-feedback-middleware'
8787
8888const MILLISECONDS_IN_NANOSECOND = BigInt ( 1_000_000 )
89- const isTestMode = ! ! (
90- process . env . NEXT_TEST_MODE ||
91- process . env . __NEXT_TEST_MODE ||
92- process . env . DEBUG
93- )
9489
9590function diff ( a : Set < any > , b : Set < any > ) {
9691 return new Set ( [ ...a ] . filter ( ( v ) => ! b . has ( v ) ) )
@@ -196,13 +191,9 @@ function erroredPages(compilation: webpack.Compilation) {
196191 return failedPages
197192}
198193
199- export async function getVersionInfo ( enabled : boolean ) : Promise < VersionInfo > {
194+ export async function getVersionInfo ( ) : Promise < VersionInfo > {
200195 let installed = '0.0.0'
201196
202- if ( ! enabled ) {
203- return { installed, staleness : 'unknown' }
204- }
205-
206197 try {
207198 installed = require ( 'next/package.json' ) . version
208199
@@ -751,21 +742,18 @@ export default class HotReloaderWebpack implements NextJsHotReloaderInterface {
751742 } )
752743 }
753744
754- private async tracedGetVersionInfo ( span : Span , enabled : boolean ) {
745+ private async tracedGetVersionInfo ( span : Span ) {
755746 const versionInfoSpan = span . traceChild ( 'get-version-info' )
756747 return versionInfoSpan . traceAsyncFn < VersionInfo > ( async ( ) =>
757- getVersionInfo ( enabled )
748+ getVersionInfo ( )
758749 )
759750 }
760751
761752 public async start ( ) : Promise < void > {
762753 const startSpan = this . hotReloaderSpan . traceChild ( 'start' )
763754 startSpan . stop ( ) // Stop immediately to create an artificial parent span
764755
765- this . versionInfo = await this . tracedGetVersionInfo (
766- startSpan ,
767- isTestMode || this . telemetry . isEnabled
768- )
756+ this . versionInfo = await this . tracedGetVersionInfo ( startSpan )
769757
770758 const nodeDebugType = getNodeDebugType ( )
771759 if ( nodeDebugType && ! this . devtoolsFrontendUrl ) {
0 commit comments