nuxt-seo-utils 7.0.8 → 7.0.10

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.
package/dist/module.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "nuxt": ">=3.16.0",
6
6
  "bridge": false
7
7
  },
8
- "version": "7.0.7",
8
+ "version": "7.0.9",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "1.0.1",
11
11
  "unbuild": "3.5.0"
@@ -28,11 +28,12 @@ const BreadcrumbCtx = Symbol("BreadcrumbCtx");
28
28
  export function useBreadcrumbItems(_options = {}) {
29
29
  const nuxtApp = useNuxtApp();
30
30
  const vm = getCurrentInstance();
31
- const id = `${vm?.uid || 0}:${_options.id || "breadcrumb"}`;
31
+ const id = `${_options.id || "breadcrumb"}`;
32
+ const uid = `${vm?.uid || 0}`;
32
33
  const parentChain = [];
33
34
  let parent = vm?.parent;
34
35
  while (parent) {
35
- parentChain.push(parent.uid);
36
+ parentChain.push(parent.uid || 0);
36
37
  parent = parent.parent;
37
38
  }
38
39
  const pauseUpdates = ref(import.meta.client && nuxtApp.isHydrating);
@@ -44,11 +45,11 @@ export function useBreadcrumbItems(_options = {}) {
44
45
  provide(BreadcrumbCtx, stateRef);
45
46
  }
46
47
  const state = stateRef.value;
47
- state[id] = _options;
48
+ state[uid] = _options;
48
49
  stateRef.value = state;
49
50
  onUnmounted(() => {
50
51
  const state2 = toRaw(stateRef.value);
51
- delete state2[id];
52
+ delete state2[uid];
52
53
  stateRef.value = state2;
53
54
  });
54
55
  if (import.meta.client) {
@@ -87,7 +88,7 @@ export function useBreadcrumbItems(_options = {}) {
87
88
  return lastBreadcrumbs.value;
88
89
  }
89
90
  const state = toValue(stateRef) || {};
90
- const optionStack = [...parentChain, vm?.uid || 0].map((parentId) => state[`${parentId}:${_options.id || "breadcrumb"}`]).filter(Boolean);
91
+ const optionStack = [...parentChain, uid].map((parentId) => state[parentId]).filter(Boolean);
91
92
  const flatOptions = optionStack.reduce((acc, _cur) => {
92
93
  const cur = {};
93
94
  Object.entries(_cur).forEach(([key, value]) => {
@@ -40,7 +40,7 @@ export function applyDefaults() {
40
40
  tagPriority: "low"
41
41
  };
42
42
  useHead({
43
- htmlAttrs: { lang: siteConfig.currentLocale },
43
+ htmlAttrs: { lang: () => toValue(siteConfig.currentLocale) },
44
44
  templateParams: {
45
45
  site: () => siteConfig,
46
46
  siteName: () => siteConfig.name
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-seo-utils",
3
3
  "type": "module",
4
- "version": "7.0.8",
4
+ "version": "7.0.10",
5
5
  "description": "SEO utilities to improve your Nuxt sites discoverability and shareability",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -32,8 +32,8 @@
32
32
  ]
33
33
  },
34
34
  "dependencies": {
35
- "@nuxt/kit": "^3.16.2",
36
- "@unhead/addons": "^2.0.5",
35
+ "@nuxt/kit": "^3.17.0",
36
+ "@unhead/addons": "^2.0.8",
37
37
  "defu": "^6.1.4",
38
38
  "escape-string-regexp": "^5.0.0",
39
39
  "fast-glob": "^3.3.3",
@@ -46,29 +46,29 @@
46
46
  "ufo": "^1.6.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@antfu/eslint-config": "4.11.0",
49
+ "@antfu/eslint-config": "^4.12.0",
50
50
  "@nuxt/module-builder": "^1.0.1",
51
- "@nuxt/schema": "3.16.2",
51
+ "@nuxt/schema": "^3.17.0",
52
52
  "@nuxt/test-utils": "^3.17.2",
53
- "@nuxt/ui": "^3.0.2",
53
+ "@nuxt/ui": "^3.1.0",
54
54
  "@nuxtjs/eslint-config-typescript": "^12.1.0",
55
55
  "@nuxtjs/i18n": "^9.5.3",
56
- "@types/node": "^22.14.1",
57
- "@unhead/vue": "2.0.4",
56
+ "@types/node": "^22.15.2",
57
+ "@unhead/vue": "^2.0.8",
58
58
  "@vue/test-utils": "^2.4.6",
59
59
  "bumpp": "^10.1.0",
60
60
  "case-police": "^2.0.0",
61
61
  "cheerio": "1.0.0",
62
- "eslint": "^9.24.0",
62
+ "eslint": "^9.25.1",
63
63
  "happy-dom": "^17.4.4",
64
64
  "markdownlint-cli": "^0.44.0",
65
- "nuxt": "3.16.2",
65
+ "nuxt": "^3.17.0",
66
66
  "nuxt-content-twoslash": "^0.1.2",
67
- "playwright-core": "^1.51.1",
68
- "sass": "^1.86.3",
69
- "typescript": "5.8.3",
70
- "vitest": "^3.1.1",
71
- "vue-tsc": "^2.2.8"
67
+ "playwright-core": "^1.52.0",
68
+ "sass": "^1.87.0",
69
+ "typescript": "^5.8.3",
70
+ "vitest": "^3.1.2",
71
+ "vue-tsc": "^2.2.10"
72
72
  },
73
73
  "scripts": {
74
74
  "lint": "eslint . --fix",