From 1c235f146a08467ec1d786e189b974d9a946ed94 Mon Sep 17 00:00:00 2001 From: Soham Daga Date: Sat, 19 Sep 2026 21:46:47 -0700 Subject: [PATCH] chore(docs): run Mintlify development with Node 22 ## Stack context This is the final PR in the V5 documentation stack and changes only the local development command. ## What and why Run Mintlify through an isolated Node 22 runtime so `bun dev` works on machines whose active Node version is newer than Mintlify supports. The wrapper preserves Portless and the existing fixed docs port. ```mermaid flowchart LR Command[bun dev] --> Portless[Portless proxy] Portless --> Wrapper[scripts/dev.sh] Wrapper --> Runtime[Node 22 plus Mintlify] ``` ## Validation - `bash -n apps/docs/scripts/dev.sh`: passed. - Mintlify validation under the Node 22 wrapper: passed. - No dependency or lockfile changes are included. ## Impact Local development only. Production documentation output is unchanged. --- apps/docs/package.json | 2 +- apps/docs/scripts/dev.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 apps/docs/scripts/dev.sh diff --git a/apps/docs/package.json b/apps/docs/package.json index a3aff8c29..db13029c5 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -6,7 +6,7 @@ "portless": { "name": "docs.dev.supermemory", "script": "dev:app", "appPort": 3003 }, "scripts": { "dev": "portless", - "dev:app": "bunx mintlify@latest dev --no-open --port 3003" + "dev:app": "bash scripts/dev.sh" }, "devDependencies": { "@types/bun": "latest", diff --git a/apps/docs/scripts/dev.sh b/apps/docs/scripts/dev.sh new file mode 100644 index 000000000..9e56ed22e --- /dev/null +++ b/apps/docs/scripts/dev.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -euo pipefail + +docs_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +docs_port="${PORT:-3003}" +mintlify_args=(dev --no-open --port "$docs_port") + +printf -v docs_dir_escaped "%q" "$docs_dir" +printf -v mintlify_args_escaped " %q" "${mintlify_args[@]}" + +# Run outside the monorepo so npx does not pick up Mintlify's Bun-installed +# dependency tree, which is incompatible with its Node-based schema compiler. +cd /tmp +exec npx --yes \ + --package node@22 \ + --package mintlify@latest \ + --call "cd $docs_dir_escaped && mintlify$mintlify_args_escaped"