Skip to content

feat!: adopt mod-utils v6 (mod-leaflet v3)#265

Merged
markdumay merged 1 commit into
mainfrom
feat/mod-utils-v6
Jul 12, 2026
Merged

feat!: adopt mod-utils v6 (mod-leaflet v3)#265
markdumay merged 1 commit into
mainfrom
feat/mod-utils-v6

Conversation

@markdumay

Copy link
Copy Markdown
Contributor

Summary

  • Bump the module's own Go path from /v2 to /v3 and require
    github.com/gethinode/mod-utils/v6 v6.0.1 (never v6.0.0, which carries a known camelKey
    defect).
  • Migrate the module's sole InitArgs.html call site to the clean Args.html API.
  • Update config.toml and exampleSite/hugo.toml module 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,
defaulted list, warnings-first rollout for the InitArgs.html/InitTypes.html shims).

Migrated call sites

  • layouts/shortcodes/map.html — the only InitArgs.html call site in the module. Switched to
    partial "utilities/Args.html" (dict "structure" "map" "args" .Params "named" .IsNamedParams "group" "shortcode" "strict" false). strict: false because this is a user-facing shortcode
    (site-authored content). Access is via the separated $result.args envelope; $error is now
    set from $result.err. No dual kebab/camel handling, _default plumbing, or or-based
    falsy-fallback workarounds were present to remove — the one existing | default fallback
    ($args.id | default (printf "leaflet-map-%d" .Ordinal)) is a computed ID default that has no
    static 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): shows
    github.com/gethinode/mod-leaflet/v3 github.com/gethinode/mod-utils/v6@v6.0.1+vendor only —
    no mod-utils/v5 anywhere in the graph.
  • pnpm test (pnpm build → clean, vendor, hugo --gc --minify -s exampleSite) exits 0. Zero
    ERROR lines. The only WARN lines are pre-existing Hugo deprecations unrelated to this module
    (languageCode, .Site.Data) — zero warnings attributable to the map shortcode.
  • The exampleSite's existing content (exampleSite/content/_index.md) already exercises the
    map shortcode with real arguments (class, lat, long, popup, popup-lat,
    popup-long, plus the zoom/id defaults) — not a placeholder, so no demo-content seeding
    was needed for the exercise gate.
  • HTML-source diff (recipe pilot refinement 5): captured exampleSite/public/index.html before
    and after the migration (via git stash/pop around a clean rebuild) — byte-identical.
  • Visual regression (own exampleSite, tests/visual/visual.mjs from the Hinode program
    workspace): baseline shot from the pristine clone before any change, candidate shot after.
    compare result: 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 (external
    tiles, non-localhost requests blocked) — the byte-identical HTML diff covers that gap.

Evidence

  • New path: github.com/gethinode/mod-leaflet/v3
  • hugo mod graph v6-only line: github.com/gethinode/mod-leaflet/v3 github.com/gethinode/mod-utils/v6@v6.0.1+vendor
  • Build exit code: 0 (zero ERROR lines)
  • Migrated call sites: layouts/shortcodes/map.html (1 of 1)
  • Warning triage: no warnings attributable to the module; 2 pre-existing unrelated Hugo
    deprecation warnings observed and left untouched (out of scope)
  • Visual diff triage: 0 flagged / 3 pages, 0.0000% diff — no re-baseline needed

🤖 Generated with Claude Code

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>
@markdumay markdumay merged commit 9df140f into main Jul 12, 2026
8 checks passed
@markdumay

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 3.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant