@expensify/react-native-live-markdown 0.1.342 → 0.1.343

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
@@ -221,11 +221,12 @@ Currently, `react-native-live-markdown` supports only [ExpensiMark](https://gith
221
221
 
222
222
  ### `react-native-worklets` compatibility
223
223
 
224
- | | 0.6.x | 0.7.x | 0.8.x | 0.9.x | 0.10.2+ |
225
- |:-----------------:|:-----:|:-----:|:-----:|:-----:|:-------:|
226
- | 0.1.333+ | ❌ | ✅ | ✅ | ✅ | ✅ |
227
- | 0.1.321 – 0.1.332 | ❌ | ✅ | ✅ | ✅ | ❌ |
228
- | 0.1.308 – 0.1.320 | ✅ | ❌ | ❌ | ❌ | ❌ |
224
+ | | 0.6.x | 0.7.x | 0.8.x | 0.9.x | 0.10.2 – 0.11.x | 0.12.x | 0.13.x |
225
+ |:-----------------:|:-----:|:-----:|:-----:|:-----:|:---------------:|:------:|:------:|
226
+ | 0.1.343+ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
227
+ | 0.1.333 – 0.1.342 | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
228
+ | 0.1.321 – 0.1.332 | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
229
+ | 0.1.308 – 0.1.320 | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
229
230
 
230
231
 
231
232
  ## License
@@ -17,7 +17,7 @@ namespace livemarkdown {
17
17
  const auto markdownWorklet = expensify::livemarkdown::getMarkdownWorklet(parserId);
18
18
 
19
19
  const auto input = jsi::String::createFromUtf8(rt, text->toStdString());
20
- const auto output = markdownRuntime->runGuarded(markdownWorklet, input);
20
+ const auto output = markdownRuntime->runSync(markdownWorklet, input);
21
21
 
22
22
  const auto json = rt.global().getPropertyAsObject(rt, "JSON").getPropertyAsFunction(rt, "stringify").call(rt, output).asString(rt).utf8(rt);
23
23
  return jni::make_jstring(json);
@@ -44,7 +44,7 @@ public class MarkdownParser {
44
44
  Systrace.beginSection(0, "nativeParse");
45
45
  json = nativeParse(text, parserId);
46
46
  } catch (Exception e) {
47
- // Skip formatting, runGuarded will show the error in LogBox
47
+ // Skip formatting, runSync shows the error in LogBox in debug builds and throws in release builds
48
48
  mPrevText = text;
49
49
  mPrevParserId = parserId;
50
50
  mPrevMarkdownRanges = Collections.emptyList();
@@ -223,9 +223,9 @@ static const NSUInteger kMarkdownParserCacheCapacity = 4;
223
223
 
224
224
  jsi::Value output;
225
225
  try {
226
- output = markdownRuntime->runGuarded(markdownWorklet, input);
226
+ output = markdownRuntime->runSync(markdownWorklet, input);
227
227
  } catch (const jsi::JSError &error) {
228
- // Skip formatting, runGuarded will show the error in LogBox
228
+ // Skip formatting, runSync shows the error in LogBox in debug builds and throws in release builds
229
229
  return @[];
230
230
  }
231
231
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expensify/react-native-live-markdown",
3
- "version": "0.1.342",
3
+ "version": "0.1.343",
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",