Pin leaflet.heat to 0.2.0 so the map loads again (#188)

leaflet.heat 1.0.0 was published to npm on 2026-11-03 and is ESM-only
(it starts with `import * as e from "leaflet"`). The pages loaded it
unversioned from unpkg as a classic <script>, so unpkg started serving
1.0.0. That throws "Cannot use import statement outside a module", which
leaves L.heatLayer undefined. map-view.html calls L.heatLayer at the top
level before the map gets a view, so the live map is a blank grey box,
and the heatmap page fails to load nodes.

Pin 0.2.0, the release these pages were written against, and add an
SRI hash so a future upstream change can't break or alter the pages.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mike BennerandClaude Opus 5.5 authored and GitHub committed 2026-11-04 09:59:21 -08:00
1 parent 194658d303
commit a8eb147065
3 files changed
+9 -3

No files matched your search

+3 -1
View File
@@ -104,7 +104,9 @@ body { background:var(--mesh-page); color:var(--mesh-text); }
<div id="legend"></div>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script src="https://unpkg.com/leaflet.heat/dist/leaflet-heat.js"></script>
<script src="https://unpkg.com/leaflet.heat@0.2.0/dist/leaflet-heat.js"
integrity="sha384-mFKkGiGvT5vo1fEyGCD3hshDdKmW3wzXW/x+fWriYJArD0R3gawT6lMvLboM22c0"
crossorigin="anonymous"></script>
<script>
const map = L.map("map");
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
+3 -1
View File
@@ -298,7 +298,9 @@ a.mesh-inspector-packet:hover { background:var(--mesh-soft); }
<script src="https://unpkg.com/leaflet-polylinedecorator@1.6.0/dist/leaflet.polylinedecorator.js"
integrity="sha384-FhPn/2P/fJGhQLeNWDn9B/2Gml2bPOrKJwFqJXgR3xOPYxWg5mYQ5XZdhUSugZT0"
crossorigin></script>
<script src="https://unpkg.com/leaflet.heat/dist/leaflet-heat.js"></script>
<script src="https://unpkg.com/leaflet.heat@0.2.0/dist/leaflet-heat.js"
integrity="sha384-mFKkGiGvT5vo1fEyGCD3hshDdKmW3wzXW/x+fWriYJArD0R3gawT6lMvLboM22c0"
crossorigin="anonymous"></script>
<script src="/static/portmaps.js"></script>
<script>
+3 -1
View File
@@ -242,7 +242,9 @@
<script src="https://cdn.jsdelivr.net/npm/echarts@5.5.0/dist/echarts.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<script src="https://unpkg.com/leaflet.heat/dist/leaflet-heat.js"></script>
<script src="https://unpkg.com/leaflet.heat@0.2.0/dist/leaflet-heat.js"
integrity="sha384-mFKkGiGvT5vo1fEyGCD3hshDdKmW3wzXW/x+fWriYJArD0R3gawT6lMvLboM22c0"
crossorigin="anonymous"></script>
<script src="/static/portmaps.js"></script>
<script>