diff --git a/packages/vitest/src/node/core.ts b/packages/vitest/src/node/core.ts index c7b84a1e3ce2..737db1bf172e 100644 --- a/packages/vitest/src/node/core.ts +++ b/packages/vitest/src/node/core.ts @@ -48,7 +48,8 @@ export interface VitestOptions { } export class Vitest { - version = version + public readonly version = version + static readonly version = version config: ResolvedConfig = undefined! configOverride: Partial = {} diff --git a/packages/vitest/src/public/node.ts b/packages/vitest/src/public/node.ts index 9f8c5992fc2d..edb086a81e57 100644 --- a/packages/vitest/src/public/node.ts +++ b/packages/vitest/src/public/node.ts @@ -1,7 +1,10 @@ import type { ModuleDiagnostic as _FileDiagnostic } from '../node/reporters/reported-tasks' import { createServer as _createServer } from 'vite' +import { Vitest } from '../node/core' import { TestModule as _TestFile } from '../node/reporters/reported-tasks' +export const version = Vitest.version + export { parseCLI } from '../node/cli/cac' export { startVitest } from '../node/cli/cli-api' export { resolveApiServerConfig, resolveConfig } from '../node/config/resolveConfig' @@ -135,9 +138,12 @@ export type { export { createDebugger } from '../utils/debugger' export { + esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, + rollupVersion, + version as viteVersion, } from 'vite' export type * as Vite from 'vite'