Add Renovate config, track vendored JS libs via package.json
CI / check (push) Successful in 36s
CI / deploy (push) Successful in 13s

The Renovate workflow had no renovate.json, so with onboarding off it
skipped the repo entirely. Now config:recommended plus a regex manager
for the Dockerfile's PMTILES_VERSION/PLANETILER_VERSION pins.

public/vendor/'s npm-published libraries (maplibre-gl, pmtiles,
maplibre-contour, maplibre-gl-lanes, flag-icons, suncalc) are pinned in
package.json; bin/vendor-sync.mjs copies them out of node_modules, and
runs as a Renovate postUpgradeTask so bump PRs carry the new files.
Re-syncing the current versions reproduces the vendored files exactly,
except suncalc's hand-added header, moved into third-party-notices.
This commit is contained in:
randy committed 2026-11-03 17:15:28 +01:00
1 parent 157759d44b
commit f62987b1de
10 files changed
+413 -18

No files matched your search

+35 -12
View File
@@ -11,15 +11,15 @@ BSD-3-Clause licensed.
| Library | Version | Source
| MapLibre GL JS
| 6.6.0
| `package.json`
| https://github.com/maplibre/maplibre-gl-js
| pmtiles (pmtiles.js)
| 4.5.0
| `package.json`
| https://github.com/protomaps/PMTiles
| maplibre-contour (Overlays panel's "Contour lines", `public/js/contour.js`)
| 0.1.0
| `package.json`
| https://github.com/onthegomap/maplibre-contour
|===
@@ -61,7 +61,7 @@ required (`LICENSE` included alongside):
| maplibre-gl-lanes (offline hiking trails, `public/js/hiking_trails.js`
— trails sharing a path drawn as parallel lanes); its `dist/*.mjs`
build, minus the trailing `sourceMappingURL` comment
| 1.3.0
| `package.json`
| https://github.com/c0nsumer/maplibre-gl-lanes
|===
@@ -75,10 +75,24 @@ Lipiridis), attribution required (this notice satisfies that):
| flag-icons (just the square `1x1/` crop, only the 39 European
countries `lib/maptool/data/europe_countries.geojson` lists — see
`public/js/offline_data.js`)
| 7.5.0
| `package.json`
| https://github.com/lipis/flag-icons
|===
Also vendored under `public/vendor/` — BSD-2-Clause (© Vladimir
Agafonkin), `LICENSE` included alongside:
[cols="1,1,2"]
|===
| Library | Version | Source
| SunCalc (`public/js/sun.js`'s sunrise/sunset readout); its `index.js`
copied verbatim as `suncalc.js` — only `getTimes` is used, the moon
exports are left in so it stays a straight copy
| `package.json`
| https://github.com/mourner/suncalc
|===
Offline map text labels need font glyphs too (see
`docs/architecture.adoc`), vendored under `public/vendor/fonts/` —
SIL Open Font License, not BSD-3-Clause like the above:
@@ -153,10 +167,19 @@ terrain.pmtiles regeneration.
| https://github.com/osmcode/osmium-tool
|===
To update a vendored library: download its package (e.g.
`npm pack <name>@<version>`), replace the corresponding files under
`public/vendor/<name>/`, and update the version in this file. To
update go-pmtiles or Planetiler, bump `PMTILES_VERSION`/
`PLANETILER_VERSION` in the `Dockerfile` and the version here —
osmium-tool tracks whatever version Debian trixie currently packages,
nothing to pin on this side.
Versions of the npm-published libraries above (MapLibre GL JS, pmtiles,
maplibre-contour, maplibre-gl-lanes, flag-icons, SunCalc) are pinned in
`package.json` — the only thing it's for, the app itself has no JS
build step. Renovate (`renovate.json`) opens a PR per bump and its
`postUpgradeTasks` run `npm ci` + `node bin/vendor-sync.mjs`, so the PR
already contains the new files under `public/vendor/`. By hand: edit
`package.json`, then `npm install && node bin/vendor-sync.mjs`.
Everything else under `public/vendor/` (NPS plugins, Liberty
style/sprite, fonts) isn't on npm or has no version to track — update
by hand and adjust this file.
go-pmtiles and Planetiler are pinned by `PMTILES_VERSION`/
`PLANETILER_VERSION` in the `Dockerfile`, which Renovate also bumps
(the `# renovate:` comments above them). osmium-tool tracks whatever
version Debian trixie currently packages, nothing to pin on this side.