Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

expo-location

Package Overview
Dependencies
Maintainers
20
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-location - npm Package Compare versions

Comparing version 8.0.0 to 8.1.0

4

.expo/tsconfig.jest.json
{
"extends": "/Users/tomasz/Work/expo/packages/expo-location/tsconfig.json",
"extends": "/Users/bbarthec/Work/expo/packages/expo-location/tsconfig.json",
"compilerOptions": {

@@ -10,5 +10,5 @@ "module": "esnext",

"../../../node_modules/@types",
"/Users/tomasz/Work/expo/packages/expo-module-scripts/ts-declarations"
"/Users/bbarthec/Work/expo/packages/expo-module-scripts/ts-declarations"
]
}
}

@@ -1,6 +0,2 @@

declare const _default: {
[propertyName: string]: any;
addListener: (eventName: string) => void;
removeListeners: (count: number) => void;
};
declare const _default: import("@unimodules/core").ProxyNativeModule;
export default _default;

@@ -22,3 +22,3 @@ interface Coordinates {

}>;
getCurrentPositionAsync(options: Object): Promise<Position | null>;
getCurrentPositionAsync(options: object): Promise<Position | null>;
removeWatchAsync(watchId: any): Promise<void>;

@@ -29,5 +29,5 @@ watchDeviceHeading(headingId: any): Promise<void>;

reverseGeocodeAsync(): Promise<any[]>;
watchPositionImplAsync(watchId: string, options: Object): Promise<string>;
watchPositionImplAsync(watchId: string, options: object): Promise<string>;
requestPermissionsAsync(): Promise<PermissionResult>;
};
export default _default;

@@ -13,2 +13,3 @@ import { EventEmitter } from '@unimodules/core';

accuracy?: LocationAccuracy;
maximumAge?: number;
enableHighAccuracy?: boolean;

@@ -61,3 +62,3 @@ timeInterval?: number;

}
interface LocationTaskOptions {
export interface LocationTaskOptions {
accuracy?: LocationAccuracy;

@@ -78,3 +79,3 @@ timeInterval?: number;

}
interface Region {
export interface LocationRegion {
identifier?: string;

@@ -87,4 +88,4 @@ latitude: number;

}
declare type LocationCallback = (data: LocationData) => any;
declare type HeadingCallback = (data: HeadingData) => any;
export declare type LocationCallback = (data: LocationData) => any;
export declare type LocationHeadingCallback = (data: HeadingData) => any;
declare enum LocationAccuracy {

@@ -121,6 +122,6 @@ Lowest = 1,

export declare function getHeadingAsync(): Promise<HeadingData>;
export declare function watchHeadingAsync(callback: HeadingCallback): Promise<{
export declare function watchHeadingAsync(callback: LocationHeadingCallback): Promise<{
remove: () => void;
}>;
export declare function geocodeAsync(address: string): Promise<Array<GeocodedLocation>>;
export declare function geocodeAsync(address: string): Promise<GeocodedLocation[]>;
export declare function reverseGeocodeAsync(location: {

@@ -141,3 +142,3 @@ latitude: number;

export declare function hasStartedLocationUpdatesAsync(taskName: string): Promise<boolean>;
export declare function startGeofencingAsync(taskName: string, regions?: Array<Region>): Promise<void>;
export declare function startGeofencingAsync(taskName: string, regions?: LocationRegion[]): Promise<void>;
export declare function stopGeofencingAsync(taskName: string): Promise<void>;

@@ -144,0 +145,0 @@ export declare function hasStartedGeofencingAsync(taskName: string): Promise<boolean>;

import { EventEmitter, Platform, CodedError } from '@unimodules/core';
import invariant from 'invariant';
import { PermissionStatus, } from 'unimodules-permissions-interface';
import invariant from 'invariant';
import ExpoLocation from './ExpoLocation';

@@ -5,0 +5,0 @@ const LocationEventEmitter = new EventEmitter(ExpoLocation);

{
"name": "expo-location",
"version": "8.0.0",
"version": "8.1.0",
"description": "Allows reading geolocation information from the device. Your app can poll for the current location or subscribe to location update events.",

@@ -50,5 +50,5 @@ "main": "build/Location.js",

"devDependencies": {
"expo-module-scripts": "~1.1.1"
"expo-module-scripts": "~1.2.0"
},
"gitHead": "ec7878b9ce54f2537721218ae0fe4017e4004806"
"gitHead": "3ad68bbd9847ebc8a55272c263b17d998a92f64f"
}

@@ -12,4 +12,3 @@ # expo-location

For managed [managed](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](#api-documentation). If you follow the link and there is no documentation available then this library is not yet usable within managed projects &mdash; it is likely to be included in an upcoming Expo SDK release.
For managed [managed](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](#api-documentation).
# Installation in bare React Native projects

@@ -16,0 +15,0 @@

@@ -60,3 +60,3 @@ import { EventEmitter } from '@unimodules/core';

},
async getCurrentPositionAsync(options: Object): Promise<Position | null> {
async getCurrentPositionAsync(options: object): Promise<Position | null> {
return new Promise<Position | null>((resolve, reject) =>

@@ -79,9 +79,9 @@ navigator.geolocation.getCurrentPosition(

},
async geocodeAsync(): Promise<Array<any>> {
async geocodeAsync(): Promise<any[]> {
throw new GeocoderError();
},
async reverseGeocodeAsync(): Promise<Array<any>> {
async reverseGeocodeAsync(): Promise<any[]> {
throw new GeocoderError();
},
async watchPositionImplAsync(watchId: string, options: Object): Promise<string> {
async watchPositionImplAsync(watchId: string, options: object): Promise<string> {
return new Promise<string>(resolve => {

@@ -88,0 +88,0 @@ // @ts-ignore

import { EventEmitter, Platform, CodedError } from '@unimodules/core';
import invariant from 'invariant';
import {

@@ -7,4 +8,2 @@ PermissionResponse as UMPermissionResponse,

import invariant from 'invariant';
import ExpoLocation from './ExpoLocation';

@@ -24,2 +23,3 @@

accuracy?: LocationAccuracy;
maximumAge?: number;
enableHighAccuracy?: boolean;

@@ -81,3 +81,3 @@ timeInterval?: number;

interface LocationTaskOptions {
export interface LocationTaskOptions {
accuracy?: LocationAccuracy;

@@ -102,3 +102,3 @@ timeInterval?: number; // Android only

interface Region {
export interface LocationRegion {
identifier?: string;

@@ -115,4 +115,4 @@ latitude: number;

};
type LocationCallback = (data: LocationData) => any;
type HeadingCallback = (data: HeadingData) => any;
export type LocationCallback = (data: LocationData) => any;
export type LocationHeadingCallback = (data: HeadingData) => any;

@@ -160,3 +160,3 @@ enum LocationAccuracy {

let watchCallbacks: {
[watchId: number]: LocationCallback | HeadingCallback;
[watchId: number]: LocationCallback | LocationHeadingCallback;
} = {};

@@ -244,3 +244,3 @@

export async function watchHeadingAsync(
callback: HeadingCallback
callback: LocationHeadingCallback
): Promise<{ remove: () => void }> {

@@ -304,3 +304,3 @@ // Check if there is already a compass event watch.

export async function geocodeAsync(address: string): Promise<Array<GeocodedLocation>> {
export async function geocodeAsync(address: string): Promise<GeocodedLocation[]> {
return ExpoLocation.geocodeAsync(address).catch(error => {

@@ -552,3 +552,3 @@ const platformUsesGoogleMaps = Platform.OS === 'android' || Platform.OS === 'web';

function _validateRegions(regions: Array<Region>) {
function _validateRegions(regions: LocationRegion[]) {
if (!regions || regions.length === 0) {

@@ -576,3 +576,3 @@ throw new Error(

taskName: string,
regions: Array<Region> = []
regions: LocationRegion[] = []
): Promise<void> {

@@ -579,0 +579,0 @@ _validateTaskName(taskName);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc