@onekeyfe/react-native-perf-memory 3.0.85 → 3.0.87

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.
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativeperfmemory {
17
17
  using namespace facebook;
18
18
 
19
19
  /**
20
- * The C++ JNI bridge between the C++ struct "MemoryUsage" and the the Kotlin data class "MemoryUsage".
20
+ * The C++ JNI bridge between the C++ struct "MemoryUsage" and the Kotlin data class "MemoryUsage".
21
21
  */
22
22
  struct JMemoryUsage final: public jni::JavaClass<JMemoryUsage> {
23
23
  public:
@@ -10,6 +10,7 @@ package com.margelo.nitro.reactnativeperfmemory
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
 
@@ -43,6 +44,7 @@ abstract class HybridReactNativePerfMemorySpec: HybridObject() {
43
44
  @Keep
44
45
  protected open class CxxPart(javaPart: HybridReactNativePerfMemorySpec): HybridObject.CxxPart(javaPart) {
45
46
  // C++ JHybridReactNativePerfMemorySpec::CxxPart::initHybrid(...)
47
+ @FastNative
46
48
  external override fun initHybrid(): HybridData
47
49
  }
48
50
  override fun createCxxPart(): CxxPart {
@@ -9,6 +9,7 @@ package com.margelo.nitro.reactnativeperfmemory
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
  /**
@@ -23,6 +24,18 @@ data class MemoryUsage(
23
24
  ) {
24
25
  /* primary constructor */
25
26
 
27
+ override fun equals(other: Any?): Boolean {
28
+ if (this === other) return true
29
+ if (other !is MemoryUsage) return false
30
+ return Objects.deepEquals(this.rss, other.rss)
31
+ }
32
+
33
+ override fun hashCode(): Int {
34
+ return arrayOf<Any?>(
35
+ rss
36
+ ).contentDeepHashCode()
37
+ }
38
+
26
39
  companion object {
27
40
  /**
28
41
  * 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-memory",
3
- "version": "3.0.85",
3
+ "version": "3.0.87",
4
4
  "description": "react-native-perf-memory",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -78,12 +78,12 @@
78
78
  "eslint-plugin-prettier": "^5.5.4",
79
79
  "jest": "^29.7.0",
80
80
  "lefthook": "^2.0.3",
81
- "nitrogen": "0.35.2",
81
+ "nitrogen": "0.36.5",
82
82
  "prettier": "^2.8.8",
83
83
  "react": "19.2.0",
84
84
  "react-native": "patch:react-native@npm%3A0.83.0#~/.yarn/patches/react-native-npm-0.83.0-577d0f2d83.patch",
85
85
  "react-native-builder-bob": "^0.40.13",
86
- "react-native-nitro-modules": "0.35.2",
86
+ "react-native-nitro-modules": "0.36.5",
87
87
  "release-it": "^19.0.4",
88
88
  "turbo": "^2.5.6",
89
89
  "typescript": "^5.9.2"
@@ -91,7 +91,7 @@
91
91
  "peerDependencies": {
92
92
  "react": "*",
93
93
  "react-native": "*",
94
- "react-native-nitro-modules": "0.35.2"
94
+ "react-native-nitro-modules": "0.36.5"
95
95
  },
96
96
  "react-native-builder-bob": {
97
97
  "source": "src",