@expensify/react-native-live-markdown 0.1.239 → 0.1.241

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/README.md CHANGED
@@ -20,7 +20,7 @@ npm install @expensify/react-native-live-markdown react-native-reanimated expens
20
20
  npx expo install @expensify/react-native-live-markdown react-native-reanimated expensify-common
21
21
  ```
22
22
 
23
- React Native Live Markdown requires [react-native-reanimated](https://github.com/software-mansion/react-native-reanimated) 3.16.4 or newer and [expensify-common](https://github.com/Expensify/expensify-common) 2.0.108 or newer.
23
+ React Native Live Markdown requires [react-native-reanimated](https://github.com/software-mansion/react-native-reanimated) 3.17.0 or newer and [expensify-common](https://github.com/Expensify/expensify-common) 2.0.115 or newer.
24
24
 
25
25
  Then, install the iOS dependencies with CocoaPods:
26
26
 
@@ -9,6 +9,10 @@ buildscript {
9
9
  }
10
10
  }
11
11
 
12
+ task prepareKotlinBuildScriptModel {
13
+ // This task is run during Gradle Sync in Android Studio.
14
+ }
15
+
12
16
  def reactNativeArchitectures() {
13
17
  def value = project.getProperties().get("reactNativeArchitectures")
14
18
  return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
@@ -193,3 +197,12 @@ if (isNewArchitectureEnabled()) {
193
197
  codegenJavaPackageName = "com.expensify.livemarkdown"
194
198
  }
195
199
  }
200
+
201
+ // This fixes linking errors due to undefined symbols from libworklets.so.
202
+ // During Gradle Sync, Android Gradle Plugin runs Prefab and treats worklets
203
+ // like a header-only library. During build, config files are not regenerated
204
+ // because the cache key does not change and AGP thinks that they are up-to-date.
205
+ afterEvaluate {
206
+ prepareKotlinBuildScriptModel.dependsOn(":react-native-reanimated:prefabDebugPackage")
207
+ prepareKotlinBuildScriptModel.dependsOn(":react-native-reanimated:prefabReleasePackage")
208
+ }
@@ -11,9 +11,6 @@ namespace livemarkdown {
11
11
  jni::alias_ref<jhybridobject> jThis,
12
12
  jni::alias_ref<jni::JString> text,
13
13
  const int parserId) {
14
- static std::mutex workletRuntimeMutex; // this needs to be global since the worklet runtime is also global
15
- const auto lock = std::lock_guard<std::mutex>(workletRuntimeMutex);
16
-
17
14
  const auto markdownRuntime = expensify::livemarkdown::getMarkdownRuntime();
18
15
  jsi::Runtime &rt = markdownRuntime->getJSIRuntime();
19
16
 
@@ -1,7 +1,6 @@
1
1
  #import "MarkdownParser.h"
2
2
  #import <RNLiveMarkdown/MarkdownGlobal.h>
3
3
  #import <React/RCTLog.h>
4
- #import <mutex>
5
4
 
6
5
  @implementation MarkdownParser {
7
6
  NSString *_prevText;
@@ -17,9 +16,6 @@
17
16
  return _prevMarkdownRanges;
18
17
  }
19
18
 
20
- static std::mutex workletRuntimeMutex; // this needs to be global since the worklet runtime is also global
21
- const auto lock = std::lock_guard<std::mutex>(workletRuntimeMutex);
22
-
23
19
  const auto &markdownRuntime = expensify::livemarkdown::getMarkdownRuntime();
24
20
  jsi::Runtime &rt = markdownRuntime->getJSIRuntime();
25
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expensify/react-native-live-markdown",
3
- "version": "0.1.239",
3
+ "version": "0.1.241",
4
4
  "description": "Drop-in replacement for React Native's TextInput component with Markdown formatting.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -96,7 +96,7 @@
96
96
  "react": "18.3.1",
97
97
  "react-native": "0.77.0",
98
98
  "react-native-builder-bob": "^0.20.0",
99
- "react-native-reanimated": "3.16.7",
99
+ "react-native-reanimated": "3.17.0",
100
100
  "react-native-web": "^0.19.10",
101
101
  "release-it": "^15.0.0",
102
102
  "turbo": "^1.10.7",
@@ -106,7 +106,7 @@
106
106
  "expensify-common": ">=2.0.115",
107
107
  "react": "*",
108
108
  "react-native": "*",
109
- "react-native-reanimated": ">=3.16.4"
109
+ "react-native-reanimated": ">=3.17.0"
110
110
  },
111
111
  "workspaces": [
112
112
  "./example",