Issue 125 - autogenerate $configMap with proper grouping#126
Merged
gesinn-it-ilm merged 8 commits intomasterfrom Jul 9, 2025
Merged
Issue 125 - autogenerate $configMap with proper grouping#126gesinn-it-ilm merged 8 commits intomasterfrom
gesinn-it-ilm merged 8 commits intomasterfrom
Conversation
- Automated extraction now pulls deeper config keys like 'flowchart.useMaxWidth' as flat strings instead of nested arrays, matching Mermaid.js v10+ configuration style. - Fetches config.type.ts directly from Mermaid.js for the specified Mermaid.js version, ensuring up-to-date and accurate config definitions. - Recursively extracts all config properties including nested interfaces and types, flattening keys into dot notation strings (e.g., 'flowchart.useMaxWidth'). - Detects boolean fields and marks them with FILTER_VALIDATE_BOOLEAN for proper type handling. - Groups config keys by diagram prefix (e.g., 'flowchart', 'sequence') and adds descriptive // comments above each group for better readability and maintenance. - Automatically updates the $configMap block in src/MermaidConfigExtractor.php to reflect the latest config structure, reducing manual effort and human error.
…aid.js v10.9.3 - Adjusted test expectations in MermaidConfigExtractorTest and MermaidParserFunctionTest - config.flowchart.useMaxWidth is no longer a valid configuration key in Mermaid.js v10.9.3
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #126 +/- ##
=========================================
Coverage 94.05% 94.05%
Complexity 24 24
=========================================
Files 5 5
Lines 101 101
=========================================
Hits 95 95
Misses 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is related to the issue #125.
This PR contains:
config.type.tsfrom Mermaid.js v10.9.3.booleanconfig properties and assigns FILTER_VALIDATE_BOOLEAN for correct PHP typing.src/MermaidConfigExtractor.phpby replacing the$configMapblock in-place.scripts/generateConfigMap.ts)Note: Related tests must be updated to reflect the new config structure, such as removal of deprecated keys.
This automation ensures the config map stays up to date and neatly organized, reducing manual maintenance and human error.