@onekeyfe/react-native-perf-stats 3.0.86 → 3.0.88

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.
@@ -18,7 +18,7 @@ namespace margelo::nitro::reactnativeperfstats {
18
18
  using namespace facebook;
19
19
 
20
20
  /**
21
- * The C++ JNI bridge between the C++ struct "MemoryWarningEvent" and the the Kotlin data class "MemoryWarningEvent".
21
+ * The C++ JNI bridge between the C++ struct "MemoryWarningEvent" and the Kotlin data class "MemoryWarningEvent".
22
22
  */
23
23
  struct JMemoryWarningEvent final: public jni::JavaClass<JMemoryWarningEvent> {
24
24
  public:
@@ -15,7 +15,7 @@ namespace margelo::nitro::reactnativeperfstats {
15
15
  using namespace facebook;
16
16
 
17
17
  /**
18
- * The C++ JNI bridge between the C++ enum "MemoryWarningLevel" and the the Kotlin enum "MemoryWarningLevel".
18
+ * The C++ JNI bridge between the C++ enum "MemoryWarningLevel" and the Kotlin enum "MemoryWarningLevel".
19
19
  */
20
20
  struct JMemoryWarningLevel final: public jni::JavaClass<JMemoryWarningLevel> {
21
21
  public:
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativeperfstats {
17
17
  using namespace facebook;
18
18
 
19
19
  /**
20
- * The C++ JNI bridge between the C++ struct "PerfSample" and the the Kotlin data class "PerfSample".
20
+ * The C++ JNI bridge between the C++ struct "PerfSample" and the Kotlin data class "PerfSample".
21
21
  */
22
22
  struct JPerfSample final: public jni::JavaClass<JPerfSample> {
23
23
  public:
@@ -10,7 +10,6 @@ package com.margelo.nitro.reactnativeperfstats
10
10
  import androidx.annotation.Keep
11
11
  import com.facebook.jni.HybridData
12
12
  import com.facebook.proguard.annotations.DoNotStrip
13
- import dalvik.annotation.optimization.FastNative
14
13
 
15
14
 
16
15
  /**
@@ -59,7 +58,6 @@ class Func_void_MemoryWarningEvent_cxx: Func_void_MemoryWarningEvent {
59
58
  override fun invoke(event: MemoryWarningEvent): Unit
60
59
  = invoke_cxx(event)
61
60
 
62
- @FastNative
63
61
  private external fun invoke_cxx(event: MemoryWarningEvent): Unit
64
62
  }
65
63
 
@@ -10,6 +10,7 @@ package com.margelo.nitro.reactnativeperfstats
10
10
  import androidx.annotation.Keep
11
11
  import com.facebook.jni.HybridData
12
12
  import com.facebook.proguard.annotations.DoNotStrip
13
+ import dalvik.annotation.optimization.FastNative
13
14
  import com.margelo.nitro.core.Promise
14
15
  import com.margelo.nitro.core.HybridObject
15
16
 
@@ -80,6 +81,7 @@ abstract class HybridReactNativePerfStatsSpec: HybridObject() {
80
81
  @Keep
81
82
  protected open class CxxPart(javaPart: HybridReactNativePerfStatsSpec): HybridObject.CxxPart(javaPart) {
82
83
  // C++ JHybridReactNativePerfStatsSpec::CxxPart::initHybrid(...)
84
+ @FastNative
83
85
  external override fun initHybrid(): HybridData
84
86
  }
85
87
  override fun createCxxPart(): CxxPart {
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativeperfstats
9
9
 
10
10
  import androidx.annotation.Keep
11
11
  import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
12
13
 
13
14
 
14
15
  /**
@@ -29,6 +30,22 @@ data class MemoryWarningEvent(
29
30
  ) {
30
31
  /* primary constructor */
31
32
 
33
+ override fun equals(other: Any?): Boolean {
34
+ if (this === other) return true
35
+ if (other !is MemoryWarningEvent) return false
36
+ return Objects.deepEquals(this.level, other.level)
37
+ && Objects.deepEquals(this.rss, other.rss)
38
+ && Objects.deepEquals(this.timestamp, other.timestamp)
39
+ }
40
+
41
+ override fun hashCode(): Int {
42
+ return arrayOf<Any?>(
43
+ level,
44
+ rss,
45
+ timestamp
46
+ ).contentDeepHashCode()
47
+ }
48
+
32
49
  companion object {
33
50
  /**
34
51
  * Constructor called from C++
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativeperfstats
9
9
 
10
10
  import androidx.annotation.Keep
11
11
  import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
12
13
 
13
14
 
14
15
  /**
@@ -35,6 +36,26 @@ data class PerfSample(
35
36
  ) {
36
37
  /* primary constructor */
37
38
 
39
+ override fun equals(other: Any?): Boolean {
40
+ if (this === other) return true
41
+ if (other !is PerfSample) return false
42
+ return Objects.deepEquals(this.cpu, other.cpu)
43
+ && Objects.deepEquals(this.rss, other.rss)
44
+ && Objects.deepEquals(this.uiFps, other.uiFps)
45
+ && Objects.deepEquals(this.jsFps, other.jsFps)
46
+ && Objects.deepEquals(this.timestamp, other.timestamp)
47
+ }
48
+
49
+ override fun hashCode(): Int {
50
+ return arrayOf<Any?>(
51
+ cpu,
52
+ rss,
53
+ uiFps,
54
+ jsFps,
55
+ timestamp
56
+ ).contentDeepHashCode()
57
+ }
58
+
38
59
  companion object {
39
60
  /**
40
61
  * Constructor called from C++
@@ -56,5 +56,7 @@ def add_nitrogen_files(spec)
56
56
  "SWIFT_OBJC_INTEROP_MODE" => "objcxx",
57
57
  # Enables stricter modular headers
58
58
  "DEFINES_MODULE" => "YES",
59
+ # Disable auto-generated ObjC header for Swift (Static linkage on Xcode 26.4 breaks here)
60
+ "SWIFT_INSTALL_OBJC_HEADER" => "NO",
59
61
  })
60
62
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-perf-stats",
3
- "version": "3.0.86",
3
+ "version": "3.0.88",
4
4
  "description": "react-native-perf-stats",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -77,12 +77,12 @@
77
77
  "eslint-plugin-prettier": "^5.5.4",
78
78
  "jest": "^29.7.0",
79
79
  "lefthook": "^2.0.3",
80
- "nitrogen": "0.35.2",
80
+ "nitrogen": "0.36.5",
81
81
  "prettier": "^2.8.8",
82
82
  "react": "19.2.0",
83
83
  "react-native": "0.83.0",
84
84
  "react-native-builder-bob": "^0.40.13",
85
- "react-native-nitro-modules": "0.35.2",
85
+ "react-native-nitro-modules": "0.36.5",
86
86
  "release-it": "^19.0.4",
87
87
  "turbo": "^2.5.6",
88
88
  "typescript": "^5.9.2"
@@ -90,7 +90,7 @@
90
90
  "peerDependencies": {
91
91
  "react": "*",
92
92
  "react-native": "*",
93
- "react-native-nitro-modules": "0.35.2"
93
+ "react-native-nitro-modules": "0.36.5"
94
94
  },
95
95
  "react-native-builder-bob": {
96
96
  "source": "src",