Releases: ezzatron/fake-geolocation
Releases · ezzatron/fake-geolocation
v0.9.0
Added
- Added
toJSON()
methods toGeolocationCoordinates
andGeolocationPosition
. - Added the
GeolocationCoordinatesParameters
type, which can be used for typing simple objects that have the same properties asGeolocationCoordinates
, but don't implement the full interface.
Changed
- Errors thrown from
successCallback
anderrorCallback
arguments togetCurrentPosition()
andwatchPosition()
are now thrown asynchronously, instead of being discarded. - Errors thrown from subscriber functions used in geolocation delegates and location services are now thrown asynchronously, instead of being discarded.
v0.8.1
Fixed
- Fixed an issue where passing explicit
undefined
values tocreateCoordinates()
orcreatePosition()
could produce aGeolocationCoordinates
object withundefined
properties.
v0.8.0
Changed
- The
createCoordinates()
andcreatePosition()
functions now have optional arguments, making them more useful for creating test data. TheisHighAccuracy
argument now defaults totrue
, and other omitted arguments or properties will be filled with "empty" values:0
forlatitude
,longitude
,accuracy
, andtimestamp
.null
foraltitude
,altitudeAccuracy
,heading
, andspeed
.
Added
- Added
Symbol.toStringTag
methods to allGeolocation
,GeolocationPosition
,GeolocationCoordinates
, andGeolocationPositionError
objects.
v0.7.0
Changed
- Watched positions now receive updates when location services are disabled, and also when they are re-enabled.
- Watched positions now receive updates when the
geolocation
permission is re-granted after being revoked.
v0.6.2
Fixed
- Fixed a race condition that could occur when permission state changes from
granted
while waiting to acquire coordinates from location services.
v0.6.1
Fixed
- Fixed a linting error in the changelog.
v0.6.0
Changed
- Changing the
geolocation
permission fromgranted
while watching a position will now cause an immediate call to the error callback with aPERMISSION_DENIED
error. This should be ergonomic for testing, as previously you'd have to change the permission and jump to a new location to trigger an error.
v0.5.2
Fixed
- Fixed potential race condition that may have been possible to create when
watchPosition()
is used with anerrorCallback
, and an error occurs afterclearWatch()
is called.
v0.5.1
Fixed
- Fixed a race condition that could occur with
watchPosition()
where the success callback could be called afterclearWatch()
was called.
v0.5.0
Added
- Add waitForPositionError()