Add script `packages/mermaid/scripts/create-types-from-json-schema.mts`
to automatically generate the TypeScript definition for `MermaidConfig`
from the `MermaidConfig` JSON Schema at
`packages/mermaid/src/schemas/config.schema.yaml`.
To do this, we are using this library
[`json-schema-to-typescript`][1], which is also used by Webpack to
generate their types from their JSON Schema.
In order to make sure that this isn't a breaking change, the script
makes all fields **optional**, as that is what the original typescript
file has.
Additionally, I've put in some custom logic into the script, so that
the exact same order is used for the TypeScript file, to make the
`git diff` easier to review. In the future, we can remove this custom
logic, once we no longer need to worry about `git merge` conflicts.
[1]: https://github.com/bcherny/json-schema-to-typescript
Automatically build documentation for JSON Schema.
This is only built when running with `--vitepress`,
as it currently produces loads of markdown files, which I feel like
we shouldn't be committing.
This currently manually uses some internal `jsonschema2md` functions
so that we can manually control the Markdown output.
Adds a vitepress JsonSchema plugin that automatically loads
the Mermaid Config JSON Schema from a .schema.yaml file and
gets the default values from it.
* develop: (43 commits)
rename plugin variable into info in infoDetector.ts
remove cypress/platform/index.html
update pnpm-lock.yaml
indent info.html files
update pnpm-lock.yaml
remove empty options in cypress info.spec.ts
format and add theme to cypress info.html
convert the cypress info.spec.js into ts
add messing timeline and info demoes links
change infoDb db export
remove default export in info files
resolve db import in info.spec.ts
remove assigned variables to their variables and export db without default
use object destructuring for getConfig in infoRenderer
move default_info_db into infoDbOF
remove id and diagram assigning in info loader
assign returned variables to their variables
remove handled `ts-ignore` in info diagram
handle optional `.styles`
add info fields interface
...
* develop: (22 commits)
Update docs
Added CKEditor and GitHub Writer to available integrations.
chore(deps): update all patch dependencies
build(deps): fix broken pnpm-lock.yaml file
Mermaid version 10.2.0
Mermaid Version 10.2.0-rc.4
Label background fix
Test commit
Fix for regression error in sequenceDiagrams
Fix visibility issue for fields
fix parsing issue with class diagrams
fix: Use unicode arrows in quadrant chart axis
fix: Use unicode arrows in quadrant chart axis
fix lint command
Bump version
Back to JS with jsdoc types
Add unsupported text
Reduce changes in test
Fix deps
Fix lockfile
...
Looks like a bad merge conflict resolution broke this file,
and for some reason, the `packages/mermaid/src/vitepress` bit got
removed when releasing v10.2.0-rc.4.
Fixes: bd1343648e983290693eddd16e95db09ae0526d3
Fixes: 9c12c42a26e9b9091af1be8f0fa00d905a9a07fc