Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Jan 9, 2025
1 parent 45988ae commit 4c34444
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions packages/vitest/src/node/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { ErrorWithDiff, ParsedStack } from '@vitest/utils'
import type { Vitest } from './core'
import type { ErrorOptions, Logger } from './logger'
import type { TestProject } from './project'
/* eslint-disable prefer-template */
import { Console } from 'node:console'
import { existsSync, readFileSync } from 'node:fs'
import { Writable } from 'node:stream'
Expand Down Expand Up @@ -324,13 +323,13 @@ function printModuleWarningForPackage(
+ `You might want to create an issue to the package ${c.bold(
`"${name}"`,
)} asking `
+ 'them to ship the file in .mjs extension or add "type": "module" in their package.json.'
+ '\n\n'
+ 'As a temporary workaround you can try to inline the package by updating your config:'
+ '\n\n'
+ c.gray(c.dim('// vitest.config.js'))
+ '\n'
+ c.green(`export default {
+ `them to ship the file in .mjs extension or add "type": "module" in their package.json.`
+ `\n\n`
+ `As a temporary workaround you can try to inline the package by updating your config:`
+ `\n\n${
c.gray(c.dim('// vitest.config.js'))
}\n${
c.green(`export default {
test: {
server: {
deps: {
Expand All @@ -340,7 +339,7 @@ function printModuleWarningForPackage(
}
}
}
}\n`),
}\n`)}`,
),
)
}
Expand Down

0 comments on commit 4c34444

Please sign in to comment.