78 Commits

Author SHA1 Message Date
Per Brolin f84cfc6251 Updated unit test 2026-05-15 13:52:09 +02:00
Per Brolin 535f8b137d Fix early exit branches and trailing slash 2026-05-15 13:33:44 +02:00
Per Brolin 909af8c125 Added some additional paths to IGNORABLE_PREFIXES 2026-05-13 13:34:37 +02:00
Per Brolin abdc8f00a4 Merge branch 'develop' into chore/refine-scope-e2e-tests 2026-05-13 12:50:59 +02:00
pbrolin47 a9990da19f Merge pull request #7740 from mermaid-js/master
Merge back v11.15.0 to develop
2026-05-11 12:05:33 +00:00
Per Brolin 108453369a Added files in demo-dir shall return SKIP 2026-05-08 13:32:53 +02:00
Ashish Jain bea2aeb552 chore: skip e2e tests for docs-only and ignorable-file PRs
Add IGNORABLE_PREFIXES and IGNORABLE_SUFFIXES to the e2e scope detection
script so that PRs touching only documentation, changesets, AI config, or
other non-rendering files skip e2e entirely instead of triggering the full
5-container Cypress suite.

Changes:
- Add SKIP sentinel return value to detectScope() for ignorable-only PRs
- Add ignorable file detection (docs, changesets, .claude/, assistant/, etc.)
- Update e2e.yml workflow to skip the e2e job when SKIP is returned
- Update local runner (run-e2e-scoped.ts) to handle SKIP
- Upgrade @argos-ci/cypress to ^6.3.3 for ARGOS_SUBSET support
- Add 9 new test cases covering docs-only, mixed, and skip scenarios
2026-05-04 12:28:26 +02:00
Alois Klink d6f4a62733 build(parser): bundle types using api-extractor
Use `@microsoft/api-extractor` to bundle the TypeScript `.d.ts` types
for `@mermaid-js/parser`.

In a future commit, we want to bundle `langium`, which would need us to
bundle `langium`'s types as well.

Bundling reduces the size of our `dist/` folder, and makes it more
obvious which of our types are external.

I've made this as a `prepack` step, so that it doesn't affect the
majority of mermaid developers when they run `pnpm install`. It's only
when we publish the package that we'd bundle the code.
This also means it will be tested by the `pnpm run test:check:tsc` test
that we have.
2026-04-24 17:55:17 +09:00
Per Brolin fbc83bbb5f Fix lint errors 2026-04-15 09:51:55 +02:00
Per Brolin cf6ada16ba refactor(e2e): replace CROSS_CUTTING_SPECS list with positional convention
Any spec file at the root of cypress/integration/rendering/ is treated
as cross-cutting (full suite). Any spec in a subfolder is scoped to that
subfolder. No explicit list to maintain — the directory position is the
convention.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 09:27:15 +02:00
Per Brolin 29bd1f55db refactor(e2e): organise spec files into diagram subfolders
Move all diagram-specific Cypress specs from the flat
cypress/integration/rendering/ directory into per-diagram subfolders
(e.g. cypress/integration/rendering/flowchart/).

The detection script now uses filesystem discovery instead of a
hardcoded DIAGRAM_SPEC_MAP: it checks whether
cypress/integration/rendering/<diagram-name>/ exists and returns
a glob pattern (cypress/integration/rendering/<name>/**) as the
--spec argument. Adding a new spec to a subfolder requires zero
config changes.

Cross-cutting specs (theme, conf-and-directives, shapes, etc.) remain
at the root of cypress/integration/rendering/ and continue to trigger
the full suite.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 09:16:13 +02:00
Per Brolin 2389b403a2 First version of scoped e2e tests 2026-04-09 16:33:35 +02:00
omkarht e9d4c110ff Merge pull request #7501 from mermaid-js/feature/neo-look-base
feature: implement neo look and themes for mermaid diagrams
2026-03-25 21:17:01 +01:00
Knut Sveidqvist 409bf911ce fix(scripts): resolve lint errors in verify-diagram script
- Add eslint-disable no-console (CLI tool, console output is intentional)
- Add curly braces to all if-return statements
- Use RegExp#exec() instead of String#match()
- Add cspell:ignore for Playwright's networkidle API term

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 06:54:40 +01:00
Knut Sveidqvist f410616a96 chore: add verify-diagram script and playwright dependency
Add scripts/verify-diagram/verify.mjs for visual spot-checking of
rendered diagrams during development. Uses Playwright to render a .mmd
file via the dev server and save a cropped screenshot. Auto-detects
the dev server port from .env, MERMAID_PORT env var, or defaults to
9000. Includes error handling for missing server, render failures, and
timeouts.

Add playwright as a dev dependency to support the verify script.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 21:20:37 +01:00
Alois Klink 141c6b3808 build: change mermaid live preview to use pnpm
Right now, the netlify build seems to be failing since we're ignoring
the `mermaid-live-editor` lockfile.

This is causing errors with broken dependencies.

Switching to `pnpm`, which the `mermaid-live-editor` uses, fixes these
issues!
2025-09-13 00:35:29 +09:00
Sidharth Vinod f87d0dd88a chore: Update change detection logic 2025-04-09 13:20:19 +05:30
Sidharth Vinod 97e35fd30a chore: Use git to read old timings 2025-04-09 12:19:13 +05:30
Sidharth Vinod 7a5f999f42 chore: Add compare-timings script
Avoid creating unnecessary PRs when there is no significant timings change.
2025-04-09 12:08:57 +05:30
Alois Klink fe3cffbb67 chore: update dompurify to ^3.2.1
As [DOMPurify 3.2.0 added TypeScript types][1], this means that we can
remove our dependency on the `@types/dompurify` package.

[DOMPurify 3.2.0 also adds the `HTML_INTEGRATION_POINTS` option][2],
which adds back support for `<foreignObject>`,
[which broke in DOMPurify 3.1.7.][3]

[1]: https://github.com/cure53/DOMPurify/releases/tag/3.2.0
[2]: https://github.com/cure53/DOMPurify/commit/e4caa679715187b17e8af5cdb14ad02406621ac8
[3]: https://github.com/mermaid-js/mermaid/commit/de2c05cd5463af68d19dd7b6b3f1303d69ddb2dd
2024-11-25 21:00:49 +09:00
Nicholas Bollweg 0b672e2636 add test for out-of-tree tsc project 2024-09-01 16:40:12 -05:00
Yash Singh ab1a2ec411 fix: clone if editor doesnt exist in script 2024-07-16 18:24:04 -07:00
Yash Singh 38a7a47d11 chore: push better live editor script alongside 2024-07-16 13:26:20 -07:00
Sidharth Vinod 70dcfc83e6 chore: move abs below return check 2024-07-13 22:33:54 +05:30
Sidharth Vinod 3698c2b1e4 fix: Handle negative numbers in formatBytes 2024-07-13 22:32:45 +05:30
Sidharth Vinod 195e314c42 fix: Eslint jison linting 2024-06-29 16:31:19 +05:30
Sidharth Vinod d875540b3a Merge branch 'master' into develop
* master:
  update link
  update announcement and blog pages
  Remove `--force` flag
  Tweak editor.bash
  update link
2024-03-23 11:43:27 +05:30
Sidharth Vinod f86da19362 Remove --force flag 2024-03-19 08:45:19 +05:30
Sidharth Vinod b04e150dc1 Tweak editor.bash 2024-03-19 08:38:45 +05:30
Sidharth Vinod 60dd27671b Merge branch 'develop' into sizeDiff
* develop: (280 commits)
  chore: Remove unused imports in block
  Fix spelling
  Update docs
  Lychee ignore chrome webstore
  Update link
  chore(deps): update all patch dependencies
  build(docs): vendor CSS dependencies
  chore(deps): update all minor dependencies
  Ran lint:fix
  Fix chrome webstore url causing 404
  build(deps): update `langium` to `v3` and apply the required changes
  Resolves E2E testing issues and issue #5343
  Fix spelling
  Fix community integrations
  Fix docs
  docs: Fix config
  Update all minor dependencies
  Amend docs to document gitgraph parallel commits
  Fix lint
  Use Yarn Add COREPACK_ENABLE_STRICT
  ...
2024-03-06 14:55:18 +05:30
Sidharth Vinod 5807d521b7 Merge branch 'develop' into next
* develop: (99 commits)
  Fix spelling
  Fix community integrations
  Fix docs
  docs: Fix config
  Update all minor dependencies
  Amend docs to document gitgraph parallel commits
  Fix lint
  Use Yarn Add COREPACK_ENABLE_STRICT
  Added link to Blazorade Mermaid to the community integrations page.
  Bump node version
  Add lcov to cspell
  Correcting path to docker-entrypoint.sh
  Update recommended Vitest extension
  Replace mermaid-js.github.io links
  Replace links to docs with links to webhelp
  Link to contributing page on webhelp
  Changes to timeline.md 1. Added colons to all 'NOTES' for consistency.
  Changes to timeline.md 1. Updates the Wikipedia citation to include a link. 2. Removed periods from documentation sections to be consistent (some had periods, some didn't) 3. Added a space to a coding example for spacing consistency.
  Replace version number placeholder
  Fix link to Contributors section in README
  ...
2024-03-01 12:18:25 +05:30
Sidharth Vinod 4707fb27fa Use Yarn
Add COREPACK_ENABLE_STRICT
2024-02-27 11:33:24 +05:30
Jason Dent f3282e4dad chore: sort cspell dictionaries on commit 2024-02-14 23:32:15 +01:00
Sidharth Vinod f6c4c9260f Remove log 2024-01-24 22:13:17 +05:30
Sidharth Vinod f354d68350 Format message 2024-01-24 22:12:33 +05:30
Sidharth Vinod bea76aa682 Format Size 2024-01-24 21:59:58 +05:30
Sidharth Vinod e008b7dae7 Remove logs 2024-01-24 21:45:30 +05:30
Sidharth Vinod 96a3991c56 Update glob 2024-01-24 21:42:31 +05:30
Sidharth Vinod e07608209b debug 2024-01-24 21:28:49 +05:30
Sidharth Vinod 50cdb74d54 Fix file path 2024-01-24 21:25:05 +05:30
Sidharth Vinod b2111adef5 Feat: Calculate package size change on PRs 2024-01-24 21:02:12 +05:30
Sidharth Vinod 99313fe162 fix editor build 2023-11-15 09:09:48 +05:30
Sidharth Vinod 3abe7cfc45 Merge branch 'develop' into next
* develop: (61 commits)
  Revert "fix: Reduce gantt exclude days length"
  Commented out broken test (#4913)
  fix: Reduce gantt exclude days length
  Update docs
  Fix lint issue
  Fix release version
  Fix TopBar
  Add MC to integrations
  Add TopBar
  Fix docs
  Docs: Add Product Hunt info (#4900)
  Update docs
  Merge branch 'release/10.5.0'
  Mermaid release v10.5.0
  docs: typo fixed
  docs: typo fixed
  Fix for issue with backticks in ids in classDiagrams
  more fixes
  fix typo
  more link fixes
  ...
2023-10-06 11:11:34 +05:30
Sidharth Vinod 4946813ac6 chore: Build only mermaid 2023-09-22 10:47:06 +05:30
Sidharth Vinod 882350311b chore: Append commit hash to version 2023-09-22 10:40:42 +05:30
Sidharth Vinod 60d0dba648 Print commit ref 2023-09-22 10:25:42 +05:30
Sidharth Vinod 60ed7d3273 chore: Increase heap size when building 2023-08-26 23:43:27 +05:30
Sidharth Vinod 9dccf4d9c9 chore: Update editor.bash to build latest version 2023-08-25 10:04:53 +05:30
Sidharth Vinod 6563a6ea26 chore: Build after clone 2023-08-25 09:43:53 +05:30
Sidharth Vinod a3a6eb9bf5 chore: Force install npm to avoid cache. 2023-08-25 09:37:22 +05:30