diff --git a/doc/changes/changes.md b/doc/changes/changes.md index 685c7150..91f22d77 100644 --- a/doc/changes/changes.md +++ b/doc/changes/changes.md @@ -6,7 +6,8 @@ nav_order: 9 # Changes -* [4.11.0](changes_4.11.0.md) unreleased +* [4.12.0](changes_4.12.0.md) unreleased +* [4.11.0](changes_4.11.0.md) * [4.10.0](changes_4.10.0.md) * [4.9.0](changes_4.9.0.md) * [4.8.0](changes_4.8.0.md) diff --git a/doc/changes/changes_4.12.0.md b/doc/changes/changes_4.12.0.md new file mode 100644 index 00000000..d608fe51 --- /dev/null +++ b/doc/changes/changes_4.12.0.md @@ -0,0 +1,11 @@ +# OpenFastTrace 4.12.0, released 2026-??-?? + +Code name: JSX and TSX tag importer + +## Summary + +The source tag importer now supports JSX (`.jsx`) and TSX (`.tsx`) source files, the file types of React components written in JavaScript and TypeScript. + +## Features + +* #647: Add support for JSX and TSX in the source tag importer diff --git a/doc/user_guide/reference/input_format_support.md b/doc/user_guide/reference/input_format_support.md index e9ac39b5..5694dcbb 100644 --- a/doc/user_guide/reference/input_format_support.md +++ b/doc/user_guide/reference/input_format_support.md @@ -93,7 +93,7 @@ recognized file types: * [Go](https://golang.org/) (`.go`) * Groovy (`.groovy`) * Java (`.java`, `.fxml`) -* JavaScript (`.js`, `.ejs`, `.cjs`, `.mjs`) +* JavaScript (`.js`, `.jsx`, `.ejs`, `.cjs`, `.mjs`) * Kotlin (`.kt`, `.kts`) * Lua (`.lua`) * Objective C (`.m`, `.mm`) @@ -106,7 +106,7 @@ recognized file types: * Shell programming (`.sh`, `.bash`, `.zsh`) * Swift (`.swift`) * Terraform (`.tf`, `.tfvars`) -* TypeScript (`.ts`) +* TypeScript (`.ts`, `.tsx`) * Visual Basic (`.vb`) * Windows batch files (`.bat`) diff --git a/importer/tag/src/main/java/org/itsallcode/openfasttrace/importer/tag/TagImporterFactory.java b/importer/tag/src/main/java/org/itsallcode/openfasttrace/importer/tag/TagImporterFactory.java index 78016ae0..f16f8325 100644 --- a/importer/tag/src/main/java/org/itsallcode/openfasttrace/importer/tag/TagImporterFactory.java +++ b/importer/tag/src/main/java/org/itsallcode/openfasttrace/importer/tag/TagImporterFactory.java @@ -26,8 +26,8 @@ public class TagImporterFactory extends AbstractImporterFactory "json", "htm", "html", "xhtml", "xml", "yaml", "yml", // markup languages "fxml", "java", // Java "clj", "kt", "kts", "scala", // JVM languages - "js", "mjs", "cjs", "ejs", // JavaScript - "ts", // TypeScript + "js", "jsx", "mjs", "cjs", "ejs", // JavaScript + "ts", "tsx", // TypeScript "lua", // Lua "m", "mm", // Objective C "php", // PHP diff --git a/importer/tag/src/test/java/org/itsallcode/openfasttrace/importer/tag/TestTagImporterFactory.java b/importer/tag/src/test/java/org/itsallcode/openfasttrace/importer/tag/TestTagImporterFactory.java index d3a97b7a..e42feea4 100644 --- a/importer/tag/src/test/java/org/itsallcode/openfasttrace/importer/tag/TestTagImporterFactory.java +++ b/importer/tag/src/test/java/org/itsallcode/openfasttrace/importer/tag/TestTagImporterFactory.java @@ -28,8 +28,8 @@ protected List getSupportedFilenames() "foo.bat", "foo.java", "foo.c", "foo.C", "foo.c++", "foo.c#", "foo.cc", "foo.cfg", "foo.conf", "foo.cpp", "foo.dox", "foo.cs", "foo.fxml", "foo.go", "foo.groovy", "foo.h", "foo.H", "foo.hh", "foo.h++", - "foo.htm", "foo.html", "foo.ini", "foo.js", "foo.kt", "foo.kts", "foo.mjs", "foo.cjs", "foo.ejs", - "foo.ts", "foo.json", + "foo.htm", "foo.html", "foo.ini", "foo.js", "foo.jsx", "foo.kt", "foo.kts", "foo.mjs", "foo.cjs", + "foo.ejs", "foo.ts", "foo.tsx", "foo.json", "foo.lua", "foo.m", "foo.mm", "foo.php", "foo.pl", "foo.pls", "foo.pm", "foo.proto", "foo.py", "foo.sql", "foo.r", "foo.rs", "foo.sh", "foo.sv", "foo.v", "foo.inc", "foo.yaml", "foo.yml", "foo.xhtml", "foo.xml", diff --git a/product/src/test/resources/example/requirements.md b/product/src/test/resources/example/requirements.md index ed3451ad..4c197fcf 100644 --- a/product/src/test/resources/example/requirements.md +++ b/product/src/test/resources/example/requirements.md @@ -27,3 +27,11 @@ Needs: src ## Visual Basic `req~vb-source~1` Needs: src + +## JSX +`req~jsx-source~1` +Needs: src + +## TSX +`req~tsx-source~1` +Needs: src diff --git a/product/src/test/resources/example/src/test.jsx b/product/src/test/resources/example/src/test.jsx new file mode 100644 index 00000000..a5485484 --- /dev/null +++ b/product/src/test/resources/example/src/test.jsx @@ -0,0 +1 @@ +// [src->req~jsx-source~1] diff --git a/product/src/test/resources/example/src/test.tsx b/product/src/test/resources/example/src/test.tsx new file mode 100644 index 00000000..2e068f94 --- /dev/null +++ b/product/src/test/resources/example/src/test.tsx @@ -0,0 +1 @@ +// [src->req~tsx-source~1]