7949 Commits

Author SHA1 Message Date
Nikolay Rozhkov
04597d29c0
Merge pull request #4599 from nirname/fix/support-docs-dev-in-docker
Support docs:dev in docker
2023-07-06 04:04:18 +00:00
Sidharth Vinod
43df84a4d5
Merge branch 'master' into develop
* master:
  fix lint
  update homepage community link
  Update docs
  add ChatGPT plugin blog post
2023-07-06 09:34:26 +05:30
Sidharth Vinod
a753b1f18b
Merge branch 'develop' into fix/support-docs-dev-in-docker 2023-07-06 09:29:51 +05:30
Sidharth Vinod
d80095bbef
Merge pull request #4601 from mermaid-js/homepage-community-link
Docs: update link - "Join the Community"
2023-07-06 09:26:10 +05:30
Sidharth Vinod
4d79f42d0e
Merge pull request #4602 from aloisklink/fix/make-quadrant-chart-options-optional
Make quadrant chart options TypeScript types optional
2023-07-06 03:54:08 +00:00
Alois Klink
a862565a24 test: test partial QuadrantChartConfig options 2023-07-06 01:35:11 +01:00
Alois Klink
6ceee7f253 test: fix types in config.spec.ts
The `foo`, `bar`, and `foobar` options don't exist in MermaidConfig.

Instead, I've replaced them with:
  - `foo` -> `fontFamily`
  - `bar` -> `fontSize`
  - `foobar` -> `altfontFamily`
2023-07-06 01:27:24 +01:00
Alois Klink
f731853e01 style: fix lint issues in src/config.spec.ts
It looks like our linter automatically converts `let` to `const` in
TypeScript files, but not in JavaScript files.
2023-07-06 01:20:24 +01:00
Alois Klink
5885f5f82a test: rename src/config.spec.js to config.spec.ts 2023-07-06 01:19:34 +01:00
Alois Klink
38013de711 fix(quadrant): make quadrant options optional
Make the types of the options in QuadrantChartConfig in the
MermaidConfig optional. All of these (except for the values in
`BaseDiagramConfig`) will be automatically set to their
default values, so they're optional from a user perspective.
2023-07-06 01:06:01 +01:00
Steph
9251e520ab fix lint 2023-07-05 13:50:33 -07:00
Steph
5e7e3e21c8 update homepage community link 2023-07-05 13:42:42 -07:00
Nikolay Rozhkov
95d62367e9 Add docker-specific command, leave commonly used command intact 2023-07-05 19:39:05 +03:00
Nikolay Rozhkov
34b2b5ba35 Support docs:dev in docker 2023-07-05 17:25:07 +03:00
Nikolay Rozhkov
c742ac71a4
Merge pull request #4598 from mermaid-js/sidv/fixDocsDev
Fix docs:dev
2023-07-05 14:05:27 +00:00
Sidharth Vinod
62b988a09f
Merge pull request #4595 from nirname/fix/sankey-diagram-examples
Sankey: Remove duplicated examples
2023-07-05 06:53:43 +00:00
Sidharth Vinod
382026ed33
Fix docs:dev 2023-07-05 12:20:56 +05:30
Nikolay Rozhkov
9f5f0a6e66 Reduce sankey width 2023-07-05 01:49:58 +03:00
nirname
6f03e22cc4 Update docs 2023-07-04 22:18:57 +00:00
Nikolay Rozhkov
8449a44607 Sankey: Remove duplicated examples 2023-07-05 01:15:22 +03:00
Nikolay Rozhkov
f431bae0ba
Merge pull request #4587 from nirname/refactoring/remove-double-parsing
Remove double parsing
2023-07-03 22:02:20 +00:00
Nikolay Rozhkov
d5021cab1d Remove double parsing 2023-07-03 18:57:26 +03:00
Sidharth Vinod
288f51216d
Add codecov token 2023-07-03 21:01:04 +05:30
Sidharth Vinod
1b190b2892
Merge pull request #4551 from Yokozuna59/refactor-accessibility
refactor accessibility
2023-07-03 15:07:21 +00:00
Sidharth Vinod
8e15e534ea
Add codecov token 2023-07-03 19:19:11 +05:30
Sidharth Vinod
6d7cd2b41f
Merge pull request #4580 from aloisklink/refactor/replace-enums
Remove all TypeScript enums and forbid them in ESLint
2023-07-03 07:26:39 +00:00
Sidharth Vinod
15b2105ce6
Merge pull request #4581 from mermaid-js/renovate/patch-all-patch
Update all patch dependencies (patch)
2023-07-03 07:10:51 +00:00
renovate[bot]
d6731a07db
Update all patch dependencies 2023-07-03 05:18:01 +00:00
Alois Klink
79688a1dc1 build: forbid using TypeScript enums using eslint
[TypeScript enums][1] are an unusual TypeScript feature, because it's
one of the only features that is "not a type-level extension of
JavaScript".

This means TypeScript generates custom code for enums, which can cause a
bunch of issues, especially as this custom code can be built differently
depending on which bundler you use, and because of this, many people
discourage the use of enums:

- [The Dangers of TypeScript Enums][2]
- [Tidy TypeScript: Prefer union types over enums][3]
- [TypeScript: Handbook - Enums # Objects vs Enums][4]

I've added an ESLint rule that forbids TypeScript enums, as in most
cases, it's better to use string literals instead, e.g. like
`type a = "a" | "b" | "c";`.

[1]: https://www.typescriptlang.org/docs/handbook/enums.html#string-enums
[2]: https://dev.to/azure/the-dangers-of-typescript-enums-55pd
[3]: https://fettblog.eu/tidy-typescript-avoid-enums/
[4]: https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums
2023-07-03 00:04:16 +01:00
Alois Klink
fbf79ffcc0 refactor: replace TypeScript enum with JS obj
[`const` assertions where added in TypeScript 3.4][1] and can be used
to create enum-like objects in plain JavaScript, that act like
TypeScript enums, but has none of the downsides of TypeScript enums.

[1]: https://devblogs.microsoft.com/typescript/announcing-typescript-3-4/#const-assertions
2023-07-02 23:56:42 +01:00
Alois Klink
b989ff5362 fix: change sankey config types to be unions
Replace the TypeScript `enum {a = "a", b = "b"}` types with
TypeScript's literal types (e.g. `"a" | "b"`).

This is because TypeScript enums are
[_not_ a type-level addition to JavaScript][1], and even the official
TypeScript docs say to be careful when using.

[1]: https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#enums
2023-07-02 23:44:19 +01:00
Yokozuna59
406df57f81
Merge branch 'develop' into refactor-accessibility 2023-07-02 10:24:21 +02:00
Sidharth Vinod
9c011abbd4
Merge pull request #4466 from Valentine14th/feature/1838_actor_creation_destruction
Feature/1838 actor creation destruction
2023-07-02 08:10:24 +00:00
Sidharth Vinod
dfc466514d
Merge branch 'develop' into feature/1838_actor_creation_destruction 2023-07-02 13:36:04 +05:30
Sidharth Vinod
29c866b09a
Don't fail CI on codecov error 2023-07-02 13:22:00 +05:30
Sidharth Vinod
2a1759aab4
Merge branch 'develop' into refactor-accessibility 2023-07-02 13:04:09 +05:30
Sidharth Vinod
28ce5e780f
Merge pull request #4566 from mermaid-js/renovate/patch-all-patch
Update all patch dependencies (patch)
2023-07-02 05:12:41 +00:00
renovate[bot]
b55a9328f4
Update all patch dependencies 2023-07-02 05:07:56 +00:00
Sidharth Vinod
19325777e5
Merge branch 'develop' into feature/1838_actor_creation_destruction 2023-07-02 10:32:59 +05:30
Sidharth Vinod
f0b8e5bc37
Merge pull request #4574 from mermaid-js/sidv/renameWorkflows
Rename workflow jobs
2023-07-02 05:01:53 +00:00
Sidharth Vinod
1995f62b3c
Merge branch 'develop' into sidv/renameWorkflows 2023-07-02 10:16:49 +05:30
Sidharth Vinod
78377daf2f
Rename workflow jobs 2023-07-02 10:14:35 +05:30
Sidharth Vinod
4a95589b5a
Add merge_group to CI triggers 2023-07-02 10:03:31 +05:30
Sidharth Vinod
812e44183b
Merge pull request #4502 from nirname/feature/4492_sankey-diagrams
Sankey diagrams
2023-07-02 04:29:43 +00:00
Sidharth Vinod
afb979f32b
Merge branch 'develop' into feature/4492_sankey-diagrams 2023-07-02 09:55:45 +05:30
Sidharth Vinod
4d19db8d0c
Merge pull request #4573 from ibrahimWassouf/develop
Fix relative link to theme variables list
2023-07-02 09:55:29 +05:30
nirname
c327ea9f21 Update docs 2023-07-01 23:38:02 +00:00
Nikolay Rozhkov
abb7bb23d6 More detailed sankey docs 2023-07-02 02:34:22 +03:00
Nikolay Rozhkov
8ed2ee30ec Sankey alignment tests 2023-07-02 02:15:23 +03:00
Nikolay Rozhkov
084b765e9f Added tests for colors and fully setup cypress in Docker 2023-07-02 01:10:06 +03:00