[Snyk] Upgrade leaflet from 1.3.1 to 1.9.4 #4
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.
Snyk has created this PR to upgrade leaflet from 1.3.1 to 1.9.4.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 20 versions ahead of your current version.
The recommended version was released on a year ago.
Release notes
Package name: leaflet
🐞 Bug fixes
zoomAnimation
isfalse
and zooming viaflyTo
or pinch (#8794 by @ plainheart)toGeoJSON()
still works with an empty array (#8737 by @ Falke-Design)LineUtil
andPolyUtil
only iterate over array values and not properties (#8840 by @ Falke-Design)LineUtil
andPolyUtil
for small layers (#8784 by @ Falke-Design)Tooltip
-boundFeatureGroup
that contains a layer without agetElement
method (#8890 by @ Falke-Design)Tooltip
is not showing when loaded dynamically while moving the map (#8672 by @ theGOTOguy)noMoveStart
option not applying tofitBounds
(#8911 by @ AbdullahSohail-SE)🙌 Accessibility
🐞 Bug fixes
L
global (#8536 by @ mourner)setMaxBounds(map.getBounds())
(#8534 by @ rjackson)latLngsToCoords()
does not return references passed to it (#7344 by @ marlo22)worldCopyJump()
behavior is consistent when using a keyboard (#8562 by @ Falke-Design)popupopen
event (#8571 by @ Belair34)Popup
(#8520 by @ rjackson)position: sticky
for map container (#8550 by @ tmiaa)🐞 Bug fixes
leaflet/dist/leaflet-src.esm.js
explicitly instead to take advantage; ESM by default will come in v2) (#8493 by @ jonkoops)🧪 Tests
📝 Docs
Bounds
equals
parameters in docs (#8500 by @ Falke-Design)Events
listens
not propagating to parent objects, in particular fixing compatibility with Leaflet.markercluster plugin (#8211 by @ Falke-Design)⚡ Note on future versions
The v1.9 release is setting the stage for the first major version bump of Leaflet since 2016! A lot has changed since then, and it's time for Leaflet to grow together with the web platform.
After this release, we are branching off the 1.x code and putting it in maintenance mode — reserving potential 1.x releases only for critical bugfixes. Although version 2.0 is still far away and will take some time to take shape, we plan to make the following changes:
This has been a long time coming, but now that Internet Explorer is officially end-of-life, it's time to say goodbye. Going forward, Leaflet will move to an evergreen strategy that targets browsers like Firefox, Chrome, Edge and Safari.
To maintain backwards compatibility, Leaflet is written entirely in ES5, a version of JavaScript supported by legacy browsers. So we have not been able to make use of many great JavaScript features (e.g. standardized classes, instead having to rely on our own implementation). By adopting a more modern version of the ECMAScript standard, we can start working towards aligning Leaflet with what is expected from a modern JavaScript library.
When we released Leaflet v1, the landscape in the JavaScript world was very different and full of competing module standards such as CommonJS, AMD and UMD. Today, ECMAScript modules have become the clear way forward to unite the JavaScript ecosystem under one banner. Moving forward, Leaflet will only be distributed in a single standardized module system, greatly reducing complexity of our distributed code.
As a developer using Leaflet, the capital letter
L
is probably intimately familiar to you. This is the Leaflet global where all of Leaflet's functionality lives. To allow compiler tooling to better eliminate dead-code through a process called tree-shaking, we are removing this global variable. To preserve backwards compatibility with older plugins, we will provide a shim that can be imported manually that will restore this functionality.v1.9.0 changelog
color-adjust
toprint-color-adjust
(#8211 by @ Malvoz)❇️ API changes
content
andlatLng
options toPopup
/Tooltip
constructors (#7783 by @ Falke-Design)Bounds
to have the same functions asLatLngBounds
(#7882 by @ Falke-Design)✨ Improvements
getCenter()
calculation and move it toPolyUtil
/LineUtil
(#7603 by @ Falke-Design)maxBounds
(#8168 by @ mourner)Events.listens
to search for specific function (#8161 by @ Falke-Design)noMoveStart
option topanTo
(#6685 by @ Chivano)FeatureCollection
handling togeometryToLayer
(#8163 by @ Falke-Design)🙌 Accessibility
Tooltip
accessibility (focus and voice over) (#8247 by @ alekzvik)role="presentation"
from image tiles (#8172 by @ Malvoz)🐞 Bug fixes
map._move
overrequestAnimFrame
(#8328 by @ AMDvsTMD)_isClickDisabled
to not throw no error if parent is removed from DOM (#8288 by @ Falke-Design)DomEvent.DoubleTap
to ignore clicks on<label>
s with afor
attribute (#8227 by @ IvanSanchez)once()
twice if same event is fired insideonce
(#8190 by @ Falke-Design)map.getCenter()
returning a mutable object (#8167 by @ mourner)min/maxZoom
when used in combination withdetectRetina
(#7328 by @ bozdoz)📝 Docs
anchor
todata-anchor
(#8174 by @ KnightJam1)🔧 Workflow
eslint-plugin-script-tags
(#8331 by @ jonkoops)🧪 Tests
map.latLngToLayerPoint
method (#8407 by @ kreloaded)map.panTo
(#8390 by @ anurag-dhamala)map.containerPointToLatLng
andmap.latLngToContainerPoint
(#8384 by @ abhi3315)Layer._addZoomLimit
(#8037 by @ zishiwu123)Map
(#8206 by @ stephenspol)CircleMarker._containsPoint
(#8340 by @ gernhard1337)v1.9.x updates:
We've since released:
v1.8.0 is a culmination of 1.5 years of development, a huge release focused on bug fixes, major reliability and accessibility improvements, cleaning up legacy code, and numerous improvements to documentation, development workflow and release process. A culmination of hundreds of contributions, and a preparation for bigger changes to come. 🍃
I'm making this release just as an air raid alert is sounding outside, in Kyiv, warning about an imminent Russian air strike. This release is dedicated to Ukrainian fight for freedom and democracy against the Russian invasion 🇺🇦 (see how you can support Ukraine here).
From now on, releases will become much more frequent. Thanks to our amazing community for all your help and patience. ❤️🙏 Special thanks to @ johnd0e who revived Leaflet development after long stagnation and made the biggest contributions, @ Falke-Design for doing the bulk of the work organizing development and preparing the release, @ Malvoz for his numerous accessibility contributions, and @ jonkoops for help with workflow automations. ❤️
contextmenu
event simulation on mobile Safari by introducing a newTapHold
handler, replacing legacyTap
(#7026 by @ johnd0e)DivOverlay
/Popup
/Tooltip
APIs (#7540 by @ johnd0e)Popup
related options fromDivOverlay
toPopup
(#7778 by @ Falke-Design)Tooltip
class fromleaflet-clickable
toleaflet-interactive
(#7719 by @ Falke-Design)Map.closeTooltip
now requires a layer as argument (#7533 by @ johnd0e)DomEvent.Pointer
) (#7059, #7084, #7415 by @ johnd0e)dblclick
event simulation on touch devices (DomEvent.DoubleTap
) (#7027 by @ johnd0e)disableClickPropagation
(#7439 by @ johnd0e)Map
hasLayer()
andLayerGroup
hasLayer()
to require a layer as argument (#6999 by @ johnd0e)Class.include
to not overwriteoptions
(#7756 by @ johnd0e)Class.extend
to not modify source props object (#6766 by @ johnd0e)Browser.touch
touch devices detection (#7029 by @ johnd0e)font-size
relative to the map container. (You can change the font size onleaflet-container
to adjust it if needed.) (#7800 by @ Chandu-4444)❇️ API changes
DivOverlay
/Tooltip
interactive
(#7531, #7532 by @ johnd0e)openOn
,close
,toggle
functions toDivOverlay
(#6639 by @ johnd0e)DomEvent.off(el)
to remove all listeners (#7125 by @ johnd0e)false
toUtil.formatNum
/toGeoJSON
(#7100 by @ johnd0e)autoPanOnFocus
toMarker
(#8042 by @ IvanSanchez)referrerPolicy
toTileLayer
(#7945 by @ natevw)playsInline
toVideoOverlay
(#7928 by @ Falke-Design)getCenter
toImageOverlay
(#7848 by @ Falke-Design)tileabort
event when aTileLayer
load is cancelled (#6786 by @ dstndstn)crossOrigin
toIcon
(#7298 by @ syedmuhammadabid)✨ Improvements
will-change
CSS property on tile images (#7872 by @ janjaap)GridLayer.onAdd
(#7570 by @ johnd0e)panInside
(#7469 by @ daverayment)TileLayer
URL (#7216 by @ lubojr)Tooltip
bound toImageOverlay
(#7306 by @ IvanSanchez)mousemove
through Canvas to map if it has no layers (#7809 by @ johnd0e)Layer
toControl.Attribution
(#7764 by @ johnd0e)vmlCreate()
so that it does not expose closure toTypeError
(#7279 by @ darcyparker)Control.Layers
by not relying on Browserandroid
andtouch
properties (#7057 by @ johnd0e)Tooltip
by not relying on Browsertouch
checks (