diff --git a/.vite/build.ts b/.vite/build.ts index 6855d3e48..7398d30d5 100644 --- a/.vite/build.ts +++ b/.vite/build.ts @@ -22,22 +22,22 @@ const packageOptions = { 'mermaid-mindmap': { name: 'mermaid-mindmap', packageName: 'mermaid-mindmap', - file: 'add-diagram.ts', + file: 'diagram-definition.ts', }, 'mermaid-mindmap-detector': { name: 'mermaid-mindmap-detector', packageName: 'mermaid-mindmap', - file: 'registry.ts', + file: 'detector.ts', }, 'mermaid-example-diagram': { name: 'mermaid-example-diagram', packageName: 'mermaid-example-diagram', - file: 'add-diagram.ts', + file: 'diagram-definition.ts', }, 'mermaid-example-diagram-detector': { name: 'mermaid-example-diagram-detector', packageName: 'mermaid-example-diagram', - file: 'registry.ts', + file: 'detector.ts', }, }; diff --git a/V10-BreakingChanges.md b/V10-BreakingChanges.md new file mode 100644 index 000000000..bd9110d1a --- /dev/null +++ b/V10-BreakingChanges.md @@ -0,0 +1,5 @@ +# A collection of updates that change the behaviour + +## Lazy loading and asynchronisity + +- Invalid dates are rendered as syntax error instead of returning best guess or the current date diff --git a/cypress/integration/rendering/gantt.spec.js b/cypress/integration/rendering/gantt.spec.js index 438b80267..16a70ece0 100644 --- a/cypress/integration/rendering/gantt.spec.js +++ b/cypress/integration/rendering/gantt.spec.js @@ -92,7 +92,7 @@ describe('Gantt diagram', () => { {} ); }); - it('should render a gantt chart for issue #1060', () => { + it('should FAIL redering a gantt chart for issue #1060 with invalid date', () => { imgSnapshotTest( ` gantt diff --git a/cypress/platform/knsv.html b/cypress/platform/knsv.html index 8bd8d7c79..f6ee1ef03 100644 --- a/cypress/platform/knsv.html +++ b/cypress/platform/knsv.html @@ -385,7 +385,7 @@ flowchart TD htmlLabels: false, fontFamily: 'courier', }, - extraDiagrams: ['./mermaid-mindmap-detector.js'], + lazyLoadedDiagrams: ['./mermaid-mindmap-detector.js'], }); function callback() { alert('It worked'); diff --git a/cypress/platform/knsv2.html b/cypress/platform/knsv2.html index ca2333cd5..506ac51ae 100644 --- a/cypress/platform/knsv2.html +++ b/cypress/platform/knsv2.html @@ -55,11 +55,24 @@
-example-diagram -
+classDiagram
+ direction LR
+ class Student {
+ -idCard : IdCard
+ }
+ class IdCard{
+ -id : int
+ -name : string
+ }
+ class Bike{
+ -id : int
+ -name : string
+ }
+ Student "1" --o "1" IdCard : carries
+ Student "1" --o "1" Bike : rides
+
+
mindmap
root
A
@@ -85,9 +98,14 @@ mindmap
::icon(mdi mdi-fire)
gc7((grand
grand
child 8))
+ + example-diagram ++ +