Skip to content

Commit

Permalink
feat: expose versions from vitest/node entry point and statically o…
Browse files Browse the repository at this point in the history
…n Vitest (#7029)
  • Loading branch information
sheremet-va authored Dec 6, 2024
1 parent 2ad14b7 commit be8d479
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vitest/src/node/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ResolvedConfig> = {}
Expand Down
6 changes: 6 additions & 0 deletions packages/vitest/src/public/node.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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'

0 comments on commit be8d479

Please sign in to comment.