Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose versions from vitest/node entry point and statically on Vitest #7029

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
Loading