react-native-update 10.28.7 → 10.28.9
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/android/build.gradle
CHANGED
|
@@ -78,7 +78,7 @@ if (expoProject) {
|
|
|
78
78
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
79
79
|
apply from: expoModulesCorePlugin
|
|
80
80
|
applyKotlinExpoModulesCorePlugin()
|
|
81
|
-
useExpoPublishing()
|
|
81
|
+
// useExpoPublishing()
|
|
82
82
|
useCoreDependencies()
|
|
83
83
|
} else {
|
|
84
84
|
group = 'cn.reactnative.modules.update'
|
|
@@ -148,7 +148,6 @@ repositories {
|
|
|
148
148
|
dependencies {
|
|
149
149
|
implementation 'com.facebook.react:react-native:+'
|
|
150
150
|
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.0'
|
|
151
|
-
implementation 'com.jakewharton:process-phoenix:3.0.0'
|
|
152
151
|
}
|
|
153
152
|
if (isNewArchitectureEnabled()) {
|
|
154
153
|
react {
|
|
@@ -3,7 +3,7 @@ import fileIo from '@ohos.file.fs';
|
|
|
3
3
|
import common from '@ohos.app.ability.common';
|
|
4
4
|
import { UpdateContext } from './UpdateContext';
|
|
5
5
|
|
|
6
|
-
export class
|
|
6
|
+
export class PushyFileJSBundleProvider extends JSBundleProvider {
|
|
7
7
|
private updateContext: UpdateContext;
|
|
8
8
|
private filePath: string = ''
|
|
9
9
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-update",
|
|
3
|
-
"version": "10.28.
|
|
3
|
+
"version": "10.28.9",
|
|
4
4
|
"description": "react-native hot update",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"scripts": {
|
|
@@ -57,24 +57,20 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@babel/core": "^7.25.8",
|
|
59
59
|
"@react-native/babel-preset": "^0.73.21",
|
|
60
|
-
"@react-native/eslint-config": "
|
|
61
|
-
"@react-native/typescript-config": "
|
|
62
|
-
"@types/
|
|
63
|
-
"@types/
|
|
64
|
-
"@types/node": "^22.7.6",
|
|
60
|
+
"@react-native/eslint-config": "0.79.1",
|
|
61
|
+
"@react-native/typescript-config": "0.79.1",
|
|
62
|
+
"@types/jest": "^29.5.14",
|
|
63
|
+
"@types/node": "^22.15.2",
|
|
65
64
|
"@types/react": "^18.3.11",
|
|
66
|
-
"detox": "^20.
|
|
65
|
+
"detox": "^20.37.0",
|
|
67
66
|
"eslint": "^8.57.0",
|
|
68
|
-
"eslint-plugin-ft-flow": "^3.0.7",
|
|
69
67
|
"firebase-tools": "^13.22.1",
|
|
70
|
-
"fs-extra": "^11.2.0",
|
|
71
68
|
"jest": "^29.7.0",
|
|
72
|
-
"pod-install": "^0.
|
|
69
|
+
"pod-install": "^0.3.7",
|
|
73
70
|
"prettier": "^2",
|
|
74
71
|
"react": "18.2.0",
|
|
75
72
|
"react-native": "0.73",
|
|
76
|
-
"ts-jest": "^29.2
|
|
73
|
+
"ts-jest": "^29.3.2",
|
|
77
74
|
"typescript": "^5.6.3"
|
|
78
|
-
}
|
|
79
|
-
"packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72"
|
|
75
|
+
}
|
|
80
76
|
}
|
|
@@ -9,7 +9,6 @@ podspec_dir = File.dirname(__FILE__)
|
|
|
9
9
|
Pod::Spec.new do |s|
|
|
10
10
|
|
|
11
11
|
is_expo_in_podfile = false
|
|
12
|
-
is_version_sufficient = false
|
|
13
12
|
begin
|
|
14
13
|
# Check Podfile for use_expo_modules!
|
|
15
14
|
podfile_path = File.join(Pod::Config.instance.installation_root, 'Podfile')
|
|
@@ -17,24 +16,67 @@ Pod::Spec.new do |s|
|
|
|
17
16
|
podfile_content = File.read(podfile_path)
|
|
18
17
|
is_expo_in_podfile = podfile_content.include?('use_expo_modules!')
|
|
19
18
|
end
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
rescue => e
|
|
20
|
+
# Silently ignore errors during check
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Determine final validity by checking Podfile presence AND Expo version
|
|
24
|
+
valid_expo_project = false # Default
|
|
25
|
+
if is_expo_in_podfile
|
|
26
|
+
# Only check expo version if use_expo_modules! is present
|
|
27
|
+
is_version_sufficient = false
|
|
28
|
+
begin
|
|
29
|
+
expo_version_str = `node --print \"require('expo/package.json').version\"`.strip
|
|
30
|
+
if expo_version_str && !expo_version_str.empty?
|
|
31
|
+
match = expo_version_str.match(/^\d+/)
|
|
27
32
|
if match
|
|
28
33
|
major_version = match[0].to_i
|
|
29
34
|
is_version_sufficient = major_version >= 50
|
|
30
35
|
end
|
|
31
36
|
end
|
|
37
|
+
rescue
|
|
38
|
+
# Node command failed, version remains insufficient
|
|
32
39
|
end
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
|
|
41
|
+
# Final check
|
|
42
|
+
valid_expo_project = is_version_sufficient
|
|
35
43
|
end
|
|
36
|
-
|
|
37
|
-
|
|
44
|
+
|
|
45
|
+
# Set platform based on whether it's a valid Expo project and if we can parse its target
|
|
46
|
+
final_ios_deployment_target = '11.0' # Default target
|
|
47
|
+
|
|
48
|
+
if valid_expo_project
|
|
49
|
+
# --- Try to find and parse ExpoModulesCore.podspec only if it's an Expo project ---
|
|
50
|
+
parsed_expo_ios_target = nil
|
|
51
|
+
expo_modules_core_podspec_path = begin
|
|
52
|
+
package_json_path = `node -p "require.resolve('expo-modules-core/package.json')"`.strip
|
|
53
|
+
File.join(File.dirname(package_json_path), 'ExpoModulesCore.podspec') if $?.success? && package_json_path && !package_json_path.empty?
|
|
54
|
+
rescue
|
|
55
|
+
nil
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
if expo_modules_core_podspec_path && File.exist?(expo_modules_core_podspec_path)
|
|
59
|
+
begin
|
|
60
|
+
content = File.read(expo_modules_core_podspec_path)
|
|
61
|
+
match = content.match(/s\.platforms\s*=\s*\{[\s\S]*?:ios\s*=>\s*'([^\']+)'/) # Match within s.platforms hash
|
|
62
|
+
if match && match[1]
|
|
63
|
+
parsed_expo_ios_target = match[1]
|
|
64
|
+
else
|
|
65
|
+
match = content.match(/s\.platform\s*=\s*:ios,\s*'([^\']+)'/) # Fallback to s.platform = :ios, 'version'
|
|
66
|
+
if match && match[1]
|
|
67
|
+
parsed_expo_ios_target = match[1]
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
rescue => e
|
|
71
|
+
# Pod::UI.warn "Failed to read or parse ExpoModulesCore.podspec content: #{e.message}"
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
if parsed_expo_ios_target
|
|
75
|
+
final_ios_deployment_target = parsed_expo_ios_target
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
s.platforms = { :ios => final_ios_deployment_target }
|
|
38
80
|
|
|
39
81
|
s.name = package['name']
|
|
40
82
|
s.version = package['version']
|
|
@@ -45,8 +87,7 @@ Pod::Spec.new do |s|
|
|
|
45
87
|
s.homepage = package['homepage']
|
|
46
88
|
|
|
47
89
|
s.cocoapods_version = '>= 1.6.0'
|
|
48
|
-
|
|
49
|
-
s.platforms = { :ios => "11.0" }
|
|
90
|
+
|
|
50
91
|
s.source = { :git => 'https://github.com/reactnativecn/react-native-update.git', :tag => '#{s.version}' }
|
|
51
92
|
|
|
52
93
|
# Conditionally set source files
|
|
@@ -92,20 +133,26 @@ Pod::Spec.new do |s|
|
|
|
92
133
|
# Conditionally add Expo subspec and check ExpoModulesCore version
|
|
93
134
|
if valid_expo_project
|
|
94
135
|
supports_bundle_url_final = false # Default
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
136
|
+
|
|
137
|
+
# 1. Try executing node to get the version string
|
|
138
|
+
expo_modules_core_version_str = begin
|
|
139
|
+
# Use node to directly require expo-modules-core/package.json and get its version
|
|
140
|
+
`node --print \"require('expo-modules-core/package.json').version\"` # Execute, keep raw output
|
|
141
|
+
rescue
|
|
142
|
+
# Node command failed (e.g., node not found, package not found). Return empty string.
|
|
143
|
+
''
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# 2. Process the obtained version string (if not empty)
|
|
147
|
+
if expo_modules_core_version_str && !expo_modules_core_version_str.empty?
|
|
148
|
+
begin
|
|
149
|
+
# Compare versions using Gem::Version (handles trailing newline)
|
|
150
|
+
installed_version = Gem::Version.new(expo_modules_core_version_str)
|
|
103
151
|
target_version = Gem::Version.new('1.12.0')
|
|
104
152
|
supports_bundle_url_final = installed_version >= target_version
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
# Pod::UI.warn "Could not check ExpoModulesCore version: #{e.message}"
|
|
153
|
+
rescue ArgumentError
|
|
154
|
+
# If Gem::Version fails parsing, supports_bundle_url_final remains false.
|
|
155
|
+
end
|
|
109
156
|
end
|
|
110
157
|
|
|
111
158
|
s.subspec 'Expo' do |ss|
|