Repository navigation
Release Candidate 11.17.0 - #8071
Conversation
Addresses feedback from the review: - add Cypress snapshot tests for subgraphs. - add unit tests for getData() cluster output. - clarify documentation for quoted identifiers in relationships. - address minor nits and code cleanup. Closes #7417 Co-authored-by: Beatriz Braga <beatrizagbraga@tecnico.ulisboa.pt>
fix: preserve run script argument boundaries
…-render-pipeline-3-dagre-phases
…/common-render-pipeline-4-dagre-layoutdata
…odex/common-render-pipeline-5-dagre-shared-paint
… codex/common-render-pipeline-6-dagre-shared-nodes
… codex/common-render-pipeline-6-dagre-shared-nodes
… codex/common-render-pipeline-6-dagre-shared-nodes
…agre-shared-nodes' into codex/common-render-pipeline-6-dagre-shared-nodes
…/common-render-pipeline-4-dagre-layoutdata
…odex/common-render-pipeline-5-dagre-shared-paint
… codex/common-render-pipeline-6-dagre-shared-nodes
…ntry node on top When a flow loops back on itself (a back-edge to an earlier node), elk.layered's degree-based cycle-breaking has no notion of an entry point and can rank the first-declared node mid-layout, scrambling the reading order. The new opt-in elk.keepEntryNodeOnTop option (default false) detects the entry node of each recursive flow - grouped per parentId, ignoring self-loops, by finding weakly-connected components with no natural source - and pins it to the first layer via elk.layered.layering.layerConstraint = FIRST. Detection is scoped per container, so cycles inside subgraphs are handled independently. Acyclic flows have a natural source, so nothing is nominated and their layout is unchanged. Resolves #7827
… codex/common-render-pipeline-6-dagre-shared-nodes
…support langium 4.2.2+ switched to chevrotain v12, which declares engines node >=22 and calls Object.groupBy (a Node 21+ API) during grammar validation. Since chevrotain is bundled into the published @mermaid-js/parser, this shipped Node 22-only code to consumers and broke `langium generate` for contributors on Node 20. - Pin langium to 4.2.1 (last release on chevrotain ~11.1.1) in the parser package and via a pnpm override, so langium-cli's internal langium (range ~4.2.0) can't resolve to 4.2.4 either - Pin langium-cli to ~4.2.1 - Disable renovate updates for langium/langium-cli/chevrotain/ @chevrotain/types so the pin isn't silently re-broken (this drift was introduced by a renovate patch-bump of langium ^4.0.3 -> ^4.2.4) Verified on Node 20.12.0: pnpm install + full build, langium:generate, parser unit tests (691/691), and parsing via the built mermaid-parser.core.mjs bundle (zero Object.groupBy in dist). Resolves #8027 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The v11.16.1 hotfixes skipped the `develop` branch, so we should merge these in now to avoid merge conflicts in the future.
Co-authored-by: Alois Klink <alois@aloisklink.com>
chore: merge v11.16.1 back to the `develop` branch
…flows perf: use the `fastdom` library to avoid unnecessary reflows
…ain-node20 fix(parser): pin langium to 4.2.1 to keep chevrotain v11 and Node 20 support
…er-bucket-console-browser feat(shapes): add folder, bucket, console and browser shapes
🦋 Changeset detectedLatest commit: 4150c73 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8071 +/- ##
===========================================
+ Coverage 64.30% 77.54% +13.23%
===========================================
Files 670 572 -98
Lines 75072 75279 +207
Branches 11171 14686 +3515
===========================================
+ Hits 48273 58373 +10100
+ Misses 26799 15901 -10898
- Partials 0 1005 +1005
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 ↗︎
|
Pinning langium is only a devDependency change, and doesn't cause any observable difference compared to the previous `@mermaid-js/parser` release.
As a refactoring only change, this doesn't need to go in our public changelog.
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.17.0 Release notes: ### Minor Changes - [#7842](mermaid-js/mermaid#7842) [`3670b4e`](mermaid-js/mermaid@3670b4e) Thanks [@filipsajdak](https://github.com/filipsajdak)! - feat(c4): render C4 elements through the unified shape system, using the new person shape - [#7812](mermaid-js/mermaid#7812) [`cdfc0ea`](mermaid-js/mermaid@cdfc0ea) Thanks [@knsv-bot](https://github.com/knsv-bot)! - feat(class): route `classDiagram` to the unified (v2) renderer by default Set `class: { defaultRenderer: 'dagre-d3' }` in the config to restore the legacy renderer. - [#7785](mermaid-js/mermaid#7785) [`c45cde9`](mermaid-js/mermaid@c45cde9) Thanks [@knsv-bot](https://github.com/knsv-bot)! - feat(flowchart): add collapsible flowchart subgraphs via `subgraphId@{ view: collapsed }` - [#7828](mermaid-js/mermaid#7828) [`8eb3afc`](mermaid-js/mermaid@8eb3afc) Thanks [@knsv-bot](https://github.com/knsv-bot)! - feat(elk): add `elk.keepEntryNodeOnTop` config option to keep a recursive flow's entry node on top - [#7803](mermaid-js/mermaid#7803) [`74e44eb`](mermaid-js/mermaid@74e44eb) Thanks [@knsv-bot](https://github.com/knsv-bot)! - feat(elk): add `elk.nodePlacementAlignment` config option - [#7792](mermaid-js/mermaid#7792) [`ea55b31`](mermaid-js/mermaid@ea55b31) Thanks [@RodrigojndSantos](https://github.com/RodrigojndSantos)! - feat(er): add subgraph support to ER diagrams. - [#7970](mermaid-js/mermaid#7970) [`a2c0fb6`](mermaid-js/mermaid@a2c0fb6) Thanks [@filipsajdak](https://github.com/filipsajdak)! - feat(flowchart): add `folder`, `bucket`, `console` (terminal window) and `browser` shapes - [#7842](mermaid-js/mermaid#7842) [`ae3e115`](mermaid-js/mermaid@ae3e115) Thanks [@filipsajdak](https://github.com/filipsajdak)! - feat(flowchart): add `person` shape (circular head above a rounded body), usable in flowcharts via `A@{ shape: person }` - [#7724](mermaid-js/mermaid#7724) [`0fd7a9f`](mermaid-js/mermaid@0fd7a9f) Thanks [@xdumaine](https://github.com/xdumaine)! - feat(xyChart): add legends for named line and bar series ### Patch Changes - [#7847](mermaid-js/mermaid#7847) [`215fe89`](mermaid-js/mermaid@215fe89) Thanks [@filipsajdak](https://github.com/filipsajdak)! - fix(c4): named attributes such as `$tags`, `$link` and `$sprite` are no longer clobbered to undefined when they arrive in an earlier positional slot of Person/System/Container/Component/Boundary/Rel statements. - [#7871](mermaid-js/mermaid#7871) [`8d874c4`](mermaid-js/mermaid@8d874c4) Thanks [@knsv-bot](https://github.com/knsv-bot)! - fix(flowchart): stop dagre layout from spamming `warn`-level logs on every node/edge/cluster - [#8071](mermaid-js/mermaid#8071) [`b3d1f63`](mermaid-js/mermaid@b3d1f63) Thanks [@pbrolin47](https://github.com/pbrolin47)! - fix(block): sibling blocks overlapping in block diagrams when one has a label wider than 200px - [#7870](mermaid-js/mermaid#7870) [`71b8843`](mermaid-js/mermaid@71b8843) Thanks [@knsv-bot](https://github.com/knsv-bot)! - fix: a `RangeError: Invalid array length` crash when rendering certain edges. - [#7924](mermaid-js/mermaid#7924) [`9cbef5d`](mermaid-js/mermaid@9cbef5d) Thanks [@nightt5879](https://github.com/nightt5879)! - fix(treeView): icons disappearing after strict security sanitization. - [#7850](mermaid-js/mermaid#7850) [`a34cbf0`](mermaid-js/mermaid@a34cbf0) Thanks [@aloisklink](https://github.com/aloisklink)! - fix(block): allow classdefs to update text color - [#7937](mermaid-js/mermaid#7937) [`f9cbe1e`](mermaid-js/mermaid@f9cbe1e) Thanks [@filipsajdak](https://github.com/filipsajdak)! - fix(dagre): let a diagram's own nodeSpacing/rankSpacing take effect in the unified dagre layout - [#8005](mermaid-js/mermaid#8005) [`90eeece`](mermaid-js/mermaid@90eeece) Thanks [@pbrolin47](https://github.com/pbrolin47)! - fix(flowchart): reverts the behavior change from #7672 (fix/4648-directions), since arrows between subgraphs are broken - [#7951](mermaid-js/mermaid#7951) [`afa2f80`](mermaid-js/mermaid@afa2f80) Thanks [@aloisklink](https://github.com/aloisklink)! - perf: use `fastdom` to batch DOM measurements (up to 25% speedup) - Updated dependencies \[[`e848423`](mermaid-js/mermaid@e848423)]: - @mermaid-js/parser@1.2.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
📑 Summary
This pull request introduces several new features, improvements, and fixes across the Mermaid ecosystem, focusing on enhanced diagram rendering, configurability, and user experience. Major highlights include new shapes and rendering options, collapsible subgraphs, improved layout handling, and a TypeScript migration for the C4 diagram implementation. Additionally, there are numerous bug fixes and quality-of-life improvements for both users and developers.
New Features and Enhancements
Unified Rendering and New Shapes
classDiagramnow uses the unified (v2) renderer by default, with improved self-loop rendering. You can revert to the legacy renderer via config if needed.personshape. [1] [2]folder,bucket,console(terminal window), andbrowser.Diagram Interactivity and Examples
@{ view: collapsed }annotation, rendering them as single nodes with redirected edges.Layout Improvements
elk.nodePlacementAlignmentfor custom alignment strategies.elk.keepEntryNodeOnTopconfig option to ensure entry nodes remain at the top in recursive flows.Bug Fixes and Maintenance
Rendering and Parsing Fixes
RangeError: Invalid array lengthcrashes for certain edges by clamping dash-gap pair counts.$tags,$link,$sprite) from being overwritten by positional arguments.warn-level logs, improving performance for large diagrams.Codebase Maintenance
langiumto version 4.2.1 to maintain compatibility withchevrotainv11 and Node 20.Other Notable Changes
These changes collectively enhance the flexibility, reliability, and maintainability of Mermaid diagrams and their underlying codebase.
Resolves #
📏 Design Decisions
Describe the way your implementation works or what design decisions you made if applicable.
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSIONis used for all new features.pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.