Skip to content

Commit ff93444

Browse files
authored
fix!: remove deprecated getSourceMap (#8194)
1 parent 14c5072 commit ff93444

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

packages/vitest/src/node/pools/rpc.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { RawSourceMap } from 'vite-node'
21
import type { RuntimeRPC } from '../../types/rpc'
32
import type { TestProject } from '../project'
43
import type { ResolveSnapshotPathHandlerContext } from '../types/config'
@@ -28,16 +27,6 @@ export function createMethodsRPC(project: TestProject, options: MethodsOptions =
2827
config: project.serializedConfig,
2928
})
3029
},
31-
async getSourceMap(id, force) {
32-
if (force) {
33-
const mod = project.vite.moduleGraph.getModuleById(id)
34-
if (mod) {
35-
project.vite.moduleGraph.invalidateModule(mod)
36-
}
37-
}
38-
const r = await project.vitenode.transformRequest(id)
39-
return r?.map as RawSourceMap | undefined
40-
},
4130
async fetch(id, transformMode) {
4231
const result = await project.vitenode.fetchResult(id, transformMode).catch(handleRollupError)
4332
const code = result.code

packages/vitest/src/types/rpc.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ export interface RuntimeRPC {
2727
/** @deprecated */
2828
syntheticNamedExports?: boolean | string | null
2929
} | null>
30-
/**
31-
* @deprecated unused
32-
*/
33-
getSourceMap: (
34-
id: string,
35-
force?: boolean
36-
) => Promise<any>
3730

3831
onUserConsoleLog: (log: UserConsoleLog) => void
3932
onUnhandledError: (err: unknown, type: string) => void

0 commit comments

Comments
 (0)