-
-
Notifications
You must be signed in to change notification settings - Fork 8k
6774: update architecture diagram to reflect new class-based DB structure #6803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6774: update architecture diagram to reflect new class-based DB structure #6803
Conversation
…ture on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
🦋 Changeset detectedLatest commit: 03cf100 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@mermaid-js/examples
mermaid
@mermaid-js/layout-elk
@mermaid-js/mermaid-zenuml
@mermaid-js/parser
@mermaid-js/tiny
commit: |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #6803 +/- ##
=======================================
Coverage 3.71% 3.71%
=======================================
Files 454 454
Lines 44733 44747 +14
Branches 708 708
=======================================
+ Hits 1660 1661 +1
- Misses 43073 43086 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the architecture diagram database from a function-based module using ImperativeState to a class-based ArchitectureDB implementation. This change improves modularity, testability, and maintainability while preserving existing functionality.
Key changes:
- Migrated from ImperativeState pattern to class-based design with instance fields
- All database operations are now instance methods of the ArchitectureDB class
- Updated all consuming modules to pass the ArchitectureDB instance as a parameter
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
architectureDb.ts | Main refactor converting function-based DB to ArchitectureDB class with instance methods |
architectureDiagram.ts | Updated to return new ArchitectureDB instance via getter |
architectureParser.ts | Added type checking and instance assignment to parser |
architectureRenderer.ts | Updated function signatures to accept db parameter and use instance methods |
svgDraw.ts | Updated function signatures to accept db parameter instead of importing directly |
architecture.spec.ts | Updated tests to create ArchitectureDB instances and assign to parser |
silver-eyes-build.md | Added changeset for the refactoring |
packages/mermaid/src/diagrams/architecture/architectureParser.ts
Outdated
Show resolved
Hide resolved
packages/mermaid/src/diagrams/architecture/architectureRenderer.ts
Outdated
Show resolved
Hide resolved
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
📑 Summary
This PR refactors the internal implementation of the architecture diagram database from a function-based module to a class-based design. This update introduces a new ArchitectureDB class that encapsulates state and behavior, improving modularity, testability, and maintainability.
Key improvements:
Resolves #6774
📏 Design Decisions
Describe the way your implementation works or what design decisions you made if applicable.
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.