diff --git a/src/dev_server.ts b/src/dev_server.ts index 387d98c7..00581cb4 100644 --- a/src/dev_server.ts +++ b/src/dev_server.ts @@ -210,11 +210,9 @@ export class DevServer { .useColors(this.#colors) .useRenderer(this.#logger.getRenderer()) .add(`Server address: ${this.#colors.cyan(`http://${host}:${message.port}`)}`) - .add( - `File system watcher: ${this.#colors.cyan( - `${this.#isWatching ? 'enabled' : 'disabled'}` - )}` - ) + + const watchMode = this.#options.hmr ? 'HMR' : this.#isWatching ? 'Legacy' : 'None' + displayMessage.add(`Watch Mode: ${this.#colors.cyan(watchMode)}`) if (message.duration) { displayMessage.add(`Ready in: ${this.#colors.cyan(prettyHrtime(message.duration))}`) diff --git a/tests/run.spec.ts b/tests/run.spec.ts index f3d87012..e3963102 100644 --- a/tests/run.spec.ts +++ b/tests/run.spec.ts @@ -60,7 +60,7 @@ test.group('Child process', () => { const childProcess = runNode(fs.basePath, { script: 'foo.ts', scriptArgs: ['--watch', '--foo=bar'], - nodeArgs: ['--throw-deprecation'], + nodeArgs: ['--conditions=dev'], }) const payload = await pEvent(childProcess, 'message', { rejectionEvents: ['error'] }) @@ -74,7 +74,7 @@ test.group('Child process', () => { process.allowedNodeEnvironmentFlags.has('--disable-warning') ? '--disable-warning=ExperimentalWarning' : '--no-warnings', - '--throw-deprecation', + '--conditions=dev', ], }) })