From 4e8ecccd3dfe94f3ac14425623a874b60d464f98 Mon Sep 17 00:00:00 2001 From: Danny Rorabaugh Date: Mon, 27 Apr 2026 10:04:31 -0400 Subject: [PATCH 1/2] Clean-up incomplete changes --- README.md | 2 +- jest.config.ts | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5bd167a7..19095041 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ The general file structure for an extension is as follows: - `src/` contains the source code for the extension - `src/main.ts` is the main entry file for the extension (registers commands and wires interlinear XML) - `src/types/interlinearizer.d.ts` is this extension's types file that defines how other extensions can use this extension through the `papi`. It is copied into the build folder - - `src/parsers/interlinearXmlParser.ts` parses interlinear XML into structured data (uses fast-xml-parser). The PT9 XML schema and parsed output are documented in `src/parsers/pt9-xml.md` + - `src/parsers/pt9/` contains parser and schema for parsing PT9 interlinear XML into structured data - `*.web-view.tsx` files will be treated as React WebViews - `*.web-view.scss` files provide styles for WebViews - `*.web-view.html` files are a conventional way to provide HTML WebViews (no special functionality) diff --git a/jest.config.ts b/jest.config.ts index b12ee344..7bbd34bb 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -92,15 +92,12 @@ const config: Config = { '^@papi/frontend/react$': '/__mocks__/papi-frontend-react.ts', /** Mock so test-helpers get UnsubscriberAsyncList without loading ESM deps. */ '^platform-bible-utils$': '/__mocks__/platform-bible-utils.ts', - /** Mock platform-bible-react and lucide-react — both ship ESM that Jest cannot parse. */ + /** Mock ESM deps that Jest cannot parse. */ '^platform-bible-react$': '/__mocks__/platform-bible-react.tsx', - '^lucide-react$': '/__mocks__/lucide-react.tsx', /** Resolve webpack ?inline imports. */ '^(.+)\\.web-view\\?inline$': '/__mocks__/web-view-inline.ts', /** Resolve webpack ?inline imports: SCSS content. */ '^(.+)\\.(scss|sass|css)\\?inline$': '/__mocks__/styleInlineMock.ts', - /** Resolve webpack ?raw import for test XML in web-view. */ - '^(.+)/Interlinear_en_MAT\\.xml\\?raw$': '/__mocks__/interlinearXmlContent.ts', }, /** Exclude dist from module resolution to avoid Haste naming collision with root package.json. */ From 79782218a015507b676bda05d5e21ef05fa08728 Mon Sep 17 00:00:00 2001 From: Danny Rorabaugh Date: Mon, 27 Apr 2026 10:18:38 -0400 Subject: [PATCH 2/2] Update overlooked path --- src/parsers/pt9/pt9-xml.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parsers/pt9/pt9-xml.md b/src/parsers/pt9/pt9-xml.md index 56d0baac..b570279e 100644 --- a/src/parsers/pt9/pt9-xml.md +++ b/src/parsers/pt9/pt9-xml.md @@ -1,6 +1,6 @@ # Paratext 9 XML schema -The extension reads PT9 interlinear data from XML files (e.g. `Interlinear__.xml` in project data). The parser in `src/parsers/interlinearXmlParser.ts` expects the following structure. Sample files live in `test-data/` (e.g. `Interlinear_en_MAT.xml`). +The extension reads PT9 interlinear data from XML files (e.g. `Interlinear__.xml` in project data). The parser in `src/parsers/pt9/interlinearXmlParser.ts` expects the following structure. Sample files live in `test-data/` (e.g. `Interlinear_en_MAT.xml`). ## Document structure