expo-keep-awake 14.0.3 → 14.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,11 +10,22 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
- ## 14.0.3 — 2025-02-19
13
+ ## 14.1.0 — 2025-04-04
14
+
15
+ ### 🛠 Breaking changes
16
+
17
+ - Bump minimum macOS version to 11.0. ([#34980](https://github.com/expo/expo/pull/34980) by [@gabrieldonadel](https://github.com/gabrieldonadel))
18
+
19
+ ### 💡 Others
20
+
21
+ - [android] Remove deactivation warning. ([#35760](https://github.com/expo/expo/pull/35760) by [@aleqsio](https://github.com/aleqsio))
22
+ - [Android] Started using expo modules gradle plugin. ([#34176](https://github.com/expo/expo/pull/34176) by [@lukmccall](https://github.com/lukmccall))
23
+
24
+ ## 14.0.3 - 2025-02-19
14
25
 
15
26
  _This version does not introduce any user-facing changes._
16
27
 
17
- ## 14.0.2 2025-01-10
28
+ ## 14.0.2 - 2025-01-10
18
29
 
19
30
  _This version does not introduce any user-facing changes._
20
31
 
@@ -1,19 +1,15 @@
1
- apply plugin: 'com.android.library'
1
+ plugins {
2
+ id 'com.android.library'
3
+ id 'expo-module-gradle-plugin'
4
+ }
2
5
 
3
6
  group = 'host.exp.exponent'
4
- version = '14.0.3'
5
-
6
- def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
7
- apply from: expoModulesCorePlugin
8
- applyKotlinExpoModulesCorePlugin()
9
- useCoreDependencies()
10
- useDefaultAndroidSdkVersions()
11
- useExpoPublishing()
7
+ version = '14.1.0'
12
8
 
13
9
  android {
14
10
  namespace "expo.modules.keepawake"
15
11
  defaultConfig {
16
12
  versionCode 16
17
- versionName "14.0.3"
13
+ versionName "14.1.0"
18
14
  }
19
15
  }
@@ -5,8 +5,5 @@ import expo.modules.kotlin.exception.CodedException
5
5
  internal class ActivateKeepAwakeException :
6
6
  CodedException("Unable to activate keep awake")
7
7
 
8
- internal class DeactivateKeepAwakeException :
9
- CodedException("Unable to deactivate keep awake. However, it probably is deactivated already")
10
-
11
8
  internal class MissingModuleException(moduleName: String) :
12
9
  CodedException("Module '$moduleName' not found. Are you sure all modules are linked correctly?")
@@ -16,7 +16,7 @@ class KeepAwakeModule : Module() {
16
16
 
17
17
  AsyncFunction("activate") { tag: String, promise: Promise ->
18
18
  try {
19
- keepAwakeManager.activate(tag) { promise.resolve(true) }
19
+ keepAwakeManager.activate(tag) { promise.resolve() }
20
20
  } catch (ex: CurrentActivityNotFoundException) {
21
21
  promise.reject(ActivateKeepAwakeException())
22
22
  }
@@ -24,9 +24,9 @@ class KeepAwakeModule : Module() {
24
24
 
25
25
  AsyncFunction("deactivate") { tag: String, promise: Promise ->
26
26
  try {
27
- keepAwakeManager.deactivate(tag) { promise.resolve(true) }
28
- } catch (ex: CurrentActivityNotFoundException) {
29
- promise.reject(DeactivateKeepAwakeException())
27
+ keepAwakeManager.deactivate(tag) { promise.resolve() }
28
+ } catch (e: Exception) {
29
+ promise.resolve()
30
30
  }
31
31
  }
32
32
 
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
12
12
  s.homepage = package['homepage']
13
13
  s.platforms = {
14
14
  :ios => '15.1',
15
- :osx => '10.15',
15
+ :osx => '11.0',
16
16
  :tvos => '15.1'
17
17
  }
18
18
  s.swift_version = '5.4'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-keep-awake",
3
- "version": "14.0.3",
3
+ "version": "14.1.0",
4
4
  "description": "Provides a React component that prevents the screen sleeping when rendered. It also exposes static methods to control the behavior imperatively.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -33,8 +33,8 @@
33
33
  "homepage": "https://docs.expo.dev/versions/latest/sdk/keep-awake/",
34
34
  "dependencies": {},
35
35
  "devDependencies": {
36
- "@testing-library/react-native": "^12.5.2",
37
- "expo-module-scripts": "^4.0.4"
36
+ "@testing-library/react-native": "^13.1.0",
37
+ "expo-module-scripts": "^4.1.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "expo": "*",
@@ -43,5 +43,5 @@
43
43
  "jest": {
44
44
  "preset": "expo-module-scripts"
45
45
  },
46
- "gitHead": "c01c449a1d6e6e8690bfcc88a778b46781a59674"
46
+ "gitHead": "68b8233002dc678934ba40cbade7fbc80e71aeff"
47
47
  }