From 141c6b380879b75447d6a72f415caaf951e5f329 Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Sat, 13 Sep 2025 00:31:19 +0900 Subject: [PATCH] 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! --- scripts/editor.bash | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/editor.bash b/scripts/editor.bash index d04246cc7..32d2f60ee 100755 --- a/scripts/editor.bash +++ b/scripts/editor.bash @@ -11,7 +11,6 @@ pushd packages/mermaid # Append commit hash to version jq ".version = .version + \"+${COMMIT_REF:0:7}\"" package.json > package.tmp.json mv package.tmp.json package.json -yarn link popd pnpm run -r clean @@ -26,13 +25,14 @@ cd mermaid-live-editor git clean -xdf rm -rf docs/ -# We have to use npm instead of yarn because it causes trouble in netlify +# Tells PNPM that mermaid-live-editor is not part of this workspace +touch pnpm-workspace.yaml + # Install dependencies -yarn install +pnpm install --frozen-lockfile # Link local mermaid to live editor -yarn link mermaid +pnpm link ../packages/mermaid # Force Build the site -yarn run build - +pnpm run build