Skip to content

[pull] develop from mermaid-js:develop - #230

Merged
pull[bot] merged 4 commits into
code:developfrom
mermaid-js:develop
Sep 1, 2026
Merged

[pull] develop from mermaid-js:develop#230
pull[bot] merged 4 commits into
code:developfrom
mermaid-js:develop

Conversation

@pull

@pull pull Bot commented Sep 1, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

ashish4mc and others added 4 commits August 31, 2026 11:25
`scripts/tsc-check.ts` built its throwaway project with `type-fest: '*'`
and a hardcoded `@types/d3: '^7.4.3'`, which means "whatever the registry
serves today". `mermaid`'s emitted declarations reference both directly,
and they were compiled against the ranges `packages/mermaid/package.json`
declares -- so resolving them freely checks the published types against
versions mermaid has never been built with.

That went off on 2026-08-30, when `type-fest@5.9.0` added `Float16Array`
to its `TypedArray` union. The generated tsconfig uses `lib: ["dom",
"es2020"]`, where that type does not exist, and leaves `skipLibCheck` off
so third-party declarations are checked too:

    node_modules/type-fest/source/typed-array.d.ts(14,4):
      error TS2304: Cannot find name 'Float16Array'.

Nothing in the repo had changed. Two `Unit Tests` runs of the same commit
started three seconds apart disagreed, purely on what npm resolved.

Read both ranges from the package under test instead, which is what the
note below the field already asked for. `typescript` stays unpinned on
purpose: a downstream picks its own compiler, so checking against the
current release is the signal this job exists to give.

`stdio: 'inherit'` goes in alongside it. Without it `execFileSync` buffers
the compiler output and a failure prints `<Buffer 0a 3e ...>`, which is
most of why this read as mysterious rather than as a version bump.

Fixes #8179

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
fix(ci): pin tsc-check's type dependencies to what mermaid declares
The edge joining a state to its note rendered as a solid line under
`look: neo`. Reproduces on `develop` today with any theme -- it is a neo
bug, not a theme one -- but making neo the default is what turns a
long-standing quirk into everyone's problem.

The dashes were expressed only as CSS: `.note-edge { stroke-dasharray: 5 }`
in `state/styles.js`. That is enough under `classic`, which writes no inline
stroke properties. Under `neo`, `insertEdge` writes an *inline*
`stroke-dasharray` on every edge, computed from the path length -- for a
solid edge, one long run trimmed at both ends so the arrow markers keep
their gaps. An inline style outranks a stylesheet rule, so the note edge
took the solid pattern with `.note-edge` still present and simply losing.

`insertEdge` picks between its two dash generators on `edge.pattern`, so
that is where the dashing belongs. The note edge now declares
`pattern: 'dashed'`, which routes it through the same generator every other
dashed edge uses and so keeps the marker gaps.

The `note-edge` class stays: `classic` has no inline dasharray, so that rule
is what dashes the line there, and it beats `edge-pattern-dashed` on source
order at equal specificity. Dropping it would change classic's dash length
from 5 to 3.

Verified by rendering: under neo the note edge goes from a single 93px run
to 49 segments of 2px, while `Active --> Idle` stays solid at one run;
under classic both are unchanged. Three unit tests pin the pattern, that
transitions stay patternless, and that the class is retained; removing the
fix fails the first. `stateDiagram-neo.spec.js` already renders a state with
a note, so Argos covers this visually.

Unit suite 5941 passing (2 pre-existing domus harness env-var failures);
lint, Prettier, cspell and build:types clean.
fix(state): draw the note edge dashed under the neo look
@pull pull Bot locked and limited conversation to collaborators Sep 1, 2026
@pull pull Bot added the ⤵️ pull label Sep 1, 2026
@pull
pull Bot merged commit 6206482 into code:develop Sep 1, 2026
10 of 11 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants