Skip to content

Commit e0ab1af

Browse files
committed
fix: Node PDF annotations + PHP risky test CI failures
- Add missing fields to normalizePdfConfig in config-normalizer.ts (extractAnnotations, hierarchy, topMarginFraction, bottomMarginFraction) - Add assertion to PHP e2e generator for clear_registry tests without verify_cleanup to prevent PHPUnit risky test warnings - Regenerate PHP e2e tests
1 parent ed1fd49 commit e0ab1af

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

crates/kreuzberg-node/typescript/core/config-normalizer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ function normalizePdfConfig(pdf?: PdfConfig): NativeExtractionConfig | undefined
152152
setIfDefined(normalized, "extractImages", pdf.extractImages);
153153
setIfDefined(normalized, "passwords", pdf.passwords);
154154
setIfDefined(normalized, "extractMetadata", pdf.extractMetadata);
155+
setIfDefined(normalized, "hierarchy", pdf.hierarchy);
156+
setIfDefined(normalized, "extractAnnotations", pdf.extractAnnotations);
157+
setIfDefined(normalized, "topMarginFraction", pdf.topMarginFraction);
158+
setIfDefined(normalized, "bottomMarginFraction", pdf.bottomMarginFraction);
155159
return normalized;
156160
}
157161

e2e/php/tests/PluginApisTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ public function test_ocr_backends_unregister(): void
168168
public function test_post_processors_clear(): void
169169
{
170170
Kreuzberg::clearPostProcessors();
171+
$this->assertTrue(true); // Should not throw
171172
}
172173

173174
/**

tools/e2e-generator/src/php.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,8 @@ fn generate_clear_registry_test(_fixture: &Fixture, test_spec: &PluginTestSpec,
15591559
let list_func = func_name.replace("clear", "list");
15601560
writeln!(buf, " $result = Kreuzberg::{}();", list_func)?;
15611561
writeln!(buf, " $this->assertEmpty($result);")?;
1562+
} else {
1563+
writeln!(buf, " $this->assertTrue(true); // Should not throw")?;
15621564
}
15631565

15641566
Ok(())

0 commit comments

Comments
 (0)