@sarimarcus/content-sites-core 0.9.0 → 0.10.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
@@ -2,6 +2,14 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.10.0 (2026-09-30)
6
+
7
+ - No changes; lockstep release with ui (SLA-2732).
8
+
9
+ ## 0.9.1 (2026-09-30)
10
+
11
+ - `defineSiteConfig`: a date-only sitemap `lastmod` equal to the build day is now stamped at 00:00 UTC instead of the build instant, so every build that day emits the same sitemap and no lastmod is in the future; other dates keep noon UTC (SLA-2747, D10).
12
+
5
13
  ## 0.9.0 (2026-09-30)
6
14
 
7
15
  - `./config`: `defineSiteConfig` (the shared Astro config: static skeleton, image service, Vite settings, outbound-rel → sitemap → Pagefind; lastmod map from content, guide dirs, `itemKeys`, `extraKeys`; sitemap `exclude` and `rules`; optional `redirects` and `ssrNoExternal`; `pagefind` injected), `buildLastmodMap`, `sitemapSerialize`, `outboundLinkRel({ root })`, and the guide scanners `latestGuideDate`, `guideDateMap`, `guidePublishDates` with one `dateModified` regex. Peer-depends on `@astrojs/sitemap` and `@tailwindcss/vite` (SLA-2747).
@@ -6,16 +6,15 @@ import sitemap, {} from '@astrojs/sitemap';
6
6
  import { outboundLinkRel } from "./outboundLinkRel.js";
7
7
  import { guideDateMap } from "./guideDates.js";
8
8
  import { EPOCH } from "../dates/lastmod.js";
9
- // A missing date, or a date-only value equal to today, is stamped with the build instant.
9
+ // A date-only value is stamped at noon UTC, except today's at midnight: never in the future, and the same on every
10
+ // build that day. Only a missing date takes the build instant (the lookup always ends at a date).
10
11
  function toDateWithTime(dateStr) {
11
12
  if (!dateStr)
12
13
  return new Date().toISOString();
13
14
  if (dateStr.includes('T'))
14
15
  return new Date(dateStr).toISOString();
15
16
  const today = new Date().toISOString().split('T')[0];
16
- if (dateStr === today)
17
- return new Date().toISOString();
18
- return new Date(`${dateStr}T12:00:00Z`).toISOString();
17
+ return new Date(`${dateStr}T${dateStr === today ? '00:00:00' : '12:00:00'}Z`).toISOString();
19
18
  }
20
19
  /** Lookup key → date for the sitemap, plus the latest date overall (the fallback). */
21
20
  export function buildLastmodMap(rootDir, opts) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-core",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Non-visual utilities, Astro config builders and SEO schema assembly shared by the content sites.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -47,13 +47,13 @@ export interface SiteConfigOptions {
47
47
  language?: string;
48
48
  }
49
49
 
50
- // A missing date, or a date-only value equal to today, is stamped with the build instant.
50
+ // A date-only value is stamped at noon UTC, except today's at midnight: never in the future, and the same on every
51
+ // build that day. Only a missing date takes the build instant (the lookup always ends at a date).
51
52
  function toDateWithTime(dateStr: string | undefined): string {
52
53
  if (!dateStr) return new Date().toISOString();
53
54
  if (dateStr.includes('T')) return new Date(dateStr).toISOString();
54
55
  const today = new Date().toISOString().split('T')[0];
55
- if (dateStr === today) return new Date().toISOString();
56
- return new Date(`${dateStr}T12:00:00Z`).toISOString();
56
+ return new Date(`${dateStr}T${dateStr === today ? '00:00:00' : '12:00:00'}Z`).toISOString();
57
57
  }
58
58
 
59
59
  /** Lookup key → date for the sitemap, plus the latest date overall (the fallback). */