You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Jest configuration and enhance interlinearizer WebView functionality
- Modify Jest configuration to adjust file patterns for test exclusions, ensuring proper test coverage.
- Update interlinearizer WebView to reference the correct XML files for testing, improving accuracy in unit tests.
- Revise README to reflect changes in the file structure and clarify the usage of test data paths.
- Refactor imports in the interlinearizer WebView for consistency and clarity, aligning with updated parser structure.
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ The general file structure for an extension is as follows:
96
96
-`src/main.ts` is the main entry file for the extension (registers commands and wires interlinear XML)
97
97
-`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
98
98
-`src/types/` also holds shared enums and type modules (e.g. `interlinearizer-enums.ts`). Use the path alias `types/interlinearizer-enums` in imports instead of relative paths (see `tsconfig.json` paths).
99
-
-`src/parsers/` contains all parsers and converters used when importing external data models sorted by source (e.g. Paratext 9 XML Files). Use the path alias `parsers/...` in imports instead of relative paths (see `tsconfig.json` paths).
99
+
-`src/parsers/` contains all parsers and converters used when importing external data models, one directory per source (e.g. `paratext-9/`). Use the path alias `parsers/...` in imports instead of relative paths (see `tsconfig.json` paths). **Naming:** the program/source is identified only by the directory name (full name, kebab-case). Files inside each directory use generic names (e.g. `converter.ts`, `interlinearParser.ts`, `types.ts`, `lexiconParser.ts`); exported symbols use the full program name (e.g. `Paratext9Parser`, `convertParatext9ToInterlinearization`).
100
100
-`*.web-view.tsx` files will be treated as React WebViews
101
101
-`*.web-view.scss` files provide styles for WebViews
102
102
-`*.web-view.html` files are a conventional way to provide HTML WebViews (no special functionality)
@@ -108,7 +108,7 @@ The general file structure for an extension is as follows:
108
108
-`assets/descriptions/description-<locale>.md` contains a brief description of the extension in the language specified by `<locale>`
109
109
-`contributions/` contains JSON files the platform uses to extend data structures for things like menus and settings. The JSON files are referenced from the manifest
110
110
-`public/` contains other static files that are copied into the build folder
111
-
-`test-data/` contains sample interlinear XML (e.g. `Interlinear_en_MAT.xml`) for development and tests. In tests, resolve paths via `getTestDataPath('Interlinear_en_MAT.xml')` from `src/__tests__/test-helpers`.
111
+
-`test-data/` contains sample interlinear XML (e.g. `Interlinear_en_JHN.xml`) and Lexicon XML (e.g. `Lexicon.xml`) for development and tests. In tests, resolve paths via `getTestDataPath('Interlinear_en_JHN.xml')`(or `getTestDataPath('Lexicon.xml')`) from `src/__tests__/test-helpers`. Interlinear XML aligns **source** words/WordParses; Lexicon XML is the **target** (gloss) language. Word-level gloss is resolved in the **converter** from Lexicon entries (e.g. `Word:surfaceForm`); the webview Gloss row displays only that data (no surfaceText fallback).
112
112
-`.github/` contains files to facilitate integration with GitHub
113
113
-`.github/workflows` contains [GitHub Actions](https://github.com/features/actions) workflows for automating various processes in this repo (e.g. **Test** and **Lint** on push/PR to main, release-prep, hotfix-\*; **Publish** and **Bump Versions** manual dispatch; **CodeQL** for security)
114
114
-`.github/assets/release-body.md` combined with a generated changelog becomes the body of [releases published using GitHub Actions](#publishing)
@@ -121,7 +121,7 @@ The general file structure for an extension is as follows:
121
121
122
122
### Requirements
123
123
124
-
-**Node.js >= 18** is required. The test suite uses the Web Crypto API (`globalThis.crypto.subtle`) for hashing in `paratext9Converter`tests (e.g. the `sha256HexWebCrypto` path in `src/__tests__/parsers/paratext-9/paratext9Converter.test.ts` when `convertParatext9ToInterlinearization` is called without the `hashSha256Hex` option). Node 18+ provides this API; older versions will cause those tests to fail. The same requirement is enforced in `package.json` via `engines.node` and is used by CI.
124
+
-**Node.js >= 18** is required. The test suite uses the Web Crypto API (`globalThis.crypto.subtle`) for hashing in the paratext-9 converter tests (e.g. the `sha256HexWebCrypto` path in `src/__tests__/parsers/paratext-9/converter.test.ts` when `convertParatext9ToInterlinearization` is called without the `hashSha256Hex` option). Node 18+ provides this API; older versions will cause those tests to fail. The same requirement is enforced in `package.json` via `engines.node` and is used by CI.
0 commit comments