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!
This commit is contained in:
Alois Klink
2025-09-13 00:31:19 +09:00
parent b36edd557e
commit 141c6b3808

View File

@@ -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