expo-updates 57.0.4 → 57.0.6
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 +8 -0
- package/android/build.gradle +2 -2
- package/cli/tsconfig.tsbuildinfo +1 -0
- package/ios/EXUpdates/Logging/UpdatesLogReader.swift +22 -16
- package/ios/EXUpdates/Logging/UpdatesLogger.swift +53 -16
- package/package.json +5 -5
- package/plugin/tsconfig.tsbuildinfo +1 -0
- package/utils/tsconfig.tsbuildinfo +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 57.0.6 — 2026-07-03
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 57.0.5 — 2026-07-01
|
|
18
|
+
|
|
19
|
+
_This version does not introduce any user-facing changes._
|
|
20
|
+
|
|
13
21
|
## 57.0.4 — 2026-06-30
|
|
14
22
|
|
|
15
23
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -42,7 +42,7 @@ expoModule {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
group = 'host.exp.exponent'
|
|
45
|
-
version = '57.0.
|
|
45
|
+
version = '57.0.6'
|
|
46
46
|
|
|
47
47
|
// Utility method to derive boolean values from the environment or from Java properties,
|
|
48
48
|
// and return them as strings to be used in BuildConfig fields
|
|
@@ -89,7 +89,7 @@ android {
|
|
|
89
89
|
namespace "expo.modules.updates"
|
|
90
90
|
defaultConfig {
|
|
91
91
|
versionCode 31
|
|
92
|
-
versionName '57.0.
|
|
92
|
+
versionName '57.0.6'
|
|
93
93
|
consumerProguardFiles("proguard-rules.pro")
|
|
94
94
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
95
95
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["./src/assetsverify.ts","./src/assetsverifyasync.ts","./src/assetsverifytypes.ts","./src/cli.ts","./src/configurecodesigning.ts","./src/configurecodesigningasync.ts","./src/generatecodesigning.ts","./src/generatecodesigningasync.ts","./src/generatefingerprint.ts","./src/resolveruntimeversion.ts","./src/syncconfigurationtonative.ts","./src/syncconfigurationtonativeasync.ts","./src/utils/args.ts","./src/utils/dir.ts","./src/utils/errors.ts","./src/utils/log.ts","./src/utils/modifyconfigasync.ts","./src/utils/withconsoledisabledasync.ts"],"version":"6.0.3"}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
// Copyright 2022-present 650 Industries. All rights reserved.
|
|
2
2
|
|
|
3
|
+
import ExpoModulesCore
|
|
3
4
|
import Foundation
|
|
4
5
|
import OSLog
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
Class to read expo-updates logs using OSLogReader
|
|
10
|
-
*/
|
|
7
|
+
/// Class to read expo-updates logs using OSLogReader
|
|
11
8
|
public final class UpdatesLogReader {
|
|
12
9
|
private let serialQueue = DispatchQueue(label: "dev.expo.updates.logging.reader")
|
|
13
|
-
private let logPersistence
|
|
10
|
+
private let logPersistence: PersistentFileLog
|
|
14
11
|
|
|
15
|
-
public init() {
|
|
12
|
+
public init() {
|
|
13
|
+
self.logPersistence = PersistentFileLog(category: UpdatesLogger.EXPO_UPDATES_LOG_CATEGORY)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/// Internal initializer that lets tests redirect the log file by passing a unique category.
|
|
17
|
+
/// Pairs with `UpdatesLogger(category:)` so a test instance reads back exactly what its sibling
|
|
18
|
+
/// logger wrote — without seeing writes from other test suites or production callers.
|
|
19
|
+
internal init(category: String) {
|
|
20
|
+
self.logPersistence = PersistentFileLog(category: category)
|
|
21
|
+
}
|
|
16
22
|
|
|
17
23
|
/**
|
|
18
24
|
Get expo-updates logs newer than the given date
|
|
@@ -55,11 +61,13 @@ public final class UpdatesLogReader {
|
|
|
55
61
|
*/
|
|
56
62
|
public func purgeLogEntries(olderThan: Date, completion: @escaping (Error?) -> Void) {
|
|
57
63
|
let epoch = epochFromDateOrOneDayAgo(date: olderThan)
|
|
58
|
-
logPersistence.purgeEntriesNotMatchingFilter(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
logPersistence.purgeEntriesNotMatchingFilter(
|
|
65
|
+
filter: { entryString in
|
|
66
|
+
self.logStringToFilteredLogEntry(entryString: entryString, epoch: epoch) != nil
|
|
67
|
+
},
|
|
68
|
+
{ error in
|
|
69
|
+
completion(error)
|
|
70
|
+
})
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
private func logStringToFilteredLogEntry(entryString: String, epoch: UInt) -> UpdatesLogEntry? {
|
|
@@ -72,16 +80,14 @@ public final class UpdatesLogReader {
|
|
|
72
80
|
return entry?.timestamp ?? 0 >= epoch ? entry : nil
|
|
73
81
|
}
|
|
74
82
|
|
|
75
|
-
private static let MAXIMUM_LOOKBACK_INTERVAL: TimeInterval = 86_400
|
|
83
|
+
private static let MAXIMUM_LOOKBACK_INTERVAL: TimeInterval = 86_400 // 1 day
|
|
76
84
|
|
|
77
85
|
private func epochFromDateOrOneDayAgo(date: Date) -> UInt {
|
|
78
86
|
// Returns the epoch (milliseconds since 1/1/1970)
|
|
79
87
|
// If date is earlier than one day ago, then the epoch for one day ago is returned
|
|
80
88
|
// instead
|
|
81
89
|
let earliestDate = Date().addingTimeInterval(-UpdatesLogReader.MAXIMUM_LOOKBACK_INTERVAL)
|
|
82
|
-
let dateToUse = date.timeIntervalSince1970 < earliestDate.timeIntervalSince1970 ?
|
|
83
|
-
earliestDate :
|
|
84
|
-
date
|
|
90
|
+
let dateToUse = date.timeIntervalSince1970 < earliestDate.timeIntervalSince1970 ? earliestDate : date
|
|
85
91
|
return UInt(dateToUse.timeIntervalSince1970) * 1000
|
|
86
92
|
}
|
|
87
93
|
}
|
|
@@ -2,25 +2,44 @@
|
|
|
2
2
|
|
|
3
3
|
// swiftlint:disable function_parameter_count
|
|
4
4
|
|
|
5
|
+
import ExpoModulesCore
|
|
5
6
|
import Foundation
|
|
6
7
|
import os.log
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
Class that implements logging for expo-updates in its own os.log category
|
|
12
|
-
*/
|
|
9
|
+
/// Class that implements logging for expo-updates in its own os.log category
|
|
13
10
|
@objc(EXUpdatesLogger)
|
|
14
11
|
@objcMembers
|
|
15
12
|
public final class UpdatesLogger: NSObject {
|
|
16
13
|
static let EXPO_UPDATES_LOG_CATEGORY = "expo-updates"
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
/// The os.log category and `PersistentFileLog` file suffix this logger writes to. Exposed so
|
|
16
|
+
/// callers reading back logs (and tests) can construct a matching `UpdatesLogReader` /
|
|
17
|
+
/// `PersistentFileLog` instance against the same file.
|
|
18
|
+
internal let category: String
|
|
19
|
+
|
|
20
|
+
private let logger: ExpoModulesCore.Logger
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
public override init() {
|
|
23
|
+
self.category = UpdatesLogger.EXPO_UPDATES_LOG_CATEGORY
|
|
24
|
+
self.logger = Logger(logHandlers: [
|
|
25
|
+
createOSLogHandler(category: UpdatesLogger.EXPO_UPDATES_LOG_CATEGORY),
|
|
26
|
+
createPersistentFileLogHandler(category: UpdatesLogger.EXPO_UPDATES_LOG_CATEGORY),
|
|
27
|
+
])
|
|
28
|
+
super.init()
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/// Internal initializer that lets tests redirect the log file by passing a unique category.
|
|
32
|
+
/// Two `PersistentFileLog` instances with the same category share an on-disk file at
|
|
33
|
+
/// `<AppSupport>/dev.expo.modules.core.logging.<category>.txt`; using a per-test category
|
|
34
|
+
/// keeps test runs from colliding with each other or with production callers.
|
|
35
|
+
internal init(category: String) {
|
|
36
|
+
self.category = category
|
|
37
|
+
self.logger = Logger(logHandlers: [
|
|
38
|
+
createOSLogHandler(category: category),
|
|
39
|
+
createPersistentFileLogHandler(category: category),
|
|
40
|
+
])
|
|
41
|
+
super.init()
|
|
42
|
+
}
|
|
24
43
|
|
|
25
44
|
// MARK: - Public logging functions
|
|
26
45
|
|
|
@@ -30,7 +49,10 @@ public final class UpdatesLogger: NSObject {
|
|
|
30
49
|
updateId: String?,
|
|
31
50
|
assetId: String?
|
|
32
51
|
) {
|
|
33
|
-
let entry = logEntryString(
|
|
52
|
+
let entry = logEntryString(
|
|
53
|
+
message: message, code: code, level: .trace,
|
|
54
|
+
duration: nil, updateId: updateId, assetId: assetId
|
|
55
|
+
)
|
|
34
56
|
logger.trace(entry)
|
|
35
57
|
}
|
|
36
58
|
|
|
@@ -51,7 +73,10 @@ public final class UpdatesLogger: NSObject {
|
|
|
51
73
|
updateId: String?,
|
|
52
74
|
assetId: String?
|
|
53
75
|
) {
|
|
54
|
-
let entry = logEntryString(
|
|
76
|
+
let entry = logEntryString(
|
|
77
|
+
message: message, code: code, level: .debug,
|
|
78
|
+
duration: nil, updateId: updateId, assetId: assetId
|
|
79
|
+
)
|
|
55
80
|
logger.debug(entry)
|
|
56
81
|
}
|
|
57
82
|
|
|
@@ -72,7 +97,10 @@ public final class UpdatesLogger: NSObject {
|
|
|
72
97
|
updateId: String?,
|
|
73
98
|
assetId: String?
|
|
74
99
|
) {
|
|
75
|
-
let entry = logEntryString(
|
|
100
|
+
let entry = logEntryString(
|
|
101
|
+
message: message, code: code, level: .info,
|
|
102
|
+
duration: nil, updateId: updateId, assetId: assetId
|
|
103
|
+
)
|
|
76
104
|
logger.info(entry)
|
|
77
105
|
}
|
|
78
106
|
|
|
@@ -93,7 +121,10 @@ public final class UpdatesLogger: NSObject {
|
|
|
93
121
|
updateId: String?,
|
|
94
122
|
assetId: String?
|
|
95
123
|
) {
|
|
96
|
-
let entry = logEntryString(
|
|
124
|
+
let entry = logEntryString(
|
|
125
|
+
message: message, code: code, level: .warn,
|
|
126
|
+
duration: nil, updateId: updateId, assetId: assetId
|
|
127
|
+
)
|
|
97
128
|
logger.warn(entry)
|
|
98
129
|
}
|
|
99
130
|
|
|
@@ -114,7 +145,10 @@ public final class UpdatesLogger: NSObject {
|
|
|
114
145
|
updateId: String?,
|
|
115
146
|
assetId: String?
|
|
116
147
|
) {
|
|
117
|
-
let entry = logEntryString(
|
|
148
|
+
let entry = logEntryString(
|
|
149
|
+
message: cause.localizedDescription, code: code, level: .error,
|
|
150
|
+
duration: nil, updateId: updateId, assetId: assetId
|
|
151
|
+
)
|
|
118
152
|
logger.error(entry)
|
|
119
153
|
}
|
|
120
154
|
|
|
@@ -131,7 +165,10 @@ public final class UpdatesLogger: NSObject {
|
|
|
131
165
|
updateId: String?,
|
|
132
166
|
assetId: String?
|
|
133
167
|
) {
|
|
134
|
-
let entry = logEntryString(
|
|
168
|
+
let entry = logEntryString(
|
|
169
|
+
message: cause.localizedDescription, code: code, level: .fatal,
|
|
170
|
+
duration: nil, updateId: updateId, assetId: assetId
|
|
171
|
+
)
|
|
135
172
|
logger.fatal(entry)
|
|
136
173
|
}
|
|
137
174
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-updates",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.6",
|
|
4
4
|
"description": "Fetches and manages remotely-hosted assets and updates to your app's JS bundle.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"picomatch": "^4.0.4",
|
|
61
61
|
"ts-node": "^10.9.2",
|
|
62
62
|
"xstate": "^4.37.2",
|
|
63
|
-
"expo": "57.0.
|
|
64
|
-
"
|
|
63
|
+
"@expo/metro-config": "57.0.3",
|
|
64
|
+
"expo": "57.0.2",
|
|
65
65
|
"expo-module-scripts": "56.0.3",
|
|
66
|
-
"expo-dev-client": "57.0.
|
|
66
|
+
"expo-dev-client": "57.0.5"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"expo": "*",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"./scripts/with-node.sh"
|
|
83
83
|
]
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "5104cb89c3938bc9653e0cbad43da3a43a2e77a7",
|
|
86
86
|
"scripts": {
|
|
87
87
|
"build": "expo-module build",
|
|
88
88
|
"clean": "expo-module clean",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["./src/index.ts","./src/withupdates.ts"],"version":"6.0.3"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["./src/createfingerprintasync.ts","./src/createfingerprintforbuildasync.ts","./src/createmanifestforbuildasync.ts","./src/createupdatesresources.ts","./src/filterplatformassetscales.ts","./src/findupprojectroot.ts","./src/resolveruntimeversionasync.ts","./src/vcs.ts","./src/workflow.ts"],"version":"6.0.3"}
|