Skip to content

fix: Use a "package" htmlDependency for local copy of leaflet-providers#43

Merged
schloerke merged 6 commits intomainfrom
fix/local-dependency
Mar 18, 2026
Merged

fix: Use a "package" htmlDependency for local copy of leaflet-providers#43
schloerke merged 6 commits intomainfrom
fix/local-dependency

Conversation

@gadenbuie
Copy link
Member

Updates providers_default() and underlying functions to return an HTML dependency that points to the packaged file directly, rather than a temporary copy.

pkgload::load_all()
#> ℹ Loading leaflet.providers

providers_default()$dep |> str()
#> List of 10
#>  $ name      : chr "leaflet-providers"
#>  $ version   : chr "2.0.0"
#>  $ src       :List of 1
#>   ..$ file: chr "leaflet-providers"
#>  $ meta      : NULL
#>  $ script    : chr "leaflet-providers.js"
#>  $ stylesheet: NULL
#>  $ head      : NULL
#>  $ attachment: NULL
#>  $ package   : chr "leaflet.providers"
#>  $ all_files : logi FALSE
#>  - attr(*, "class")= chr "html_dependency"

- Fix providers_default() to read JS from the new
  inst/leaflet-providers/ subdirectory instead of the old versioned
  top-level path, which would fail at runtime
- Remove stale comment and unused js_filename_for_inst variable
- Remove dead file cleanup code in update script that only searched
  top-level inst/
- Add unit tests for providers_default() and dependency helpers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@schloerke schloerke closed this Mar 18, 2026
@schloerke schloerke reopened this Mar 18, 2026
@schloerke schloerke merged commit df21a52 into main Mar 18, 2026
1 check passed
schloerke added a commit that referenced this pull request Mar 18, 2026
Resolve conflicts from PR #43 (package htmlDependency):
- Adopt inst/leaflet-providers/ directory structure
- Update providers_default() to use new path with error check
- Update get_providers() version check for new path
- Update CLAUDE.md and skill to reflect new file layout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants