Skip to content

Commit f85bd25

Browse files
committed
feat(vue3): inspector: skip composition APIs
1 parent 62d0aa7 commit f85bd25

File tree

1 file changed

+55
-0
lines changed
  • packages/app-backend-vue3/src/components

1 file changed

+55
-0
lines changed

packages/app-backend-vue3/src/components/data.ts

+55
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,60 @@ import { camelize, StateEditor, SharedData } from '@vue-devtools/shared-utils'
44
import { ComponentInstance, CustomState, HookPayloads, Hooks, InspectedComponentData } from '@vue/devtools-api'
55
import { returnError } from '../util'
66

7+
const vueBuiltins = [
8+
'nextTick',
9+
'defineComponent',
10+
'defineAsyncComponent',
11+
'defineCustomElement',
12+
'ref',
13+
'computed',
14+
'reactive',
15+
'readonly',
16+
'watchEffect',
17+
'watchPostEffect',
18+
'watchSyncEffect',
19+
'watch',
20+
'isRef',
21+
'unref',
22+
'toRef',
23+
'toRefs',
24+
'isProxy',
25+
'isReactive',
26+
'isReadonly',
27+
'shallowRef',
28+
'triggerRef',
29+
'customRef',
30+
'shallowReactive',
31+
'shallowReadonly',
32+
'toRaw',
33+
'markRaw',
34+
'effectScope',
35+
'getCurrentScope',
36+
'onScopeDispose',
37+
'onMounted',
38+
'onUpdated',
39+
'onUnmounted',
40+
'onBeforeMount',
41+
'onBeforeUpdate',
42+
'onBeforeUnmount',
43+
'onErrorCaptured',
44+
'onRenderTracked',
45+
'onRenderTriggered',
46+
'onActivated',
47+
'onDeactivated',
48+
'onServerPrefetch',
49+
'provide',
50+
'inject',
51+
'h',
52+
'mergeProps',
53+
'cloneVNode',
54+
'isVNode',
55+
'resolveComponent',
56+
'resolveDirective',
57+
'withDirectives',
58+
'withModifiers',
59+
]
60+
761
/**
862
* Get the detailed information of an inspected instance.
963
*/
@@ -123,6 +177,7 @@ function processState (instance) {
123177
function processSetupState (instance) {
124178
const raw = instance.devtoolsRawSetupState || {}
125179
return Object.keys(instance.setupState)
180+
.filter(key => !vueBuiltins.includes(key))
126181
.map(key => {
127182
const value = returnError(() => toRaw(instance.setupState[key]))
128183

0 commit comments

Comments
 (0)