@nuxtjs/sitemap 8.2.1 → 8.2.2

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/README.md CHANGED
@@ -45,7 +45,7 @@ npx nuxi@latest module add sitemap
45
45
  > npx skilld add @nuxtjs/sitemap
46
46
  > ```
47
47
 
48
- 💡 Need a complete SEO solution for Nuxt? Check out [Nuxt SEO](https://nuxtseo.com).
48
+ 💡 Generated your sitemap? Check which URLs Google has indexed with the free [Sitemap Validator](https://nuxtseo.com/tools/xml-sitemap-validator), or monitor indexing continuously with [Nuxt SEO Pro](https://nuxtseo.com/pro).
49
49
 
50
50
  ## Documentation
51
51
 
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "nuxt": ">=3.9.0"
5
5
  },
6
6
  "configKey": "sitemap",
7
- "version": "8.2.1",
7
+ "version": "8.2.2",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -12,7 +12,7 @@ import { join } from 'node:path';
12
12
  import { colors } from 'consola/utils';
13
13
  import { splitForLocales, createPathFilter } from '../dist/runtime/utils-pure.js';
14
14
  import { isNuxtGenerate, getNuxtModuleOptions, resolveNitroPreset, resolveNuxtContentVersion, createPagesPromise, createNitroPromise } from 'nuxtseo-shared/kit';
15
- import { p as parseHtmlExtractSitemapMeta } from './shared/sitemap.DJC-maKi.mjs';
15
+ import { p as parseHtmlExtractSitemapMeta } from './shared/sitemap.BoMnWHOt.mjs';
16
16
  import { normaliseDate } from '../dist/runtime/server/sitemap/urlset/normalise.js';
17
17
  import { splitPathForI18nLocales as splitPathForI18nLocales$1, expandCompactLocaleRoute, normalizeLocales, generatePathForI18nPages } from 'nuxtseo-shared/i18n';
18
18
  import 'ultrahtml';
@@ -1,6 +1,28 @@
1
1
  import { parseURL } from 'ufo';
2
2
  import { parse, walkSync, ELEMENT_NODE } from 'ultrahtml';
3
3
 
4
+ const CONTROL_CHARACTERS_RE = /[\x00-\x1F\x7F-\x9F]/g;
5
+ const HTML_ENTITIES = {
6
+ amp: "&",
7
+ apos: "'",
8
+ gt: ">",
9
+ lt: "<",
10
+ quot: '"'
11
+ };
12
+ const HTML_ENTITY_RE = /&(?:#(\d+)|#x([\da-f]+)|amp|apos|gt|lt|quot);/gi;
13
+ function decodeHtmlEntities(value) {
14
+ return value.replace(HTML_ENTITY_RE, (match, decimal, hexadecimal) => {
15
+ if (decimal || hexadecimal) {
16
+ const entity = decimal || hexadecimal || "";
17
+ const codePoint = Number.parseInt(entity, decimal ? 10 : 16);
18
+ if (Number.isFinite(codePoint) && codePoint >= 0 && codePoint <= 1114111) {
19
+ return String.fromCodePoint(codePoint);
20
+ }
21
+ return match;
22
+ }
23
+ return HTML_ENTITIES[match.slice(1, -1).toLowerCase()] || match;
24
+ });
25
+ }
4
26
  function isValidUrl(url) {
5
27
  if (!url || typeof url !== "string")
6
28
  return false;
@@ -23,7 +45,7 @@ function isValidString(value) {
23
45
  function sanitizeString(value) {
24
46
  if (!isValidString(value))
25
47
  return "";
26
- return String(value).trim().replace(/[\x00-\x1F\x7F-\x9F]/g, "");
48
+ return decodeHtmlEntities(String(value).trim().replace(CONTROL_CHARACTERS_RE, "")).replace(CONTROL_CHARACTERS_RE, "");
27
49
  }
28
50
  function isValidDate(dateString) {
29
51
  if (!dateString)
package/dist/utils.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { p as parseHtmlExtractSitemapMeta } from './shared/sitemap.DJC-maKi.mjs';
1
+ export { p as parseHtmlExtractSitemapMeta } from './shared/sitemap.BoMnWHOt.mjs';
2
2
  import 'ufo';
3
3
  import 'ultrahtml';
4
4
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxtjs/sitemap",
3
3
  "type": "module",
4
- "version": "8.2.1",
4
+ "version": "8.2.2",
5
5
  "description": "Powerfully flexible XML Sitemaps that integrate seamlessly, for Nuxt.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -58,9 +58,9 @@
58
58
  "@nuxt/kit": "^4.4.8",
59
59
  "consola": "^3.4.2",
60
60
  "defu": "^6.1.7",
61
- "fast-xml-parser": "^5.8.0",
62
- "nuxt-site-config": "^4.1.0",
63
- "nuxtseo-shared": "^5.3.0",
61
+ "fast-xml-parser": "^5.9.3",
62
+ "nuxt-site-config": "^4.1.1",
63
+ "nuxtseo-shared": "^5.3.1",
64
64
  "ofetch": "^1.5.1",
65
65
  "pathe": "^2.0.3",
66
66
  "pkg-types": "^2.3.1",
@@ -69,34 +69,34 @@
69
69
  "ultrahtml": "^1.6.0"
70
70
  },
71
71
  "devDependencies": {
72
- "@antfu/eslint-config": "^9.0.0",
73
- "@arethetypeswrong/cli": "^0.18.3",
72
+ "@antfu/eslint-config": "^9.1.0",
73
+ "@arethetypeswrong/cli": "^0.18.4",
74
74
  "@nuxt/content": "^3.14.0",
75
75
  "@nuxt/devtools-kit": "4.0.0-alpha.7",
76
76
  "@nuxt/module-builder": "^1.0.2",
77
77
  "@nuxt/test-utils": "^4.0.3",
78
- "@nuxt/ui": "^4.8.2",
78
+ "@nuxt/ui": "^4.9.0",
79
79
  "@nuxtjs/i18n": "^10.4.0",
80
- "@nuxtjs/robots": "^6.0.9",
80
+ "@nuxtjs/robots": "^6.1.1",
81
81
  "@vue/test-utils": "^2.4.11",
82
- "better-sqlite3": "^12.10.0",
82
+ "better-sqlite3": "^12.11.1",
83
83
  "bumpp": "^11.1.0",
84
- "eslint": "^10.4.1",
84
+ "eslint": "^10.5.0",
85
85
  "eslint-plugin-harlanzw": "^0.17.0",
86
86
  "execa": "^9.6.1",
87
- "happy-dom": "^20.10.2",
87
+ "happy-dom": "^20.10.6",
88
88
  "nuxt": "^4.4.8",
89
- "nuxt-i18n-micro": "^3.18.2",
90
- "nuxtseo-layer-devtools": "^5.3.0",
91
- "semver": "^7.8.4",
89
+ "nuxt-i18n-micro": "^3.20.1",
90
+ "nuxtseo-layer-devtools": "^5.3.1",
91
+ "semver": "^7.8.5",
92
92
  "sirv": "^3.0.2",
93
93
  "std-env": "^4.1.0",
94
94
  "typescript": "^6.0.3",
95
95
  "unbuild": "^3.6.1",
96
- "vitest": "^4.1.8",
97
- "vue-tsc": "^3.3.4",
96
+ "vitest": "^4.1.9",
97
+ "vue-tsc": "^3.3.5",
98
98
  "zod": "^4.4.3",
99
- "@nuxtjs/sitemap": "8.2.1"
99
+ "@nuxtjs/sitemap": "8.2.2"
100
100
  },
101
101
  "scripts": {
102
102
  "lint": "eslint .",