@piercebarney/whs-eleventy 2026.10.1 → 2026.10.3
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 +13 -5
- package/package.json +1 -1
- package/standard/CHANGELOG.md +40 -0
- package/standard/core.md +2 -2
package/lib/compliance.js
CHANGED
|
@@ -241,14 +241,22 @@ const CHECKS = {
|
|
|
241
241
|
},
|
|
242
242
|
|
|
243
243
|
"client-logic": () => {
|
|
244
|
-
|
|
245
|
-
const re =
|
|
244
|
+
const scriptRe =
|
|
246
245
|
/<script(?![^>]*\ssrc=)(?![^>]*type=["'](?:application\/ld\+json|application\/json)["'])[^>]*>[\s\S]*?\S[\s\S]*?<\/script>/i;
|
|
247
|
-
const
|
|
248
|
-
|
|
246
|
+
const bad = [];
|
|
247
|
+
for (const f of siteHtml()) {
|
|
248
|
+
const html = fs.readFileSync(f, "utf8");
|
|
249
|
+
const inlineScript = scriptRe.test(html);
|
|
250
|
+
const inlineHandler = parseHtml(html)
|
|
251
|
+
.querySelectorAll("*")
|
|
252
|
+
.some((el) => Object.keys(el.attributes).some((a) => /^on/i.test(a)));
|
|
253
|
+
if (inlineScript || inlineHandler) bad.push(f);
|
|
254
|
+
}
|
|
255
|
+
if (bad.length)
|
|
256
|
+
return { status: FAIL, note: `inline <script> or on*= handler in ${bad.length} page(s)` };
|
|
249
257
|
return {
|
|
250
258
|
status: PASS,
|
|
251
|
-
note: "loaded modules; calc wiring in a typeof-document block; no inline script",
|
|
259
|
+
note: "loaded modules; calc wiring in a typeof-document block; no inline script or handler",
|
|
252
260
|
};
|
|
253
261
|
},
|
|
254
262
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@piercebarney/whs-eleventy",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.3",
|
|
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"
|
package/standard/CHANGELOG.md
CHANGED
|
@@ -21,6 +21,46 @@ enforced, new *opt-in* chapters/capabilities, tooling-only changes — is
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
+
## 2026-10-03 [non-breaking]
|
|
25
|
+
|
|
26
|
+
### packages/whs-eleventy
|
|
27
|
+
|
|
28
|
+
`client-logic`'s CSP `script-src 'self'` check in `lib/compliance.js` only
|
|
29
|
+
looked for inline `<script>` tags, missing inline `onclick=`/`onsubmit=`-style
|
|
30
|
+
event-handler attributes — an equally real violation of the same policy that
|
|
31
|
+
`check-links.js` (a separate mechanism, using real HTML attribute parsing)
|
|
32
|
+
already caught correctly. A real project's compliance sweep showed PASS while
|
|
33
|
+
`npm run check`'s links stage still failed on 109 handler findings — the sweep
|
|
34
|
+
and the links stage disagreed about the same constraint. `client-logic` now
|
|
35
|
+
uses the same attribute-parsing approach `check-links.js` already uses, so
|
|
36
|
+
both mechanisms agree. Confirmed no regression on the reference template:
|
|
37
|
+
zero inline handlers anywhere in its built output, both before and after the
|
|
38
|
+
fix, independently verified twice. No `feedback/` file — found directly in
|
|
39
|
+
this conversation. Fixed in `cfb79e1`.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 2026-10-02 [non-breaking]
|
|
44
|
+
|
|
45
|
+
### templates/commands
|
|
46
|
+
|
|
47
|
+
`/whs:adopt` never created or seeded `src/_data/dashboard.js` — the
|
|
48
|
+
committed one-time-setup checklist `whs status --hook`'s `SessionStart`
|
|
49
|
+
nudge reads (GitHub secrets, `netlify link`, Search Console, Bing, HTTPS).
|
|
50
|
+
Because the file never existed for an adopted project, `pendingDashboardCount()`
|
|
51
|
+
silently returned `0` — the exact mechanism that let this go unnoticed,
|
|
52
|
+
since the reminder looked satisfied rather than obviously broken. Step 5's
|
|
53
|
+
Eleventy branch now seeds the same seven items `bin/init`'s `seedDashboard()`
|
|
54
|
+
produces for a freshly-scaffolded project, byte-identical, prepending the
|
|
55
|
+
two setup-specific items ahead of the five observability items the template
|
|
56
|
+
ships; a conflict guard leaves an existing `dashboard.js` untouched. Third
|
|
57
|
+
`/whs:adopt`-vs-`/whs:new` parity gap found this week, after agent-delegation
|
|
58
|
+
setup and, separately, the still-open build/serve scripts gap. Found directly
|
|
59
|
+
in an adopting session's report — no `feedback/` file exists for this one.
|
|
60
|
+
Fixed in `a4c7ba6`.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
24
64
|
## 2026-10-01 [non-breaking]
|
|
25
65
|
|
|
26
66
|
### 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-10-
|
|
3
|
+
**Version:** 2026-10-03 · **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-10-
|
|
1470
|
+
- standard-version: 2026-10-03 # 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
|