expo-eas-client 55.0.2 → 55.0.3
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 +6 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/easclient/EASClientID.kt +10 -0
- package/android/src/main/java/expo/modules/easclient/EASClientModule.kt +2 -0
- package/build/index.d.ts +6 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +6 -0
- package/build/index.js.map +1 -1
- package/ios/EASClient/EASClientID.swift +9 -0
- package/ios/EASClient/EASClientModule.swift +2 -0
- package/package.json +2 -2
- package/src/index.ts +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 55.0.3 — 2026-03-27
|
|
14
|
+
|
|
15
|
+
### 🎉 New features
|
|
16
|
+
|
|
17
|
+
- Add `deterministicUniformValue` constant ([#44075](https://github.com/expo/expo/pull/44075) by [@Ubax](https://github.com/Ubax))
|
|
18
|
+
|
|
13
19
|
## 55.0.2 — 2026-01-26
|
|
14
20
|
|
|
15
21
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -4,7 +4,7 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'host.exp.exponent'
|
|
7
|
-
version = '55.0.
|
|
7
|
+
version = '55.0.3'
|
|
8
8
|
|
|
9
9
|
expoModule {
|
|
10
10
|
canBePublished false
|
|
@@ -14,7 +14,7 @@ android {
|
|
|
14
14
|
namespace "expo.modules.easclient"
|
|
15
15
|
defaultConfig {
|
|
16
16
|
versionCode 1
|
|
17
|
-
versionName "55.0.
|
|
17
|
+
versionName "55.0.3"
|
|
18
18
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
19
19
|
}
|
|
20
20
|
testOptions {
|
|
@@ -7,6 +7,16 @@ private const val PREFERENCES_FILE_NAME = "dev.expo.EASSharedPreferences"
|
|
|
7
7
|
private const val EAS_CLIENT_ID_SHARED_PREFERENCES_KEY = "eas-client-id"
|
|
8
8
|
|
|
9
9
|
class EASClientID(private val context: Context) {
|
|
10
|
+
companion object {
|
|
11
|
+
/**
|
|
12
|
+
* Converts a UUID to a deterministic value in [0, 1] using the least significant
|
|
13
|
+
* 64 bits interpreted as an unsigned integer fraction of ULong.MAX_VALUE.
|
|
14
|
+
*/
|
|
15
|
+
fun deterministicUniformValue(uuid: UUID): Double {
|
|
16
|
+
return uuid.leastSignificantBits.toULong().toDouble() / ULong.MAX_VALUE.toDouble()
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
10
20
|
val uuid: UUID by lazy {
|
|
11
21
|
val sharedPreferences = context.getSharedPreferences(PREFERENCES_FILE_NAME, Context.MODE_PRIVATE)
|
|
12
22
|
var clientId = sharedPreferences.getString(EAS_CLIENT_ID_SHARED_PREFERENCES_KEY, null)
|
package/build/index.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export declare const clientID: any;
|
|
2
|
+
/**
|
|
3
|
+
* A deterministic uniform value in [0, 1] derived from clientId.
|
|
4
|
+
* Stable across app launches for the same installation,
|
|
5
|
+
* but unique per app instance.
|
|
6
|
+
*/
|
|
7
|
+
export declare const deterministicUniformValue: number;
|
|
2
8
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,KAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,KAAqB,CAAC;AAC3C;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAA4C,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import EASClient from './EASClient';
|
|
2
2
|
export const clientID = EASClient.clientID;
|
|
3
|
+
/**
|
|
4
|
+
* A deterministic uniform value in [0, 1] derived from clientId.
|
|
5
|
+
* Stable across app launches for the same installation,
|
|
6
|
+
* but unique per app instance.
|
|
7
|
+
*/
|
|
8
|
+
export const deterministicUniformValue = EASClient.deterministicUniformValue;
|
|
3
9
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC","sourcesContent":["import EASClient from './EASClient';\n\nexport const clientID = EASClient.clientID;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;AAC3C;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAW,SAAS,CAAC,yBAAyB,CAAC","sourcesContent":["import EASClient from './EASClient';\n\nexport const clientID = EASClient.clientID;\n/**\n * A deterministic uniform value in [0, 1] derived from clientId.\n * Stable across app launches for the same installation,\n * but unique per app instance.\n */\nexport const deterministicUniformValue: number = EASClient.deterministicUniformValue;\n"]}
|
|
@@ -11,6 +11,15 @@ public class EASClientID : NSObject {
|
|
|
11
11
|
UUID.init().uuidString
|
|
12
12
|
})!
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
/// Converts a UUID to a deterministic value in [0, 1] using the least significant
|
|
16
|
+
/// 64 bits (bytes 8–15) interpreted as an unsigned integer fraction of UInt64.max.
|
|
17
|
+
public static func deterministicUniformValue(_ uuid: UUID) -> Double {
|
|
18
|
+
let value = withUnsafeBytes(of: uuid.uuid) {
|
|
19
|
+
$0.load(fromByteOffset: 8, as: UInt64.self).bigEndian
|
|
20
|
+
}
|
|
21
|
+
return Double(value) / Double(UInt64.max)
|
|
22
|
+
}
|
|
14
23
|
}
|
|
15
24
|
|
|
16
25
|
extension UserDefaults {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-eas-client",
|
|
3
|
-
"version": "55.0.
|
|
3
|
+
"version": "55.0.3",
|
|
4
4
|
"description": "Stable client identifier for EAS services",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"expo-module-scripts": "^55.0.2"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "f63217deac00dcd278f75d9846933c11e5c6f9a3"
|
|
41
41
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import EASClient from './EASClient';
|
|
2
2
|
|
|
3
3
|
export const clientID = EASClient.clientID;
|
|
4
|
+
/**
|
|
5
|
+
* A deterministic uniform value in [0, 1] derived from clientId.
|
|
6
|
+
* Stable across app launches for the same installation,
|
|
7
|
+
* but unique per app instance.
|
|
8
|
+
*/
|
|
9
|
+
export const deterministicUniformValue: number = EASClient.deterministicUniformValue;
|