Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📑 Summary
Hey folks, I would like to contribute to mermaid, so I started by going through the "Mermaid Contributing Guide", and made my dev environment ready.
While setting up my dev environment via docker (on macOS, so using colima) I encountered some issues, which I would like to solve with this pull request.
My setup: macOS (14.3); Colima: stable 0.6.7 (HEAD-a18cb38); Lima: 0.20.0
Sadly, I was not able to make the cypress tests work via docker and xquartz (macOS X11 server).
📏 Design Decisions
Explanation of the different issues I faced, and how I fixed them.
./run
Executable Had "ugly" OutputStarted the setup by using the
./run
executable, but the output produced was not colorful/bold for me. A look into the file showed me, that there was a shebang present that pointed to a fixed bash executable.A simple fix was to replace the shebang line
#!/bin/bash
with#!/usr/bin/env bash
to use env to start the proper bash executable../run
Without Any Arguments (or Unsupported Argument) FailsRunning
./run
without any arguments fails ugly like this:$ ./run ./run: line 102: run: command not found
$name
is not callable, this would expect the./run
executable to be in $PATH. I replaced it with$0
, the name/path of the file, to make it callable.""
(empty command) to the help command, to fallback to the help command when there is no command given.Pnpm via ./run Failed with
ERR_PNPM_LINKING_FAILED
ErrorsJust running this script failed for me. It slowly progressed further with each execution, but was not even close to finish after 3 executions.
Output of `./run pnpm install`
I have no experience with pnpm, so I searched, and found an issue discussing it: pnpm/pnpm#7024. Answers in the issue recommended to use
package-import-method=clone-or-copy
, which solved at least for me the issue, and should be fine to use in a docker environment../run test
Failed on linting stepRunning the tests failed for me:
Output of `./run pnpm test`
As you can see, the linting command failed, as it tried to lint the files in
.pnpm-store/
.After digging in the pnpm script, I noticed that this is not thrown by the "jison" linting as I first thought, but by the prettifier linting (see the "Checking formatting" message).
Adding the
.pnpm-store
file to the respecting ignore file fixed the issue for me.📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.develop
branch