@nuxt/devtools-nightly 4.0.0-29889901.31569c7 → 4.0.0-29889901.a2a4fc6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,7 +25,7 @@ import { getPackageInfo } from 'local-pkg';
25
25
  import { DEVTOOLS_TERMINALS_DOCK_ID } from '@vitejs/devtools-kit/constants';
26
26
  import { debounce } from 'perfect-debounce';
27
27
 
28
- const version = "4.0.0-29889901.31569c7";
28
+ const version = "4.0.0-29889901.a2a4fc6";
29
29
  const peerDependencies = {
30
30
  "@nuxt/kit": "^4.0.0-0 || ^5.0.0-0",
31
31
  nitro: "*",
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools",
3
3
  "configKey": "devtools",
4
- "version": "4.0.0-29889901.31569c7",
4
+ "version": "4.0.0-29889901.a2a4fc6",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.3",
7
7
  "unbuild": "3.6.1"
@@ -3,7 +3,7 @@ import { NuxtDevtoolsInspectPanel } from "@nuxt/devtools/webcomponents";
3
3
  import { createHooks } from "hookable";
4
4
  import { debounce } from "perfect-debounce";
5
5
  import { events as inspectorEvents, hasData as inspectorHasData, state as inspectorState } from "vite-plugin-vue-tracer/client/overlay";
6
- import { computed, markRaw, nextTick, reactive, ref, shallowReactive, shallowRef, toRef, watch } from "vue";
6
+ import { computed, effect, isRef, markRaw, nextTick, reactive, ref, shallowReactive, shallowRef, toRef } from "vue";
7
7
  import { useAppConfig } from "#imports";
8
8
  import { initTimelineMetrics } from "../../function-metrics-helpers.js";
9
9
  const NUXT_DOCK_ANCHOR_ID = "nuxt:devtools";
@@ -240,14 +240,19 @@ function setupReactivity(client, router, timeMetric) {
240
240
  const refreshReactivity = debounce(() => {
241
241
  client.hooks.callHook("host:update:reactivity");
242
242
  }, 100, { trailing: true });
243
- watch(() => [
244
- client.nuxt.payload,
245
- client.app.colorMode.value,
246
- client.metrics.loading(),
247
- timeMetric
248
- ], () => {
249
- refreshReactivity();
250
- }, { deep: true });
243
+ const runner = effect(() => {
244
+ traverse([
245
+ client.nuxt.payload,
246
+ client.app.colorMode.value,
247
+ client.metrics.loading(),
248
+ timeMetric
249
+ ]);
250
+ }, {
251
+ scheduler: debounce(() => {
252
+ runner();
253
+ client.hooks.callHook("host:update:reactivity");
254
+ }, 100, { trailing: true })
255
+ });
251
256
  router?.afterEach(() => {
252
257
  refreshReactivity();
253
258
  });
@@ -255,3 +260,19 @@ function setupReactivity(client, router, timeMetric) {
255
260
  refreshReactivity();
256
261
  });
257
262
  }
263
+ function traverse(value, seen = /* @__PURE__ */ new Set()) {
264
+ if (!value || typeof value !== "object" || seen.has(value) || value.__v_skip)
265
+ return;
266
+ seen.add(value);
267
+ if (isRef(value)) {
268
+ traverse(value.value, seen);
269
+ } else if (Array.isArray(value)) {
270
+ for (const item of value)
271
+ traverse(item, seen);
272
+ } else if (value instanceof Map || value instanceof Set) {
273
+ value.forEach((item) => traverse(item, seen));
274
+ } else if (Object.prototype.toString.call(value) === "[object Object]") {
275
+ for (const key in value)
276
+ traverse(value[key], seen);
277
+ }
278
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools-nightly",
3
3
  "type": "module",
4
- "version": "4.0.0-29889901.31569c7",
4
+ "version": "4.0.0-29889901.a2a4fc6",
5
5
  "description": "The Nuxt DevTools gives you insights and transparency about your Nuxt App.",
6
6
  "license": "MIT",
7
7
  "homepage": "https://nuxt.com/modules/devtools",
@@ -48,8 +48,8 @@
48
48
  "@devframes/plugin-code-server": "^1.2.6",
49
49
  "@devframes/plugin-data-inspector": "^1.2.6",
50
50
  "@devframes/plugin-og": "^1.2.6",
51
- "@nuxt/devtools-assets": "npm:@nuxt/devtools-assets-nightly@4.0.0-29889901.31569c7",
52
- "@nuxt/devtools-kit": "npm:@nuxt/devtools-kit-nightly@4.0.0-29889901.31569c7",
51
+ "@nuxt/devtools-assets": "npm:@nuxt/devtools-assets-nightly@4.0.0-29889901.a2a4fc6",
52
+ "@nuxt/devtools-kit": "npm:@nuxt/devtools-kit-nightly@4.0.0-29889901.a2a4fc6",
53
53
  "@vitejs/devtools": "^0.8.0",
54
54
  "@vitejs/devtools-kit": "^0.8.0",
55
55
  "consola": "^3.4.2",