@nuxt/hints 1.0.0 → 1.0.1

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.
Files changed (45) hide show
  1. package/README.md +41 -0
  2. package/dist/client/200.html +1 -1
  3. package/dist/client/404.html +1 -1
  4. package/dist/client/_nuxt/{CjcdMMgg.js → BAtxTl2q.js} +1 -1
  5. package/dist/client/_nuxt/{Bsg1wSyC.js → BY2SE5zy.js} +1 -1
  6. package/dist/client/_nuxt/{CuXryYYn.js → BdyeT68K.js} +1 -1
  7. package/dist/client/_nuxt/{DSP-MCDp.js → BqWnGSMi.js} +1 -1
  8. package/dist/client/_nuxt/{ByYzPvag.js → BsJUmJIm.js} +1 -1
  9. package/dist/client/_nuxt/{pMCvBh8W.js → BuQSe7zV.js} +1 -1
  10. package/dist/client/_nuxt/{CjOJpp6w.js → Bz59FrZb.js} +1 -1
  11. package/dist/client/_nuxt/{Bq0PVoHc.js → C8XNfCrI.js} +1 -1
  12. package/dist/client/_nuxt/{CIcR1vcE.js → CXDyekYo.js} +1 -1
  13. package/dist/client/_nuxt/{DPkFsPYM.js → CZ1OMT3Z.js} +1 -1
  14. package/dist/client/_nuxt/{Tn7kwbR-.js → CgrjxMR_.js} +1 -1
  15. package/dist/client/_nuxt/Cl_HNi2c.js +4 -0
  16. package/dist/client/_nuxt/{BYOhvh_g.js → DMLP1f5n.js} +1 -1
  17. package/dist/client/_nuxt/{pvvyrlNP.js → DO_IqDaw.js} +1 -1
  18. package/dist/client/_nuxt/{Ce7uSu6k.js → Dq5iEy-J.js} +1 -1
  19. package/dist/client/_nuxt/{CKOw9zgJ.js → DuO5kjlf.js} +1 -1
  20. package/dist/client/_nuxt/{B7cfIAWS.js → DvAmuSmV.js} +1 -1
  21. package/dist/client/_nuxt/{6cWOkjPb.js → LCb0JLof.js} +1 -1
  22. package/dist/client/_nuxt/{QtwWkSeY.js → RxLv4Mw1.js} +1 -1
  23. package/dist/client/_nuxt/{CDSHHE-A.js → a9uSpr3S.js} +1 -1
  24. package/dist/client/_nuxt/builds/latest.json +1 -1
  25. package/dist/client/_nuxt/builds/meta/99ecb9ec-79bf-4090-9942-9ce383dac370.json +1 -0
  26. package/dist/client/_nuxt/error-404.B6ZMX39t.css +1 -0
  27. package/dist/client/_nuxt/error-500.dS86tDkg.css +1 -0
  28. package/dist/client/component-lazy-load/index.html +1 -1
  29. package/dist/client/html-validate/index.html +1 -1
  30. package/dist/client/hydration/index.html +1 -1
  31. package/dist/client/index.html +1 -1
  32. package/dist/client/third-party-scripts/index.html +1 -1
  33. package/dist/client/web-vitals/index.html +1 -1
  34. package/dist/module.json +1 -1
  35. package/dist/module.mjs +3 -7
  36. package/dist/runtime/core/features.js +1 -1
  37. package/dist/runtime/core/plugins/features.client.js +1 -1
  38. package/dist/runtime/hydration/composables.js +3 -3
  39. package/dist/runtime/third-party-scripts/plugin.client.js +2 -2
  40. package/dist/runtime/web-vitals/plugin.client.js +4 -4
  41. package/package.json +9 -9
  42. package/dist/client/_nuxt/_MZqPPay.js +0 -4
  43. package/dist/client/_nuxt/builds/meta/173de33d-9c38-46d3-8eb9-89cb5fd9e2b0.json +0 -1
  44. package/dist/client/_nuxt/error-404.CaTd0Pxo.css +0 -1
  45. package/dist/client/_nuxt/error-500.C00SGdyT.css +0 -1
@@ -1,5 +1,5 @@
1
1
  import { defineNuxtPlugin } from "#imports";
2
- import { features } from "#hints-config";
2
+ import { features } from "#shared/hints-config";
3
3
  export default defineNuxtPlugin({
4
4
  name: "hints:features",
5
5
  setup(nuxtApp) {
@@ -1,4 +1,4 @@
1
- import { getCurrentInstance, inject, onMounted } from "vue";
1
+ import { getCurrentInstance, inject, markRaw, onMounted } from "vue";
2
2
  import { useNuxtApp } from "#imports";
3
3
  import { HYDRATION_ROUTE, formatHTML, logger } from "./utils.js";
4
4
  import { clientOnlySymbol } from "#app/components/client-only";
@@ -34,8 +34,8 @@ export function useHydrationCheck() {
34
34
  }).then((payload) => {
35
35
  nuxtApp.payload.__hints.hydration.push({
36
36
  ...payload,
37
- instance,
38
- vnode: vnodePrehydration
37
+ instance: markRaw(instance),
38
+ vnode: markRaw(vnodePrehydration)
39
39
  });
40
40
  });
41
41
  }
@@ -1,4 +1,4 @@
1
- import { defineNuxtPlugin, ref, useNuxtApp } from "#imports";
1
+ import { defineNuxtPlugin, shallowRef, useNuxtApp } from "#imports";
2
2
  import { defu } from "defu";
3
3
  import { logger } from "./utils.js";
4
4
  import { getFeatureOptions } from "../core/features.js";
@@ -46,7 +46,7 @@ export default defineNuxtPlugin({
46
46
  return isSameOriginScript(src) || isExtensionScript(src, schemesRegex) || isIgnoredDomain(src, ignoredDomains);
47
47
  }
48
48
  nuxtApp.payload.__hints = defu(nuxtApp.payload.__hints, {
49
- thirdPartyScripts: ref([])
49
+ thirdPartyScripts: shallowRef([])
50
50
  });
51
51
  const scripts = nuxtApp.payload.__hints.thirdPartyScripts;
52
52
  const isUsingNuxtScripts = !!nuxtApp.$scripts;
@@ -1,7 +1,7 @@
1
1
  import { defineNuxtPlugin, useNuxtApp } from "#imports";
2
2
  import { onINP, onLCP, onCLS } from "web-vitals/attribution";
3
3
  import { defu } from "defu";
4
- import { ref } from "vue";
4
+ import { shallowRef } from "vue";
5
5
  import { logger } from "./utils.js";
6
6
  import { getFeatureOptions } from "../core/features.js";
7
7
  function isImgElement(element) {
@@ -25,9 +25,9 @@ export default defineNuxtPlugin({
25
25
  const ignoreDomains = opts.ignoreDomains ?? [];
26
26
  nuxtApp.payload.__hints = defu(nuxtApp.payload.__hints, {
27
27
  webvitals: {
28
- lcp: ref([]),
29
- inp: ref([]),
30
- cls: ref([])
28
+ lcp: shallowRef([]),
29
+ inp: shallowRef([]),
30
+ cls: shallowRef([])
31
31
  }
32
32
  });
33
33
  nuxtApp.hook("hints:webvitals:sync", (webvitals) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/hints",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Nuxt module that shows hints for aspects of your application such as Performance, Security, and more!",
5
5
  "repository": "https://github.com/nuxt/hints",
6
6
  "homepage": "https://github.com/nuxt/hints",
@@ -25,19 +25,19 @@
25
25
  "@nuxt/kit": "^4.3.1",
26
26
  "consola": "^3.4.2",
27
27
  "defu": "^6.1.4",
28
- "devalue": "^5.6.3",
28
+ "devalue": "^5.6.4",
29
29
  "h3": "^1.15.6",
30
- "html-validate": "^10.11.1",
30
+ "html-validate": "^10.11.2",
31
31
  "knitwork": "^1.3.0",
32
32
  "magic-string": "^0.30.21",
33
33
  "nitropack": "^2.13.1",
34
- "oxc-parser": "^0.117.0",
34
+ "oxc-parser": "^0.120.0",
35
35
  "prettier": "^3.8.1",
36
36
  "sirv": "^3.0.2",
37
37
  "unplugin": "^3.0.0",
38
38
  "unstorage": "^1.17.4",
39
39
  "valibot": "^1.2.0",
40
- "vite-plugin-vue-tracer": "^1.2.0",
40
+ "vite-plugin-vue-tracer": "^1.3.0",
41
41
  "web-vitals": "^5.1.0"
42
42
  },
43
43
  "devDependencies": {
@@ -55,14 +55,14 @@
55
55
  "diff": "^8.0.3",
56
56
  "eslint": "^10.0.3",
57
57
  "get-port-please": "^3.2.0",
58
- "happy-dom": "^20.8.3",
59
- "pkg-pr-new": "0.0.65",
58
+ "happy-dom": "^20.8.4",
59
+ "pkg-pr-new": "0.0.66",
60
60
  "rimraf": "^6.1.3",
61
61
  "sass-embedded": "^1.98.0",
62
62
  "shiki": "^3.23.0",
63
63
  "shiki-transformer-fold": "^0.2.0",
64
- "vitest": "^4.0.18",
65
- "@nuxt/hints": "^1.0.0"
64
+ "vitest": "^4.1.0",
65
+ "@nuxt/hints": "^1.0.1"
66
66
  },
67
67
  "scripts": {
68
68
  "client:build": "nuxi generate client",