-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Fix macOS onboarding issues #5262
Fix macOS onboarding issues #5262
Conversation
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5262 +/- ##
===========================================
+ Coverage 73.73% 79.51% +5.78%
===========================================
Files 164 175 +11
Lines 13864 14396 +532
Branches 741 855 +114
===========================================
+ Hits 10222 11447 +1225
+ Misses 3467 2755 -712
- Partials 175 194 +19
Flags with carried forward coverage won't be shown. Click here to find out more. |
@thedustin, Thank you for the contribution! |
📑 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