Skip to content

fix!: remove deprecated getSourceMap #8194

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

Merged
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
11 changes: 0 additions & 11 deletions packages/vitest/src/node/pools/rpc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { RawSourceMap } from 'vite-node'
import type { RuntimeRPC } from '../../types/rpc'
import type { TestProject } from '../project'
import type { ResolveSnapshotPathHandlerContext } from '../types/config'
Expand Down Expand Up @@ -28,16 +27,6 @@ export function createMethodsRPC(project: TestProject, options: MethodsOptions =
config: project.serializedConfig,
})
},
async getSourceMap(id, force) {
if (force) {
const mod = project.vite.moduleGraph.getModuleById(id)
if (mod) {
project.vite.moduleGraph.invalidateModule(mod)
}
}
const r = await project.vitenode.transformRequest(id)
return r?.map as RawSourceMap | undefined
},
async fetch(id, transformMode) {
const result = await project.vitenode.fetchResult(id, transformMode).catch(handleRollupError)
const code = result.code
Expand Down
7 changes: 0 additions & 7 deletions packages/vitest/src/types/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ export interface RuntimeRPC {
/** @deprecated */
syntheticNamedExports?: boolean | string | null
} | null>
/**
* @deprecated unused
*/
getSourceMap: (
id: string,
force?: boolean
) => Promise<any>

onUserConsoleLog: (log: UserConsoleLog) => void
onUnhandledError: (err: unknown, type: string) => void
Expand Down
Loading