496 Commits

Author SHA1 Message Date
Alois Klink ff21dd5d64 Merge pull request #7616 from mermaid-js/renovate/patch-all-patch
fix(deps): update all patch dependencies (patch)
2026-05-22 15:03:36 +00:00
Per Brolin 535f8b137d Fix early exit branches and trailing slash 2026-05-15 13:33:44 +02:00
Per Brolin 55bf1adfb7 Changed to dynamix matrix for e2e-jobs 2026-05-13 14:23:51 +02:00
renovate[bot] e169641eda fix(deps): update all patch dependencies 2026-05-11 16:14:06 +00: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
Alois Klink ab28d728de ci: include parser in @mermaid-js/mermaid pkg
Right now, since we're using `npm publish` instead of `pnpm publish`,
the `^workspace:` specifier in our `package.json` file won't work.

We're also not publishing a `@mermaid-js/parser` package.
Instead, we can use `pnpm pack` to create a `.tgz` that `npm publish`
can upload.

We can also use `bundledDependencies` to include the
`@mermaid-js/parser` package, in case the latest preview version of
mermaid requires new changes to that package.
2026-05-07 20:52:55 +09:00
Alois Klink 20155f82a0 ci: use npm publish --tag preview for previews
Make sure that we use a preview tag for previews
2026-05-07 20:12:17 +09:00
Alois Klink 8711dafedb ci: limit release-preview-publish.yml permissions
If we don't have the `id-token: write` permission, there's no way we can
accidentally write the NPM!

But we still need `packages: write` to write to GitHub Packages.
2026-05-07 20:07:04 +09:00
Alois Klink 530f8c8668 ci: fix release preview publish errors
Currently, `npm publish` runs `pnpm docs:verify-version`, which might
possible fail if there are any `<MERMAID_RELEASE_VERSION>` placeholders
in our docs.

I've made a new environment variable, `ONLY_WARN_ON_VERIFY_ERROR`, that
can be used to disable this behaviour, allowing us to publish release
previews.
2026-05-07 20:01:40 +09:00
Simon Jackson 17abbd06b9 fix(ci): use pull_request.head.sha in validate-lockfile git diff
In a pull_request_target workflow, github.sha resolves to the base
branch HEAD (develop), not the PR head commit. This causes a
'fatal: bad object' error on fork PRs because the upstream develop
HEAD does not exist in the fork's cloned history. The script exits
immediately (set -e), the issues array is never populated, and every
fork PR touching pnpm-lock.yaml gets a blank 'Lockfile Validation
Failed' comment as a false positive.

Replace github.sha with github.event.pull_request.head.sha so the
diff correctly compares the PR base against the PR head.

The actions/checkout step above already uses pull_request.head.sha,
so this change also improves consistency.
2026-05-06 18:32:32 +01:00
Ashish Jain e57282e97a fix: make e2e scoping on-by-default so fork PRs benefit
GitHub does not expose repository variables (vars.*) to workflows
triggered by pull requests from forks. The previous logic required
E2E_SCOPE_BY_DIAGRAM == 'true' to enable scoping, which meant every
fork PR fell back to the full 5-container suite.

Flip the logic: scoping is now ON by default. The repository variable
acts as a kill-switch — set it to 'false' to disable scoping. When
the variable is unavailable (fork PRs) the expression evaluates to
'true', preserving scoped runs for external contributors.
2026-05-05 10:49:09 +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
Per Brolin 096290f6d2 Test of bug fix 2026-04-23 08:35:45 +02:00
Per Brolin 76131a6555 Use ARGOS_SUBSET config for scoped tests 2026-04-22 15:37:51 +02:00
Per Brolin 81be6af34d Remove hard coding for test no longer in use 2026-04-21 11:04:57 +02:00
Per Brolin 9fae2188a6 New test 2026-04-17 15:48:00 +02:00
Per Brolin ef9c7c8c58 Lint 2026-04-17 15:38:47 +02:00
Per Brolin f5af418f95 Corrected error 2026-04-17 15:25:45 +02:00
Per Brolin 1f01355daf Changed to correct branch for test 2026-04-17 15:20:37 +02:00
Per Brolin 2b35f49cf3 Test feature 2026-04-17 15:16:00 +02:00
Per Brolin 2389b403a2 First version of scoped e2e tests 2026-04-09 16:33:35 +02:00
Alois Klink f72957f34e ci: remove GIT_REF: ${{github.ref}}
GitHub already has a built-in environment variable called `GITHUB_REF`
for this value.

See: https://docs.github.com/en/actions/reference/workflows-and-actions/variables
2026-04-08 22:00:17 +09:00
Alois Klink d27bb448f7 style: add trailing newline to action file
This was done by running
`npx prettier --write .github/workflows/release-preview-publish.yml`.

The autofix CI job doesn't push changes to the `.github` folder to
prevent an infinite loop.
2026-04-08 21:55:39 +09:00
dagecko 73d95b2fae fix: quote env var references in run blocks
Did some research into the CodeQL envvar-injection-critical guidance
(https://codeql.github.com/codeql-query-help/actions/actions-envvar-injection-critical/)
and wanted to add this additional change to prevent shell injection
through attacker-controllable values like ref names and workflow inputs,
and to prevent unexpected behavior from special characters in secret values.

Before: echo ${REF_NAME}
After:  echo "${REF_NAME}"
2026-04-08 21:54:36 +09:00
dagecko a230bc6f54 fix: pin 2 actions to commit SHA, extract 2 expressions to env vars 2026-04-08 21:53:53 +09:00
renovate[bot] cd4bb94bd9 chore(deps): update peter-evans/create-pull-request digest to d32e88d 2026-04-07 12:55:33 +00:00
Ashish Jain cfbb2060c7 Merge pull request #7495 from aloisklink/ci/lint-renovatebot-config
ci: add lint action for renovate config
2026-04-01 13:35:09 +00:00
renovate[bot] 5d6aeedb75 chore(deps): update peter-evans/create-pull-request digest to 8170bcc 2026-04-01 12:04:42 +00:00
renovate[bot] 5f5c95ade1 chore(deps): update autofix-ci/action digest to 7a166d7 2026-04-01 09:35:54 +00:00
Alois Klink 0f6b0f1a09 ci: add lint action for renovate config
We've pushed a broken renovate.json config to the `develop` branch
accidentally. This shoud hopefully avoid similar PRs getting merged.

See: #7484
See: #7451
See: https://docs.renovatebot.com/config-validation/#config-validation
2026-03-16 19:17:43 +09:00
Alois Klink 2b12b9354d Merge remote-tracking branch 'origin/develop' into chore/upgrade-to-langium-v4-develop
Fixes a semantic merge conflict in
`packages/parser/tests/architecture.test.ts` due to the Langium v4
changing the `Architecture` value to `Architecture.$type`.

Conflicts:
	package.json
	pnpm-lock.yaml
2026-02-13 20:54:48 +09:00
Alois Klink 029b7f6e66 Merge commit 'dfd59470dc2b0f7c6c43fd7710f463bac3b2f9f1' into chore/upgrade-to-langium-v4-develop
Fixes conflicts due to the `import packageJson from './package.json'`
statements getting removed.

Conflicts:
	packages/mermaid/src/diagrams/info/infoDb.ts
	packages/mermaid/src/mermaidAPI.ts
2026-02-13 20:46:31 +09:00
darshanr0107 15906cb657 chore: update Cypress browser image to chrome-127
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2026-02-05 16:32:46 +05:30
renovate[bot] d1b790187d chore(deps): update peter-evans/create-pull-request digest to 2271f1d 2026-01-05 03:03:56 +00:00
renovate[bot] 09c60be450 chore(deps): update peter-evans/create-pull-request digest to 0979079 2025-12-10 10:49:20 +00:00
Sidharth Vinod bd85b51e24 fix: Upgrade npm to v11 to support trusted publishing 2025-12-02 21:56:59 +05:30
Shubham P db9c683316 Merge pull request #7192 from mermaid-js/renovate/patch-all-patch
chore(deps): update all patch dependencies (patch)
2025-11-24 08:09:55 +00:00
renovate[bot] 324cf05afd chore(deps): update all patch dependencies 2025-11-24 00:50:00 +00:00
renovate[bot] a357c1079f chore(deps): update peter-evans/create-pull-request digest to 84ae59a 2025-11-24 00:49:13 +00:00
renovate[bot] 608d623641 chore(deps): update peter-evans/create-pull-request digest to b4733b9 2025-11-17 01:33:08 +00:00
renovate[bot] 09920c0497 chore(deps): update peter-evans/create-pull-request digest to 0edc001 2025-11-06 12:05:55 +00:00
renovate[bot] 15e2824d53 fix(deps): update all patch dependencies 2025-11-06 10:04:11 +00:00
Sidharth Vinod 7f5160fa4d chore: Remove NPM_TOKEN from release workflow 2025-11-04 21:12:10 +07:00
Sidharth Vinod 1e7b71a085 Refactor GitHub Actions workflow for lockfile validation
Removed Node.js setup step and pnpm action version.

Co-authored-by: Alois Klink <alois@mermaidchart.com>
2025-11-03 23:30:27 -08:00
Sidharth Vinod 58137aa631 feat: Allow validation workflow to run on forks 2025-10-30 01:56:18 +09:00
Sidharth Vinod e7719f14c5 fix: Prevent duplicate comments by validation workflow 2025-10-30 01:55:58 +09:00
Alois Klink 6e67515f41 ci(codeql): enable CodeQL for GitHub Actions
Support for scanning GitHub Actions was added in 2024-12-17, see
https://github.blog/changelog/2024-12-17-find-and-fix-actions-workflows-vulnerabilities-with-codeql-public-preview/
2025-09-25 17:17:12 +09:00
shubhamparikh2704 59c8b07509 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into renovate/patch-all-patch 2025-09-17 19:34:56 +05:30
renovate[bot] 11a35c11ee chore(deps): update peter-evans/create-pull-request digest to 915d841 2025-09-16 16:02:14 +00:00
renovate[bot] 32eda8565c fix(deps): update all patch dependencies 2025-09-08 00:54:41 +00:00