Skip to content

Commit

Permalink
chore: update source-map-support to newer @cspotcode/source-map-support
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Oct 31, 2022
1 parent 61fa18a commit 6738d73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
3 changes: 1 addition & 2 deletions packages/vite-node/package.json
Expand Up @@ -75,15 +75,14 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@cspotcode/source-map-support": "^0.8.1",
"debug": "^4.3.4",
"mlly": "^0.5.16",
"pathe": "^0.2.0",
"source-map-support": "^0.5.21",
"vite": "^3.0.0"
},
"devDependencies": {
"@types/debug": "^4.1.7",
"@types/source-map-support": "^0.5.6",
"cac": "^6.7.14",
"picocolors": "^1.0.0",
"rollup": "^2.79.1"
Expand Down
7 changes: 4 additions & 3 deletions packages/vite-node/src/source-map.ts
@@ -1,16 +1,17 @@
import { install } from 'source-map-support'
import type { RawSourceMap as SupportSourceMap } from '@cspotcode/source-map-support'
import { install } from '@cspotcode/source-map-support'
import type { RawSourceMap } from './types'

interface InstallSourceMapSupportOptions {
getSourceMap: (source: string) => RawSourceMap | null | undefined
getSourceMap: (source: string) => RawSourceMap | SupportSourceMap | null | undefined
}

export function installViteNodeSourcemaps(options: InstallSourceMapSupportOptions) {
install({
environment: 'node',
handleUncaughtExceptions: false,
retrieveSourceMap(source) {
const map = options.getSourceMap(source)
const map = options.getSourceMap(source) as unknown as SupportSourceMap
if (map) {
return {
url: source,
Expand Down
16 changes: 4 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6738d73

Please sign in to comment.