pandorga 1.6.5 → 1.6.6
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +3 -2
- data/_includes/content-runtime/00-config.html +1 -1
- data/_includes/theme/font-loader.html +13 -2
- data/_layouts/shell.html +14 -6
- data/lib/pandorga/version.rb +1 -1
- data/scripts/lighthouse-home.sh +23 -4
- data/scripts/test/test-lighthouse-policy.rb +21 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea34cfd7c17d2af28fcbd6a14c791f47b62fcf3a0c1c27b453f2467e6e4e101e
|
|
4
|
+
data.tar.gz: 7935fd040c610ffd52cab6587ecbcf31368a6097e21010f41b36ea92df013332
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03e056b64de07a581a1b6293dd8a4db3aa40872219f170adfeaf25efe948317a62c04444db0cfe36cf67d8138ed003f9f832fc5c1150a0d84d174abc48232cdc
|
|
7
|
+
data.tar.gz: cd7dec364ba9a21e18c0ec05e60bd7eed94ca99a217b99a5cd2a67498c9778e51a78267ba4cad58bab5098020e7c75f8be2e8a5df3b84b4d23c37b07313ed16f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.6.6] — 2026-10-10
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- The text faces and the flag stylesheet are requested after the load
|
|
8
|
+
event. A head link let a fast connection finish them before the largest
|
|
9
|
+
paint, and the simulator then counted those files as part of that paint.
|
|
10
|
+
The same templates scored 87 on the release run and 97 on the pull
|
|
11
|
+
request. `font-display: swap` stays.
|
|
12
|
+
- The markdown library loads with `defer`. The example home is already
|
|
13
|
+
HTML, so that script does not block the parser.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- A release below 90 does not publish. A bug-fix release whose notes
|
|
18
|
+
include `LIGHTHOUSE_BUGFIX=1` may still publish from 75 to 89.
|
|
19
|
+
|
|
20
|
+
No `pandorga:` config keys were added or renamed.
|
|
21
|
+
|
|
3
22
|
## [1.6.5] — 2026-10-10
|
|
4
23
|
|
|
5
24
|
### Fixed
|
data/README.md
CHANGED
|
@@ -84,8 +84,9 @@ Lighthouse mobile thresholds apply to releases. A stable release scores
|
|
|
84
84
|
and an urgent performance campaign must then bring it back to 90 or above.
|
|
85
85
|
Below 75 is never acceptable for a release. A pull request or a merge may
|
|
86
86
|
score lower when that is unavoidable to keep the work modular. The release
|
|
87
|
-
build
|
|
88
|
-
|
|
87
|
+
build publishes at 90 or above. Notes that include `LIGHTHOUSE_BUGFIX=1`
|
|
88
|
+
may publish a bug fix from 75 to 89. Pull requests and merges only warn.
|
|
89
|
+
The checklist is in [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
89
90
|
|
|
90
91
|
## License
|
|
91
92
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script src="https://cdn.jsdelivr.net/npm/marked@15.0.7/marked.min.js"></script>
|
|
1
|
+
<script defer src="https://cdn.jsdelivr.net/npm/marked@15.0.7/marked.min.js"></script>
|
|
2
2
|
<script>
|
|
3
3
|
window.ContentRuntimeConfig = {
|
|
4
4
|
contentBase: '{{ site.content_api_base_url | default: "" }}',
|
|
@@ -51,6 +51,17 @@
|
|
|
51
51
|
{% endunless %}
|
|
52
52
|
{% endif %}
|
|
53
53
|
{% assign fonts_href = fonts_href | append: "&display=swap" %}
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
{% comment %}
|
|
55
|
+
Not a head link. A preload or a print sheet is discovered immediately.
|
|
56
|
+
On a fast connection the faces finish before the largest paint, and the
|
|
57
|
+
simulator then waits on them. Add the sheet after load. display=swap stays.
|
|
58
|
+
{% endcomment %}
|
|
59
|
+
<script>
|
|
60
|
+
window.addEventListener('load', function () {
|
|
61
|
+
var link = document.createElement('link');
|
|
62
|
+
link.rel = 'stylesheet';
|
|
63
|
+
link.href = {{ fonts_href | jsonify }};
|
|
64
|
+
document.head.appendChild(link);
|
|
65
|
+
});
|
|
66
|
+
</script>
|
|
56
67
|
<noscript><link rel="stylesheet" href="{{ fonts_href }}" /></noscript>
|
data/_layouts/shell.html
CHANGED
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
<!-- Canonical URL -->
|
|
60
60
|
<link rel="canonical" href="{{ canonical_path | absolute_url }}" />
|
|
61
61
|
{%- comment -%}
|
|
62
|
-
Preconnect only.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
Preconnect only. The preload script below is parser-blocking. A
|
|
63
|
+
stylesheet before that script holds the parser until the font host
|
|
64
|
+
answers, so the ledger sheets and the hero cannot paint. The text-face
|
|
65
|
+
loader sits with the local sheets and adds its stylesheet after load.
|
|
66
66
|
{%- endcomment -%}
|
|
67
67
|
<link href="https://fonts.googleapis.com" rel="preconnect" />
|
|
68
68
|
<link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect" />
|
|
@@ -131,8 +131,16 @@
|
|
|
131
131
|
});
|
|
132
132
|
</script>
|
|
133
133
|
<noscript><link rel="stylesheet" href="{{ _symbols_href }}" /></noscript>
|
|
134
|
-
|
|
135
|
-
<
|
|
134
|
+
{%- assign _flags_href = "https://cdn.jsdelivr.net/gh/lipis/flag-icons@7.2.3/css/flag-icons.min.css" -%}
|
|
135
|
+
<script>
|
|
136
|
+
window.addEventListener('load', function () {
|
|
137
|
+
var link = document.createElement('link');
|
|
138
|
+
link.rel = 'stylesheet';
|
|
139
|
+
link.href = {{ _flags_href | jsonify }};
|
|
140
|
+
document.head.appendChild(link);
|
|
141
|
+
});
|
|
142
|
+
</script>
|
|
143
|
+
<noscript><link rel="stylesheet" href="{{ _flags_href }}" /></noscript>
|
|
136
144
|
<style>
|
|
137
145
|
:root { --drop-cap-lines: {{ site.drop_cap_lines | default: 2 }}; }
|
|
138
146
|
</style>
|
data/lib/pandorga/version.rb
CHANGED
data/scripts/lighthouse-home.sh
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# One Lighthouse mobile run against the built example home.
|
|
3
|
-
# Thresholds apply to releases. LIGHTHOUSE_MODE=enforce
|
|
4
|
-
#
|
|
3
|
+
# Thresholds apply to releases. LIGHTHOUSE_MODE=enforce does not publish
|
|
4
|
+
# below 90 unless LIGHTHOUSE_BUGFIX=1, and that bug-fix release still
|
|
5
|
+
# fails below 75. LIGHTHOUSE_MODE=warn never fails the run. PLT-AC-24.
|
|
5
6
|
set -euo pipefail
|
|
6
7
|
|
|
7
8
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
@@ -11,6 +12,7 @@ OUT="${LIGHTHOUSE_REPORT:-/tmp/lighthouse-home.json}"
|
|
|
11
12
|
FAIL_BELOW=75
|
|
12
13
|
WARN_BELOW=90
|
|
13
14
|
MODE="${LIGHTHOUSE_MODE:-enforce}"
|
|
15
|
+
BUGFIX="${LIGHTHOUSE_BUGFIX:-}"
|
|
14
16
|
|
|
15
17
|
fail() {
|
|
16
18
|
echo "ERROR: $1" >&2
|
|
@@ -65,11 +67,11 @@ npx --yes lighthouse@13.5.0 "http://127.0.0.1:${PORT}/" \
|
|
|
65
67
|
--chrome-path="${CHROME}" \
|
|
66
68
|
--chrome-flags="--headless=new --no-sandbox --disable-gpu"
|
|
67
69
|
|
|
68
|
-
python3 - "${OUT}" "${FAIL_BELOW}" "${WARN_BELOW}" "${MODE}" <<'PY'
|
|
70
|
+
python3 - "${OUT}" "${FAIL_BELOW}" "${WARN_BELOW}" "${MODE}" "${BUGFIX}" <<'PY'
|
|
69
71
|
import json
|
|
70
72
|
import sys
|
|
71
73
|
|
|
72
|
-
path, fail_below, warn_below, mode = sys.argv[1:]
|
|
74
|
+
path, fail_below, warn_below, mode, bugfix = sys.argv[1:]
|
|
73
75
|
fail_below = int(fail_below)
|
|
74
76
|
warn_below = int(warn_below)
|
|
75
77
|
report = json.load(open(path, encoding="utf-8"))
|
|
@@ -79,6 +81,16 @@ if raw is None:
|
|
|
79
81
|
sys.exit(1)
|
|
80
82
|
score = int(round(float(raw) * 100))
|
|
81
83
|
print(f"Lighthouse mobile performance: {score} ({mode})")
|
|
84
|
+
audits = report.get("audits", {})
|
|
85
|
+
for key in (
|
|
86
|
+
"first-contentful-paint",
|
|
87
|
+
"largest-contentful-paint",
|
|
88
|
+
"speed-index",
|
|
89
|
+
"total-blocking-time",
|
|
90
|
+
"cumulative-layout-shift",
|
|
91
|
+
):
|
|
92
|
+
display = audits.get(key, {}).get("displayValue", "?")
|
|
93
|
+
print(f" {key}: {display}")
|
|
82
94
|
campaign = (
|
|
83
95
|
"A score from 75 to 89 is acceptable only to ship a bug fix. "
|
|
84
96
|
"An urgent performance campaign must bring it back to 90 or above."
|
|
@@ -86,6 +98,13 @@ campaign = (
|
|
|
86
98
|
if score < fail_below and mode == "enforce":
|
|
87
99
|
print(f"::error::Lighthouse mobile performance {score} is below {fail_below}")
|
|
88
100
|
sys.exit(1)
|
|
101
|
+
if mode == "enforce" and score < warn_below and bugfix != "1":
|
|
102
|
+
print(
|
|
103
|
+
f"::error::Lighthouse mobile performance {score} is below {warn_below}. "
|
|
104
|
+
+ campaign
|
|
105
|
+
+ " This release is not marked LIGHTHOUSE_BUGFIX=1, so it will not publish."
|
|
106
|
+
)
|
|
107
|
+
sys.exit(1)
|
|
89
108
|
if score < fail_below:
|
|
90
109
|
print(
|
|
91
110
|
f"::warning::Lighthouse mobile performance {score} is below {fail_below}. "
|
|
@@ -49,6 +49,11 @@ fail!("lighthouse script lost the fail floor") unless script.include?("FAIL_BELO
|
|
|
49
49
|
fail!("lighthouse script lost the warn floor") unless script.include?("WARN_BELOW=90")
|
|
50
50
|
fail!("lighthouse script lost enforce mode") unless script.include?('LIGHTHOUSE_MODE:-enforce')
|
|
51
51
|
fail!("warn mode still fails the run") unless script.include?('mode == "enforce"')
|
|
52
|
+
fail!("a non-bug-fix release can publish below 90") unless script.include?('bugfix != "1"')
|
|
53
|
+
fail!("release workflow cannot mark a bug fix") unless release.include?("LIGHTHOUSE_BUGFIX")
|
|
54
|
+
fail!("spec still publishes a feature below 90") unless spec.include?("LIGHTHOUSE_BUGFIX=1")
|
|
55
|
+
fail!("contributing still publishes a feature below 90") unless contributing.include?("LIGHTHOUSE_BUGFIX=1")
|
|
56
|
+
fail!("readme still publishes a feature below 90") unless docs.fetch("readme").include?("LIGHTHOUSE_BUGFIX=1")
|
|
52
57
|
fail!("lighthouse script is not a single mobile run") unless script.include?("--form-factor=mobile")
|
|
53
58
|
fail!("lighthouse script repeats runs") if script.include?("--repeat")
|
|
54
59
|
fail!("example server is still one-thread HTTP/1.0") if script.include?("python3 -m http.server")
|
|
@@ -61,6 +66,22 @@ screen = shell.sub(%r{<noscript>.*?</noscript>}m, "")
|
|
|
61
66
|
fail!("Material Symbols sheet is missing") unless shell.include?("Material+Symbols+Outlined")
|
|
62
67
|
fail!("icon sheet is not deferred until load") unless screen.include?("addEventListener('load'")
|
|
63
68
|
fail!("screen still has a Material Symbols stylesheet link") if screen.match?(/<link\b[^>]*Material\+Symbols/)
|
|
69
|
+
fail!("screen still has a flag stylesheet link") if screen.match?(/<link\b[^>]*flag-icons/)
|
|
70
|
+
fail!("flag sheet is not deferred until load") unless screen.include?("flag-icons@7.2.3")
|
|
71
|
+
|
|
72
|
+
fonts = ROOT.join("_includes/theme/font-loader.html").read
|
|
73
|
+
font_screen = fonts.sub(%r{<noscript>.*?</noscript>}m, "")
|
|
74
|
+
fail!("text faces are preloaded") if fonts.include?('rel="preload"')
|
|
75
|
+
fail!("text face sheet is not deferred until load") unless font_screen.include?("addEventListener('load'")
|
|
76
|
+
fail!("screen still has a text-face stylesheet link") if font_screen.match?(/<link\b/)
|
|
77
|
+
|
|
78
|
+
marked = ROOT.join("_includes/content-runtime/00-config.html").read
|
|
79
|
+
fail!("markdown library still blocks parsing") unless marked.include?("<script defer ")
|
|
80
|
+
fail!("markdown library source changed") unless marked.include?("marked@15.0.7/marked.min.js")
|
|
81
|
+
|
|
82
|
+
fail!("spec still discovers text faces from the head") unless spec.include?("text-face stylesheet is not a head link")
|
|
83
|
+
fail!("spec still lets the markdown library block parsing") unless spec.include?("markdown library loads with `defer`")
|
|
84
|
+
fail!("lighthouse script hides the metric breakdown") unless script.include?("largest-contentful-paint")
|
|
64
85
|
|
|
65
86
|
icon = base[/\.material-symbols-outlined\.material-symbols-outlined \{.*?\n\}/m]
|
|
66
87
|
fail!("icon rule missing") unless icon
|