feat!: adopt mod-utils v6 (mod-leaflet v3)#265
Merged
Conversation
Bump the module's own path to /v3 and require mod-utils v6.0.1 (never v6.0.0, which carries a known camelKey defect). Migrate the sole InitArgs.html call site (layouts/shortcodes/map.html) to the clean Args.html API with strict false, since it is a user-facing shortcode. Update config.toml and exampleSite/hugo.toml module import paths and re-vendor. hugo mod graph (exampleSite context) shows mod-utils/v6 v6.0.1 only, no v5. The exampleSite build exits 0 with zero warnings attributable to the map shortcode. Rendered HTML for the exampleSite's existing map call (real content, not a placeholder) is byte-identical before and after the migration. A visual regression run against the module's own exampleSite (3 pages) reports 0 flagged pages at 0.0000% diff. BREAKING CHANGE: requires github.com/gethinode/mod-leaflet/v3 import path; adopts mod-utils v6 and migrates argument handling to the Args API (see gethinode/mod-utils v5-to-v6 migration notes). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
🎉 This PR is included in version 3.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/v2to/v3and requiregithub.com/gethinode/mod-utils/v6 v6.0.1(never v6.0.0, which carries a known camelKeydefect).
InitArgs.htmlcall site to the cleanArgs.htmlAPI.config.tomlandexampleSite/hugo.tomlmodule import paths and re-vendor.Part of the mod-utils v6 adoption program: gethinode/mod-utils#334. See the mod-utils README
"Argument validation" section for the v5-to-v6 migration notes (separated envelope,
defaultedlist, warnings-first rollout for theInitArgs.html/InitTypes.htmlshims).Migrated call sites
layouts/shortcodes/map.html— the onlyInitArgs.htmlcall site in the module. Switched topartial "utilities/Args.html" (dict "structure" "map" "args" .Params "named" .IsNamedParams "group" "shortcode" "strict" false).strict: falsebecause this is a user-facing shortcode(site-authored content). Access is via the separated
$result.argsenvelope;$erroris nowset from
$result.err. No dual kebab/camel handling,_defaultplumbing, oror-basedfalsy-fallback workarounds were present to remove — the one existing
| defaultfallback(
$args.id | default (printf "leaflet-map-%d" .Ordinal)) is a computed ID default that has nostatic default in the schema, so it is not the "explicit false/0 gets swallowed" hazard the
program's standing checklist item targets and was left as-is.
Verification (recipe step 5)
hugo mod graph -s exampleSite(workspace-file exampleSite, per this module's wiring): showsgithub.com/gethinode/mod-leaflet/v3 github.com/gethinode/mod-utils/v6@v6.0.1+vendoronly —no
mod-utils/v5anywhere in the graph.pnpm test(pnpm build→ clean, vendor,hugo --gc --minify -s exampleSite) exits 0. ZeroERROR lines. The only WARN lines are pre-existing Hugo deprecations unrelated to this module
(
languageCode,.Site.Data) — zero warnings attributable to themapshortcode.exampleSite/content/_index.md) already exercises themapshortcode with real arguments (class,lat,long,popup,popup-lat,popup-long, plus thezoom/iddefaults) — not a placeholder, so no demo-content seedingwas needed for the exercise gate.
exampleSite/public/index.htmlbeforeand after the migration (via
git stash/poparound a clean rebuild) — byte-identical.tests/visual/visual.mjsfrom the Hinode programworkspace): baseline shot from the pristine clone before any change, candidate shot after.
compareresult: 3 pages compared, 0 flagged, 0.0000% diff ratio on every page(
categories,index,tags). Map tile areas are masked by the harness by design (externaltiles, non-localhost requests blocked) — the byte-identical HTML diff covers that gap.
Evidence
github.com/gethinode/mod-leaflet/v3hugo mod graphv6-only line:github.com/gethinode/mod-leaflet/v3 github.com/gethinode/mod-utils/v6@v6.0.1+vendorlayouts/shortcodes/map.html(1 of 1)deprecation warnings observed and left untouched (out of scope)
🤖 Generated with Claude Code