@warlock.js/sitemap 5.30.0 → 5.31.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to `@warlock.js/sitemap` are documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
6
6
 
7
+ ## 5.31.0 - 2026-10-18
8
+
9
+ ### Changed
10
+
11
+ - Lockstep release; package APIs are unchanged.
12
+
7
13
  ## 5.30.0 - 2026-10-16
8
14
 
9
15
  ### Changed
@@ -81,6 +87,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
81
87
  ### Changed
82
88
 
83
89
  - Lockstep release maintenance and dependency refresh.
90
+
84
91
  ## 5.20.0 - 2026-09-24
85
92
 
86
93
  ### Added
package/README.md CHANGED
@@ -48,12 +48,12 @@ in five minutes.
48
48
 
49
49
  ### `new Sitemap(options)`
50
50
 
51
- | Option | Meaning |
52
- | --- | --- |
53
- | `baseUrl` | **Required.** Absolute origin, e.g. `https://example.com` or `https://example.com/docs`. |
54
- | `changefreq` | Applied to any entry that does not set its own. |
55
- | `priority` | Same. |
56
- | `lastmod` | Same. |
51
+ | Option | Meaning |
52
+ | ------------ | ---------------------------------------------------------------------------------------- |
53
+ | `baseUrl` | **Required.** Absolute origin, e.g. `https://example.com` or `https://example.com/docs`. |
54
+ | `changefreq` | Applied to any entry that does not set its own. |
55
+ | `priority` | Same. |
56
+ | `lastmod` | Same. |
57
57
 
58
58
  `baseUrl` is validated **in the constructor**. A `Sitemap` that cannot produce
59
59
  a valid URL should not exist, and you should learn about a typo at the line
@@ -65,15 +65,15 @@ absolute `http(s)` URL throws `InvalidBaseUrlError`.
65
65
  Only `path` is required, and it must be a **concrete path** — `/posts/123`, not
66
66
  `/posts/:id`. A pattern is not a URL.
67
67
 
68
- | Field | Meaning |
69
- | --- | --- |
70
- | `path` | **Required.** Resolved against `baseUrl`. An absolute URL is used as given. |
71
- | `name` | Optional label for the route, for your own diagnostics. |
72
- | `route` | Optional pattern this URL came from, e.g. `/posts/:id`. |
73
- | `lastmod` | `Date` (serialised as W3C datetime) or a string (passed through untouched). |
74
- | `changefreq` | One of the seven protocol values. |
75
- | `priority` | `0.0`–`1.0`. Anything else throws. |
76
- | `alternates` | Language versions of this page — see below. |
68
+ | Field | Meaning |
69
+ | ------------ | --------------------------------------------------------------------------- |
70
+ | `path` | **Required.** Resolved against `baseUrl`. An absolute URL is used as given. |
71
+ | `name` | Optional label for the route, for your own diagnostics. |
72
+ | `route` | Optional pattern this URL came from, e.g. `/posts/:id`. |
73
+ | `lastmod` | `Date` (serialised as W3C datetime) or a string (passed through untouched). |
74
+ | `changefreq` | One of the seven protocol values. |
75
+ | `priority` | `0.0`–`1.0`. Anything else throws. |
76
+ | `alternates` | Language versions of this page — see below. |
77
77
 
78
78
  Both return `this`, so they chain.
79
79
 
@@ -214,10 +214,10 @@ writes to. `Sitemap.publishTo(outDir)` follows the same rule.
214
214
 
215
215
  ## Errors
216
216
 
217
- | Error | When |
218
- | --- | --- |
219
- | `InvalidBaseUrlError` | `baseUrl` is missing, relative, or not `http(s)`. Thrown from the constructor. |
220
- | `InvalidSitemapEntryError` | An entry the protocol cannot represent: no path, a priority outside `0.0`–`1.0`, an unknown `changefreq`, an invalid `Date`, an alternate with no `hreflang`. |
217
+ | Error | When |
218
+ | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
219
+ | `InvalidBaseUrlError` | `baseUrl` is missing, relative, or not `http(s)`. Thrown from the constructor. |
220
+ | `InvalidSitemapEntryError` | An entry the protocol cannot represent: no path, a priority outside `0.0`–`1.0`, an unknown `changefreq`, an invalid `Date`, an alternate with no `hreflang`. |
221
221
  | `UnownedOutputDirectoryError` | `SitemapIndex.saveTo(outDir)` or `Sitemap.publishTo(outDir)`: `outDir` is a non-empty directory with no `.sitemap-set.json` marker from a previous publish, so it is refused rather than swapped or deleted. |
222
222
 
223
223
  ## Also exported
package/llms-full.txt CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  ---
10
10
  name: sitemap-overview
11
- description: 'Front-door orientation for `@warlock.js/sitemap`: framework-blind `Sitemap` and streaming `SitemapIndex` builders, URL metadata, hreflang, Google image entries, sharding, diagnostics, and atomic publication. Use when adding or debugging sitemap output; Warlock page discovery and `/sitemap.xml` routing belong to `@warlock.js/web`.'
11
+ description: "Front-door orientation for `@warlock.js/sitemap`: framework-blind `Sitemap` and streaming `SitemapIndex` builders, URL metadata, hreflang, Google image entries, sharding, diagnostics, and atomic publication. Use when adding or debugging sitemap output; Warlock page discovery and `/sitemap.xml` routing belong to `@warlock.js/web`."
12
12
  ---
13
13
 
14
14
  # `@warlock.js/sitemap` — overview
@@ -74,16 +74,16 @@ boot refusal entirely: the origin is an argument now, so it cannot be missing.
74
74
  Only `path` is required, and it must be a **concrete path** — `/posts/123`,
75
75
  never `/posts/:id`. A pattern is not a URL.
76
76
 
77
- | Field | Meaning |
78
- | --- | --- |
79
- | `path` | Required. Resolved against `baseUrl`; an absolute URL is used as given. |
80
- | `name` | Optional route label, for your own diagnostics. Never serialised. |
81
- | `route` | Optional pattern this URL came from. Feeds `routes()` and `duplicates()`. |
82
- | `lastmod` | `Date` → W3C datetime. A string is passed through UNTOUCHED, never re-parsed. |
83
- | `changefreq` | One of the seven protocol values; anything else throws. |
84
- | `priority` | `0.0`–`1.0`; anything else throws. |
85
- | `alternates` | `{ hreflang, path }[]` — language versions of this page. |
86
- | `images` | `{ loc }[]` — absolute HTTP(S) image URLs, including verified external CDNs. |
77
+ | Field | Meaning |
78
+ | ------------ | ----------------------------------------------------------------------------- |
79
+ | `path` | Required. Resolved against `baseUrl`; an absolute URL is used as given. |
80
+ | `name` | Optional route label, for your own diagnostics. Never serialised. |
81
+ | `route` | Optional pattern this URL came from. Feeds `routes()` and `duplicates()`. |
82
+ | `lastmod` | `Date` → W3C datetime. A string is passed through UNTOUCHED, never re-parsed. |
83
+ | `changefreq` | One of the seven protocol values; anything else throws. |
84
+ | `priority` | `0.0`–`1.0`; anything else throws. |
85
+ | `alternates` | `{ hreflang, path }[]` — language versions of this page. |
86
+ | `images` | `{ loc }[]` — absolute HTTP(S) image URLs, including verified external CDNs. |
87
87
 
88
88
  Invalid entries throw `InvalidSitemapEntryError` from `add()`. Paths are
89
89
  normalised to carry a leading slash, so `a` and `/a` are ONE entry.
@@ -197,10 +197,10 @@ empty, or already carries that marker. A non-empty, unmarked `outDir` gets
197
197
 
198
198
  ## Errors
199
199
 
200
- | Error | When |
201
- | --- | --- |
202
- | `InvalidBaseUrlError` | `baseUrl` missing, relative, or not `http(s)`. From the constructor. |
203
- | `InvalidSitemapEntryError` | No path, priority outside `0.0`–`1.0`, unknown `changefreq`, invalid `Date`, alternate with no `hreflang`. From `add()`. |
200
+ | Error | When |
201
+ | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
202
+ | `InvalidBaseUrlError` | `baseUrl` missing, relative, or not `http(s)`. From the constructor. |
203
+ | `InvalidSitemapEntryError` | No path, priority outside `0.0`–`1.0`, unknown `changefreq`, invalid `Date`, alternate with no `hreflang`. From `add()`. |
204
204
  | `UnownedOutputDirectoryError` | `SitemapIndex.saveTo(outDir)`: `outDir` is non-empty with no `.sitemap-set.json` marker. From `saveTo()`, before anything is written. |
205
205
 
206
206
  ## Also exported
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "url": "git+https://github.com/warlockjs/framework.git",
10
10
  "directory": "packages/sitemap"
11
11
  },
12
- "version": "5.30.0",
12
+ "version": "5.31.0",
13
13
  "main": "./cjs/index.cjs",
14
14
  "module": "./esm/index.mjs",
15
15
  "types": "./esm/index.d.mts",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: sitemap-overview
3
- description: 'Front-door orientation for `@warlock.js/sitemap`: framework-blind `Sitemap` and streaming `SitemapIndex` builders, URL metadata, hreflang, Google image entries, sharding, diagnostics, and atomic publication. Use when adding or debugging sitemap output; Warlock page discovery and `/sitemap.xml` routing belong to `@warlock.js/web`.'
3
+ description: "Front-door orientation for `@warlock.js/sitemap`: framework-blind `Sitemap` and streaming `SitemapIndex` builders, URL metadata, hreflang, Google image entries, sharding, diagnostics, and atomic publication. Use when adding or debugging sitemap output; Warlock page discovery and `/sitemap.xml` routing belong to `@warlock.js/web`."
4
4
  ---
5
5
 
6
6
  # `@warlock.js/sitemap` — overview
@@ -66,16 +66,16 @@ boot refusal entirely: the origin is an argument now, so it cannot be missing.
66
66
  Only `path` is required, and it must be a **concrete path** — `/posts/123`,
67
67
  never `/posts/:id`. A pattern is not a URL.
68
68
 
69
- | Field | Meaning |
70
- | --- | --- |
71
- | `path` | Required. Resolved against `baseUrl`; an absolute URL is used as given. |
72
- | `name` | Optional route label, for your own diagnostics. Never serialised. |
73
- | `route` | Optional pattern this URL came from. Feeds `routes()` and `duplicates()`. |
74
- | `lastmod` | `Date` → W3C datetime. A string is passed through UNTOUCHED, never re-parsed. |
75
- | `changefreq` | One of the seven protocol values; anything else throws. |
76
- | `priority` | `0.0`–`1.0`; anything else throws. |
77
- | `alternates` | `{ hreflang, path }[]` — language versions of this page. |
78
- | `images` | `{ loc }[]` — absolute HTTP(S) image URLs, including verified external CDNs. |
69
+ | Field | Meaning |
70
+ | ------------ | ----------------------------------------------------------------------------- |
71
+ | `path` | Required. Resolved against `baseUrl`; an absolute URL is used as given. |
72
+ | `name` | Optional route label, for your own diagnostics. Never serialised. |
73
+ | `route` | Optional pattern this URL came from. Feeds `routes()` and `duplicates()`. |
74
+ | `lastmod` | `Date` → W3C datetime. A string is passed through UNTOUCHED, never re-parsed. |
75
+ | `changefreq` | One of the seven protocol values; anything else throws. |
76
+ | `priority` | `0.0`–`1.0`; anything else throws. |
77
+ | `alternates` | `{ hreflang, path }[]` — language versions of this page. |
78
+ | `images` | `{ loc }[]` — absolute HTTP(S) image URLs, including verified external CDNs. |
79
79
 
80
80
  Invalid entries throw `InvalidSitemapEntryError` from `add()`. Paths are
81
81
  normalised to carry a leading slash, so `a` and `/a` are ONE entry.
@@ -189,10 +189,10 @@ empty, or already carries that marker. A non-empty, unmarked `outDir` gets
189
189
 
190
190
  ## Errors
191
191
 
192
- | Error | When |
193
- | --- | --- |
194
- | `InvalidBaseUrlError` | `baseUrl` missing, relative, or not `http(s)`. From the constructor. |
195
- | `InvalidSitemapEntryError` | No path, priority outside `0.0`–`1.0`, unknown `changefreq`, invalid `Date`, alternate with no `hreflang`. From `add()`. |
192
+ | Error | When |
193
+ | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
194
+ | `InvalidBaseUrlError` | `baseUrl` missing, relative, or not `http(s)`. From the constructor. |
195
+ | `InvalidSitemapEntryError` | No path, priority outside `0.0`–`1.0`, unknown `changefreq`, invalid `Date`, alternate with no `hreflang`. From `add()`. |
196
196
  | `UnownedOutputDirectoryError` | `SitemapIndex.saveTo(outDir)`: `outDir` is non-empty with no `.sitemap-set.json` marker. From `saveTo()`, before anything is written. |
197
197
 
198
198
  ## Also exported