Skip to content

Update to leaflet-providers 3.0.0#44

Merged
schloerke merged 9 commits intomainfrom
schloerke/update-providers
Mar 18, 2026
Merged

Update to leaflet-providers 3.0.0#44
schloerke merged 9 commits intomainfrom
schloerke/update-providers

Conversation

@schloerke
Copy link
Collaborator

@schloerke schloerke commented Mar 17, 2026

Summary

Update leaflet-providers JavaScript library from v2.0.0 to v3.0.0 and modernize the developer workflow.

  • Upgrade bundled leaflet-providers.js from v2.0.0 to v3.0.0
  • Add version parameter validation in get_providers() to reject versions < 1.0.10 with a clear error message
  • Add file existence check in providers_default() for improved error handling
  • Add comprehensive test suite for get_providers() covering structure validation and multi-version compatibility
  • Replace scripts/ directory with a Claude Code skill (.claude/skills/update-leaflet-providers.md) that guides the full update workflow
  • Add developer section to README describing how to run /update-leaflet-providers
  • Update .Rbuildignore to exclude .git, .claude, and CLAUDE.md
  • Add CLAUDE.md for Claude Code project guidance

Verification

library(leaflet)
library(leaflet.providers)

providers_default()$version_num
#> [1] "3.0.0"

leaflet() |>
  setView(lng = -75.1652, lat = 39.9526, zoom = 12) |>
  addProviderTiles("OpenStreetMap")

- Upgrade leaflet-providers.js from v2.0.0 to v3.0.0
- Add version parameter validation (>= 1.0.10) with clear error messages
- Implement file existence check in providers_default() for better error handling
- Add comprehensive test suite for get_providers() with version validation
- Update package version to 2.0.0.9000 in DESCRIPTION
- Update NEWS.md with upgrade details
- Add demo script and test suite for providers functionality
- Reorganize providers_data.R with improved structure for v3.0.0
@schloerke schloerke marked this pull request as ready for review March 17, 2026 20:02
schloerke and others added 8 commits March 17, 2026 16:03
- Remove scripts/update_data_and_pkg.R and scripts/demo_app.R
- Add .claude/skills/update-leaflet-providers.md skill for the full
  update workflow
- Add developer section to README.Rmd pointing to the skill
- Update .Rbuildignore to exclude .git, .claude, and CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
- Update README.md to reflect package htmlDependency structure
- Add scripts/, README.html to .Rbuildignore
- Add README.html, .playwright-mcp/ to .gitignore
- Add object_length_linter = NULL to .lintr
- Update revdep/README.md with latest check results

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix providers_loaded() docs to accurately describe plain list return type
- Switch use_providers() examples from require() to requireNamespace()
- Wrap V8-dependent examples in \donttest{} for CRAN compatibility
- Use consistent version numbers across examples
- Add warn = FALSE to readLines() calls to suppress incomplete final line warnings
- Use paste(sep="/") instead of file.path() for URL construction
- Fix NEWS.md to say "leaflet-providers.js" instead of "leaflet.js"
- Cache JS source string in providers_default() to avoid redundant disk reads
- Add use_providers() round-trip and invalid input tests
- Delete stale scripts/check-package.R

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@schloerke schloerke merged commit 54356f2 into main Mar 18, 2026
1 check passed
@schloerke schloerke deleted the schloerke/update-providers branch March 18, 2026 16:07
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.

1 participant