Skip to content

Upgrading vitest 0.6 to 0.7

Review needed0.6.3 → 0.7.13New11Changed3Fixed19

Review neededUpgrade verdict

3 behavior changes.

  • vite-node: don't fallback to cjs by default.
  • vite-node: normalize relative paths to be from current working directory.
  • vite-node: rework moduleCache, fix hmr.
Nothing to change

No breaking, platform, security or deprecated items in this range.

Node.js requirement changed in 0.7.13: >=14.14.0 → >=v14.19.1.

Nothing in this upgrade needs a code or configuration change.

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • changed: property UserConfig.test?: InlineConfig → property UserConfig.test?: UserConfig$2['test']
  • changed: function spyOn<T, G extends Properties<Required<T>>>(obj: T, methodName: G, accesType: 'set'): SpyInstance<[T[G]], void> → function spyOn<T, G extends Properties<Required<T>>>(obj: T, methodName: G, accessType: 'set'): SpyInstance<[T[G]], void>
  • changed: function spyOn<T, S extends Properties<Required<T>>>(obj: T, methodName: S, accesType: 'get'): SpyInstance<[], T[S]> → function spyOn<T, S extends Properties<Required<T>>>(obj: T, methodName: S, accessType: 'get'): SpyInstance<[], T[S]>
  • changed: property WorkerGlobalState.moduleCache: Map<string, ModuleCache$1> → property WorkerGlobalState.moduleCache: ModuleCacheMap
  • added: function getRunningMode(): 'run' | 'watch'
  • added: function isFirstRun(): boolean
  • added: function isWatchMode(): boolean
  • added: function runOnce<T>(fn: (() => T), key?: string): T
  • added: property InlineConfig.outputTruncateLength?: number
  • added: property Position.source?: string
  • added: property WorkerGlobalState.mockMap: MockMap
  • added: class VitestRunner extends ViteNodeRunner
  • added: constructor VitestRunner(options: ExecuteOptions)
  • added: interface ExecuteOptions extends ViteNodeRunnerOptions
  • added: method VitestRunner.prepareContext(context: Record<string, any>): Record<string, any> & { __vite_ssr_import__: (dep: string) => Promise<any>; __vite_ssr_dynamic_import__: (dep: string) => Promise<any>; __vitest_mocker__: VitestMocker }
  • added: property ExecuteOptions.mockMap: MockMap
  • added: property VitestRunner.entries: Set<string>
  • added: property VitestRunner.mocker: VitestMocker
  • added: property VitestRunner.options: ExecuteOptions