mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-27 19:52:49 +00:00
fix(app): regenerate iOS Markdown inline code props
This commit is contained in:
@@ -3770,3 +3770,60 @@ index eaa3279..05a02eb 100644
|
||||
private:
|
||||
int forceHeightRecalculationCounter_{0};
|
||||
std::shared_ptr<MarkdownTextMeasurementManager> measurementsManager_;
|
||||
diff --git a/node_modules/react-native-enriched-markdown/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.h b/node_modules/react-native-enriched-markdown/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.h
|
||||
--- a/node_modules/react-native-enriched-markdown/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.h
|
||||
+++ b/node_modules/react-native-enriched-markdown/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.h
|
||||
@@ -1639,6 +1639,7 @@
|
||||
struct EnrichedMarkdownMarkdownStyleCodeStruct {
|
||||
std::string fontFamily{};
|
||||
Float fontSize{0.0};
|
||||
+ Float fontScale{0.0};
|
||||
SharedColor color{};
|
||||
SharedColor backgroundColor{};
|
||||
SharedColor borderColor{};
|
||||
@@ -1651,6 +1652,7 @@
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result["fontFamily"] = fontFamily;
|
||||
result["fontSize"] = fontSize;
|
||||
+ result["fontScale"] = fontScale;
|
||||
result["color"] = ::facebook::react::toDynamic(color);
|
||||
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
||||
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
||||
@@ -1670,6 +1672,10 @@
|
||||
if (tmp_fontSize != map.end()) {
|
||||
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
||||
}
|
||||
+ auto tmp_fontScale = map.find("fontScale");
|
||||
+ if (tmp_fontScale != map.end()) {
|
||||
+ fromRawValue(context, tmp_fontScale->second, result.fontScale);
|
||||
+ }
|
||||
auto tmp_color = map.find("color");
|
||||
if (tmp_color != map.end()) {
|
||||
fromRawValue(context, tmp_color->second, result.color);
|
||||
@@ -6185,6 +6191,7 @@
|
||||
struct EnrichedMarkdownTextMarkdownStyleCodeStruct {
|
||||
std::string fontFamily{};
|
||||
Float fontSize{0.0};
|
||||
+ Float fontScale{0.0};
|
||||
SharedColor color{};
|
||||
SharedColor backgroundColor{};
|
||||
SharedColor borderColor{};
|
||||
@@ -6197,6 +6204,7 @@
|
||||
folly::dynamic result = folly::dynamic::object();
|
||||
result["fontFamily"] = fontFamily;
|
||||
result["fontSize"] = fontSize;
|
||||
+ result["fontScale"] = fontScale;
|
||||
result["color"] = ::facebook::react::toDynamic(color);
|
||||
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
||||
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
||||
@@ -6216,6 +6224,10 @@
|
||||
if (tmp_fontSize != map.end()) {
|
||||
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
||||
}
|
||||
+ auto tmp_fontScale = map.find("fontScale");
|
||||
+ if (tmp_fontScale != map.end()) {
|
||||
+ fromRawValue(context, tmp_fontScale->second, result.fontScale);
|
||||
+ }
|
||||
auto tmp_color = map.find("color");
|
||||
if (tmp_color != map.end()) {
|
||||
fromRawValue(context, tmp_color->second, result.color);
|
||||
|
||||
@@ -10,6 +10,38 @@ const bin = path.resolve("node_modules", ".bin");
|
||||
const packageName = "react-native-draggable-flatlist";
|
||||
const patchFile = `${packageName}+4.0.3.patch`;
|
||||
|
||||
test("patched Markdown ships iOS props generated from its native specs", () => {
|
||||
const packageDir = path.resolve("packages/app/node_modules/react-native-enriched-markdown");
|
||||
const output = mkdtempSync(path.join(tmpdir(), "markdown-ios-codegen-"));
|
||||
try {
|
||||
// includesGeneratedCode makes CocoaPods use the shipped headers instead of
|
||||
// regenerating them after patch-package changes the TypeScript specs.
|
||||
const result = spawnSync(
|
||||
process.execPath,
|
||||
[
|
||||
path.resolve("node_modules/react-native/scripts/generate-codegen-artifacts.js"),
|
||||
"-p",
|
||||
packageDir,
|
||||
"-t",
|
||||
"ios",
|
||||
"-o",
|
||||
output,
|
||||
"-s",
|
||||
"library",
|
||||
],
|
||||
{ encoding: "utf8" },
|
||||
);
|
||||
assert.equal(result.status, 0, result.stdout + result.stderr);
|
||||
const header = "ReactCodegen/EnrichedMarkdownTextSpec/Props.h";
|
||||
assert.equal(
|
||||
readFileSync(path.join(packageDir, "ios/generated", header), "utf8"),
|
||||
readFileSync(path.join(output, header), "utf8"),
|
||||
);
|
||||
} finally {
|
||||
rmSync(output, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
function createCheckout() {
|
||||
const root = mkdtempSync(path.join(tmpdir(), "postinstall-patches-"));
|
||||
writeFileSync(path.join(root, "package.json"), JSON.stringify({ name: "checkout" }));
|
||||
|
||||
Reference in New Issue
Block a user