Skip to content
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

feat: Return parsed config from mermaid.parse #5831

Merged
merged 6 commits into from
Sep 9, 2024
Merged

Conversation

sidharthv96
Copy link
Member

@sidharthv96 sidharthv96 commented Sep 6, 2024

📑 Summary

This enables users to get the config that's defined in the frontmatter or directives when parsing a mermaid diagram.

📏 Design Decisions

We're returning the config along with diagramType.
Because we were returning an object, it's not a breaking change.

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added necessary unit/e2e tests.
  • 📓 have added documentation. Make sure MERMAID_RELEASE_VERSION is used for all new features.
  • 🦋 If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Copy link

changeset-bot bot commented Sep 6, 2024

🦋 Changeset detected

Latest commit: d053284

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
mermaid Minor

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

Copy link

netlify bot commented Sep 6, 2024

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit d053284
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/66dee5f4b284890008e047ec
😎 Deploy Preview https://deploy-preview-5831--mermaid-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 5.00%. Comparing base (750f58d) to head (d053284).
Report is 7 commits behind head on develop.

Files with missing lines Patch % Lines
packages/mermaid/src/mermaidAPI.ts 0.00% 2 Missing ⚠️
packages/mermaid/src/preprocess.ts 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #5831   +/-   ##
=======================================
  Coverage     5.00%   5.00%           
=======================================
  Files          338     337    -1     
  Lines        48216   48205   -11     
  Branches       551     576   +25     
=======================================
  Hits          2413    2413           
+ Misses       45803   45792   -11     
Flag Coverage Δ
unit 5.00% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/mermaid/src/mermaidAPI.ts 0.00% <0.00%> (ø)
packages/mermaid/src/preprocess.ts 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

Copy link

argos-ci bot commented Sep 6, 2024

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Sep 9, 2024, 12:16 PM

* develop:
  chore: Fix check
  feat: Preview release
Copy link

pkg-pr-new bot commented Sep 6, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/mermaid-js/mermaid@5831
pnpm add https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/mermaid-zenuml@5831
pnpm add https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/layout-elk@5831
pnpm add https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/parser@5831

commit: d053284

@sidharthv96 sidharthv96 requested a review from a team September 9, 2024 04:10
packages/mermaid/src/types.ts Outdated Show resolved Hide resolved
sidharthv96 and others added 3 commits September 9, 2024 17:19
* develop:
  chore(deps): update dependency eslint-plugin-jsdoc to v50
  chore: add git command and set safe dir
  Version Packages
  Adding changeset
  Cleanup of test-file
  Updated cypress test for self-loops
  Fix for issues with self loops
  rebuild docs
  add another maybe-undefined operator elk
  pass linter
  fix import
  make rendering-util/types a real ts file
* develop:
  [autofix.ci] apply automated fixes
  Create red-beans-cross.md
  remove tsconfig compiler option paths
  linting
  replace mermaid/dist with relative paths
  more , linting
  add test for out-of-tree tsc project
  replace  with mermaid/dist
@sidharthv96 sidharthv96 added this pull request to the merge queue Sep 9, 2024
Merged via the queue into develop with commit ddb51cd Sep 9, 2024
24 checks passed
@sidharthv96 sidharthv96 deleted the sidv/returnConfig branch September 9, 2024 12:25
@github-actions github-actions bot mentioned this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants