Skip to content

Commit

Permalink
fix: use error-stack-parser-es
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jul 12, 2023
1 parent 99073e4 commit 8c1974b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
1 change: 0 additions & 1 deletion packages/devtools-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
},
"devDependencies": {
"birpc": "^0.2.12",
"error-stack-parser": "^2.1.4",
"hookable": "^5.5.3",
"unbuild": "^1.2.1",
"unimport": "^3.0.14",
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"birpc": "^0.2.12",
"boxen": "^7.1.1",
"consola": "^3.2.3",
"error-stack-parser": "^2.1.4",
"error-stack-parser-es": "^0.0.0",
"execa": "^7.1.1",
"fast-folder-size": "^2.1.0",
"fast-glob": "^3.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/devtools/src/runtime/function-metrics-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @unimport-disable
import { markRaw, reactive } from 'vue'
import ErrorStackParser from 'error-stack-parser'
import { parse as parseStrackTrace } from 'error-stack-parser-es'
import type { TimelineEventFunction, TimelineMetrics } from '../types'
import { useObjectStorage } from './plugins/view/utils'

Expand All @@ -12,7 +12,7 @@ const nonLiteralSymbol = Symbol('nuxt-devtools-fn-metrics-non-literal')

function getStacktrace() {
// eslint-disable-next-line unicorn/error-message
return ErrorStackParser.parse(new Error())
return parseStrackTrace(new Error())
}

export function initTimelineMetrics(): TimelineMetrics {
Expand Down
19 changes: 6 additions & 13 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 8c1974b

Please sign in to comment.