[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

fix: don't bundle import from rollup (#4392)

authored by

Vladimir and committed by
GitHub
(Oct 30, 2023, 11:11 AM +0100) 3b58487b ba1df849

+5 -4
+2 -2
packages/vite-node/src/types.ts
··· 34 34 export type { EncodedSourceMap, DecodedSourceMap, SourceMapInput } from '@jridgewell/trace-mapping' 35 35 36 36 export interface RawSourceMap extends StartOfSourceMap { 37 - version: string 37 + version: number 38 38 sources: string[] 39 39 names: string[] 40 - sourcesContent?: string[] 40 + sourcesContent?: (string | null)[] 41 41 mappings: string 42 42 } 43 43
+3 -2
packages/vitest/src/node/workspace.ts
··· 6 6 import { ViteNodeRunner } from 'vite-node/client' 7 7 import { ViteNodeServer } from 'vite-node/server' 8 8 import c from 'picocolors' 9 + import type { RawSourceMap } from 'vite-node' 9 10 import { createBrowserServer } from '../integrations/browser/server' 10 11 import type { ArgumentsType, Reporter, ResolvedConfig, UserConfig, UserWorkspaceConfig, Vitest } from '../types' 11 12 import { deepMerge } from '../utils' ··· 140 141 || this.browser?.moduleGraph.getModuleById(id) 141 142 } 142 143 143 - getSourceMapModuleById(id: string) { 144 + getSourceMapModuleById(id: string): RawSourceMap | null | undefined { 144 145 const mod = this.server.moduleGraph.getModuleById(id) 145 146 return mod?.ssrTransformResult?.map || mod?.transformResult?.map 146 147 } 147 148 148 - getBrowserSourceMapModuleById(id: string) { 149 + getBrowserSourceMapModuleById(id: string): RawSourceMap | null | undefined { 149 150 return this.browser?.moduleGraph.getModuleById(id)?.transformResult?.map 150 151 } 151 152