@piercebarney/whs-eleventy 2026.9.30 → 2026.10.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.
package/lib/compliance.js CHANGED
@@ -18,7 +18,7 @@ const path = require("node:path");
18
18
  const { execSync } = require("node:child_process");
19
19
  const { parse: parseHtml } = require("node-html-parser");
20
20
  const { runRepoChecks } = require("./doctor.js");
21
- const { ROOT, resolveStandard } = require("./_project.js");
21
+ const { ROOT, resolveStandard, tryProjectRequire } = require("./_project.js");
22
22
 
23
23
  const SITE = path.join(ROOT, "_site");
24
24
  const CACHE = path.join(ROOT, ".cache", "compliance.json");
@@ -467,11 +467,36 @@ const CHECKS = {
467
467
  // The privacy page may be a standalone src/privacy.njk or a pages.json
468
468
  // entry rendered by a src/pages/ shell — check the built output, with a
469
469
  // source fallback for when _site isn't built yet.
470
- const built = has("_site/privacy/index.html") || has("_site/privacy.html");
470
+ const builtPath = has("_site/privacy/index.html")
471
+ ? "_site/privacy/index.html"
472
+ : has("_site/privacy.html")
473
+ ? "_site/privacy.html"
474
+ : null;
471
475
  const source =
472
476
  has("src/privacy.njk") ||
473
477
  /["']slug["']\s*:\s*["']privacy["']/.test(read("src/content/pages.json") || "");
474
- if (!built && !source) return { status: FAIL, note: "no privacy page" };
478
+ if (!builtPath && !source) return { status: FAIL, note: "no privacy page" };
479
+
480
+ // Prefer checking the built page's own rendered HTML for every declared
481
+ // third party's name — what a user actually sees, independent of which
482
+ // source file or templating approach produced it. Falls back to the
483
+ // source-level pattern only when there's no built output yet, or
484
+ // nothing declared to check against.
485
+ if (builtPath) {
486
+ const thirdparties = tryProjectRequire("src/_data/thirdparties.js", null);
487
+ if (Array.isArray(thirdparties) && thirdparties.length) {
488
+ const html = read(builtPath) || "";
489
+ const missing = thirdparties
490
+ .filter((t) => t?.name && !html.includes(t.name))
491
+ .map((t) => t.name);
492
+ return missing.length
493
+ ? { status: FAIL, note: `privacy page missing disclosure for: ${missing.join(", ")}` }
494
+ : {
495
+ status: PASS,
496
+ note: "privacy page present; built output discloses every declared third party",
497
+ };
498
+ }
499
+ }
475
500
  // The third-party disclosure must be generated from _data/thirdparties.js,
476
501
  // never hand-maintained — the loop lives in the privacy shell or an include.
477
502
  if (!hasThirdPartyLoop())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piercebarney/whs-eleventy",
3
- "version": "2026.9.30",
3
+ "version": "2026.10.1",
4
4
  "description": "The web house style's Eleventy + Netlify tooling — the compliance sweep, the infra doctor, the link/CSP integrity check, and the a11y scan, shared by every project on the stack.",
5
5
  "bin": {
6
6
  "whs": "cli.js"
@@ -21,6 +21,33 @@ enforced, new *opt-in* chapters/capabilities, tooling-only changes — is
21
21
 
22
22
  ---
23
23
 
24
+ ## 2026-10-01 [non-breaking]
25
+
26
+ ### packages/whs-eleventy
27
+
28
+ Supersedes yesterday's (2026-09-30) `hasThirdPartyLoop()` widening, which was
29
+ correct but unreachable: the standard's own reference `audit.njk` template
30
+ independently contains a matching loop pattern for its unrelated Content &
31
+ Links tab, so `privacy`'s broad source scan always found that coincidental
32
+ match first, before the new fallback logic could ever run — this affected
33
+ every project descended from the template, not just the one that reported
34
+ it. `privacy` in `lib/compliance.js` now checks the built privacy page's own
35
+ rendered HTML for every third party declared in `src/_data/thirdparties.js`,
36
+ by name — what a user actually sees, independent of which source file or
37
+ templating syntax produced it — falling back to yesterday's source-pattern
38
+ mechanism (unchanged, still present) only when there's no built output yet
39
+ or nothing is declared to check against. Confirmed against the reference
40
+ template itself: `privacy` still PASSes, now for the correct reason (built
41
+ output discloses every declared party) instead of the coincidental
42
+ `audit.njk` match. Resolves
43
+ `feedback/2026-09-23-privacy-thirdparty-check-scans-wrong-file.md` (the
44
+ original report) and
45
+ `feedback/2026-09-24-privacy-thirdparty-fix-still-short-circuits-on-audit-loop.md`
46
+ (the follow-up that diagnosed why the 2026-09-30 fix didn't work). Fixed in
47
+ `56f5c67`.
48
+
49
+ ---
50
+
24
51
  ## 2026-09-30 [non-breaking]
25
52
 
26
53
  ### packages/whs-eleventy
package/standard/core.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Web project house style — CORE (stack-agnostic)
2
2
 
3
- **Version:** 2026-09-30 · **Status:** active
3
+ **Version:** 2026-10-01 · **Status:** active
4
4
 
5
5
  This is the stack-agnostic contract every web project follows, regardless of
6
6
  framework, host, or CSS system. It says **what** must be true, with concrete
@@ -1467,7 +1467,7 @@ governs it and follow that chapter — the slugs are the index (a `<script>` →
1467
1467
  - production-url: https://example.com
1468
1468
  - content-type: tool # tool | article (article => feeds)
1469
1469
  - publishing-rate: ~5 pages/week
1470
- - standard-version: 2026-09-30 # recommended — enables standard-version drift tracking (#compliance)
1470
+ - standard-version: 2026-10-01 # recommended — enables standard-version drift tracking (#compliance)
1471
1471
  ```
1472
1472
 
1473
1473
  If the section is absent, the assistant's first action is to run the flow above