Skip to content

Commit

Permalink
refactor: update ready message (#78)
Browse files Browse the repository at this point in the history
* refactor: update ready message

* chore: update message

* chore: use another node arg

--throw-deprecation will cause the test to fail since we are using ts-node, and ts-node use features that are deprecated with node 22
  • Loading branch information
Julien-R44 authored May 7, 2024
1 parent 8c08240 commit ce295a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/dev_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))}`)
Expand Down
4 changes: 2 additions & 2 deletions tests/run.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'] })
Expand All @@ -74,7 +74,7 @@ test.group('Child process', () => {
process.allowedNodeEnvironmentFlags.has('--disable-warning')
? '--disable-warning=ExperimentalWarning'
: '--no-warnings',
'--throw-deprecation',
'--conditions=dev',
],
})
})
Expand Down

0 comments on commit ce295a2

Please sign in to comment.