Atualizar expo-location de 57.x para 58.x
Comparação da API pública de expo-location 57.0.21 e 58.0.16, calculada automaticamente a partir dos tipos TypeScript. Uma assinatura alterada é uma possível mudança incompatível, não uma certeza.
Resumo
| Caminhos de importação removidos | 0 |
|---|---|
| Exports removidos | 0 |
| Assinaturas alteradas | 3 |
| Membros de classes ou interfaces removidos | 0 |
| Membros de classes ou interfaces alterados | 0 |
| Novas descontinuações | 0 |
| Mudanças de requisitos (engines, dependências peer) | 3 |
| Novos exports | 0 |
Exports removidos
Nenhuma detectada.
Assinaturas alteradas
| export | Antes | Depois |
|---|---|---|
expo-location · useBackgroundPermissions | (options?: any): [any, () => Promise<PermissionResponse>, () => Promise<PermissionResponse>] | (options?: any): [any, () => Promise<any>, () => Promise<any>] |
expo-location · getBackgroundPermissionsAsync | (): Promise<PermissionResponse> | (): Promise<any> |
expo-location · requestBackgroundPermissionsAsync | (): Promise<PermissionResponse> | (): Promise<any> |
Membros de classes ou interfaces removidos
Nenhuma detectada.
Membros de classes ou interfaces alterados
Nenhuma detectada.
Novas descontinuações
Nenhuma detectada.
Mudanças de requisitos (engines, dependências peer)
| Antes | Depois | |
|---|---|---|
peerDependencies.react | — | * |
peerDependencies.react-native | — | * |
peerDependencies.expo-task-manager | — | * |
Changelog entre estas versões
Texto publicado pelos autores do pacote, exibido como está.
58.0.16
### Patch Changes
- [Android] Don't crash when the foreground service of a location task can't be started, for example when the location permission was revoked while the task stayed registered. The task now keeps running without the service instead of crashing the app on every launch. ([#51216](https://github.com/expo/expo/pull/51216) by [@krisoft20](https://github.com/krisoft20))
- [Android] Add the TypeScript interface for the location foreground service: `ensureBackgroundSessionStarted`, `stopBackgroundSession` and `getBackgroundSessionStatus`.
Add `getNotificationPermissions`, `requestNotificationPermissions` and the `useNotificationPermissions` hook for the service's notification.
Add `LocationUpdatesHandle.status()`, and the `canDeliverUpdates` and `areUpdatesAllowed` fields on `PositionWatchStatus`.
([#51320](https://github.com/expo/expo/pull/51320) by [@HubertBer](https://github.com/HubertBer))
- Updated dependencies.
- @expo/image-utils@0.12.558.0.15
### Patch Changes
- [Android] Stop the location foreground service when a background location task is unregistered while the service is still binding, so a `stopLocationUpdatesAsync` that follows `startLocationUpdatesAsync` within milliseconds no longer leaves the service and its notification running. ([#51236](https://github.com/expo/expo/pull/51236) by [@jrceranornelson](https://github.com/jrceranornelson))
- [iOS] Fix `notifyOnEnter` being ignored for geofencing regions. The native side read a misspelled key, so every region reported enter events regardless of the flag. ([#51444](https://github.com/expo/expo/pull/51444) by [@Wenszel](https://github.com/Wenszel))
- [iOS] Fix an infinite region restart loop when geofencing exceeds the maximum number of monitored regions. ([#51443](https://github.com/expo/expo/pull/51443) by [@Wenszel](https://github.com/Wenszel))
- Add TSDoc to the `expo-location/next` API. ([#51231](https://github.com/expo/expo/pull/51231) by [@Wenszel](https://github.com/Wenszel))58.0.14
### Patch Changes
- [Android] Add background location tracking. `LocationProvider` interface now has `getLocationTaskConsumerClass` and `getRegisteredTaskConsumerClass` methods, which return the `LocationTaskConsumer` class used to handle background location using TaskManager. Added `GmsLocationTaskConsumer` and `AndroidLocationTaskConsumer` implementations. Add `RECEIVE_BOOT_COMPLETED` to the manifest when the `isAndroidBackgroundLocationEnabled` is true. ([#50876](https://github.com/expo/expo/pull/50876) by [@HubertBer](https://github.com/HubertBer))
- [iOS] Keep `watchPositionAsync` alive while the app is in the background. ([#51327](https://github.com/expo/expo/pull/51327) by [@Wenszel](https://github.com/Wenszel))
- [next][iOS] Add `hasLocationServicesEnabled`. ([#51326](https://github.com/expo/expo/pull/51326) by [@Wenszel](https://github.com/Wenszel))
- [next][iOS] Report `ERR_LOCATION_SERVICES_DISABLED_GLOBALLY` from `expo-location/next` watchers when Location Services are turned off. ([#51325](https://github.com/expo/expo/pull/51325) by [@Wenszel](https://github.com/Wenszel))
- [next][iOS] Make `LocationUpdatesHandle.stop()` a no-op when the task is not registered. ([#51325](https://github.com/expo/expo/pull/51325) by [@Wenszel](https://github.com/Wenszel))
- [next][iOS] Keep `expo-location/next` watchers alive while the app is in the background. ([#51325](https://github.com/expo/expo/pull/51325) by [@Wenszel](https://github.com/Wenszel))
- [Android] Add a `LocationForegroundService` and helper methods to `start`/`update`/`stop` it. Update the position watchers so that they are running in background while the foreground service is running. ([#49995](https://github.com/expo/expo/pull/49995) by [@HubertBer](https://github.com/HubertBer))58.0.13
### Patch Changes
- [iOS] Report `mocked` on `LocationObject` using `CLLocationSourceInformation.isSimulatedBySoftware`. ([#50683](https://github.com/expo/expo/pull/50683) by [@JagjeevanAK](https://github.com/JagjeevanAK))
- [iOS] Add `getPosition` to `expo-location/next`. ([#50198](https://github.com/expo/expo/pull/50198) by [@Wenszel](https://github.com/Wenszel))
- [iOS] Add `LocationUpdatesHandle` to `expo-location/next`. ([#50263](https://github.com/expo/expo/pull/50263) by [@Wenszel](https://github.com/Wenszel))
- [iOS] Add permissions to `expo-location/next`. ([#49972](https://github.com/expo/expo/pull/49972) by [@Wenszel](https://github.com/Wenszel))
- [iOS] Add `PositionWatchHandle` to `expo-location/next`. ([#50262](https://github.com/expo/expo/pull/50262) by [@Wenszel](https://github.com/Wenszel))
- Add the TypeScript API layer for `expo-location/next`. ([#49849](https://github.com/expo/expo/pull/49849) by [@Wenszel](https://github.com/Wenszel))58.0.12
### Patch Changes
- [Android] Change the requestBackgroundPermissions and emitted errors to match the TypeScript API defined in PR https://github.com/expo/expo/pull/49849. ([#51067](https://github.com/expo/expo/pull/51067) by [@HubertBer](https://github.com/HubertBer))
- Updated dependencies.
- @expo/image-utils@0.12.458.0.11
### Patch Changes
- Updated dependencies. ([#50391](https://github.com/expo/expo/pull/50391))
- @expo/image-utils@0.12.358.0.10
### Patch Changes
- Bump precompiled artifacts due to ABI breakage in expo-modules-jsi@58.0.6. ([#50881](https://github.com/expo/expo/pull/50881) by [@kitten](https://github.com/kitten))
- [Android] Add the core functionalities for the **next** version: permission getters and requesters, position getter, and `enableLocationServices` prompt. Introduce `LocationProvider` interface to allow for multiple implementations: for now `gms` and `android.location`. ([#49988](https://github.com/expo/expo/pull/49988) by [@HubertBer](https://github.com/HubertBer))
- [Android] Add the position watchers to the **next** implementation. Update the `LocationProvider` interface to also support watchers and implement it in both GMS and Android providers. ([#49992](https://github.com/expo/expo/pull/49992) by [@HubertBer](https://github.com/HubertBer))58.0.9
### Patch Changes
- Force-bump all packages, due to migration to changesets. ([#50762](https://github.com/expo/expo/pull/50762) by [@kitten](https://github.com/kitten))
- Updated dependencies. ([#50762](https://github.com/expo/expo/pull/50762))
- @expo/image-utils@0.12.258.0.8
_This version does not introduce any user-facing changes._58.0.7
_This version does not introduce any user-facing changes._58.0.6
_This version does not introduce any user-facing changes._58.0.5
### 🐛 Bug fixes
- [iOS] Exclude the CoreMotion features from the build when `motionUsagePermission: false` is set in `app.json`. ([#49409](https://github.com/expo/expo/pull/49409) by [@Wenszel](https://github.com/Wenszel))
- [iOS] Stop requiring the `location` background mode for geofencing. Region monitoring does not need it, and declaring it without a feature that uses persistent location gets apps rejected under App Store guideline 2.5.4. ([#50197](https://github.com/expo/expo/pull/50197) by [@abappi19](https://github.com/abappi19))58.0.4
_This version does not introduce any user-facing changes._58.0.3
_This version does not introduce any user-facing changes._58.0.2
_This version does not introduce any user-facing changes._58.0.1
_This version does not introduce any user-facing changes._58.0.0
### 🛠 Breaking changes
- [iOS] Remove the stale top-level `scope` and `accuracy` properties from the permission response returned by `getForegroundPermissionsAsync` and `requestForegroundPermissionsAsync`. Use the values under `ios` instead. ([#48009](https://github.com/expo/expo/pull/48009) by [@Wenszel](https://github.com/Wenszel))
### 🐛 Bug fixes
- [iOS] Add `scope` and `accuracy` under `ios` to the responses from `getBackgroundPermissionsAsync` and `requestBackgroundPermissionsAsync`, matching the `LocationPermissionResponse` type. ([#48926](https://github.com/expo/expo/pull/48926) by [@vonovak](https://github.com/vonovak))
- [Android] Fix `timeInterval` and `distanceInterval` being ignored for background location updates. ([#46788](https://github.com/expo/expo/issues/46788) by [@doshisunny](https://github.com/doshisunny))
- [iOS] Fix incorrect default value for `pausesUpdatesAutomatically` to match docs. ([#47008](https://github.com/expo/expo/pull/47008) by [@Ignigena](https://github.com/Ignigena))
- [Android] Fix leaking watches ([#48294](https://github.com/expo/expo/pull/48294) by [@Wenszel](https://github.com/Wenszel))
- [Android] Fix `startLocationUpdatesAsync` requiring `FOREGROUND_SERVICE_LOCATION` (Android 14+) even when no `foregroundService` option is passed. ([#49641](https://github.com/expo/expo/issues/49641) by [@aamagda](https://github.com/aamagda))
### 💡 Others
- Simplify re-export of `LocationEventEmitter` ([#46719](https://github.com/expo/expo/pull/46719) by [@kitten](https://github.com/kitten))
- Add missing `react` and `react-native` peer dependencies ([#49744](https://github.com/expo/expo/pull/49744) by [@kitten](https://github.com/kitten))Dê estes dados ao seu agente de IA
Vigia é um servidor MCP gratuito: seu agente de programação verifica versões, mudanças incompatíveis e vulnerabilidades antes de escrever código. Sem cadastro, sem chave de API.
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Adicionar ao CursorAdicionar ao VS Code★ Estrela no GitHub
Qualquer outro cliente MCP
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }Skill para agentes (SKILL.md): diz ao agente quando usar o Vigia · GitHub Action para pull requests
Perguntas frequentes
Quais são as mudanças incompatíveis ao atualizar expo-location de 57 para 58?
Entre expo-location 57.0.21 e 58.0.16, o Vigia encontrou 0 exports removidos, 3 assinaturas alteradas e 0 membros de classes ou interfaces removidos ou alterados.
O que foi descontinuado em expo-location 58?
0 exports ou membros foram marcados como descontinuados em expo-location 58.0.16.
Para agentes
GET https://vigia.coredls.cloud/v1/packages/npm/expo-location/upgrade?from=57.0.21&to=58.0.16