From 79bcb186519ef73c13fb3e3575a6e16e2b63f2d2 Mon Sep 17 00:00:00 2001 From: Andy Grove Date: Wed, 28 Oct 2026 08:21:32 -0600 Subject: [PATCH] build: format the generated release docs with the latest prettier --- dev/generate-release-docs.sh | 6 +++++- docs/source/contributor-guide/release_process.md | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dev/generate-release-docs.sh b/dev/generate-release-docs.sh index bfbfe0fc0ab..8ba19a875b7 100755 --- a/dev/generate-release-docs.sh +++ b/dev/generate-release-docs.sh @@ -73,12 +73,16 @@ done # must pass the check. GenerateDocs wraps the config/cast tables in prettier-ignore, but # the surrounding generated Markdown is not guaranteed prettier-clean. prettier honors # .prettierignore, so excluded pages (e.g. expressions.md) are left untouched. +# CI installs the latest prettier (`npm install -g prettier`), and releases of prettier differ +# in what they accept, so format with the latest too rather than with whatever version is +# installed locally or cached by npx. Generating the 1.2.0 docs with prettier 3.2.5 left 40 +# pages that the latest prettier rejects. if ! command -v npx >/dev/null 2>&1; then echo "ERROR: npx not found. Install Node/prettier (see docs/source/contributor-guide/development.md)" >&2 exit 1 fi echo "Formatting generated Markdown with prettier..." -npx prettier "${LATEST_USER_GUIDE}/**/*.md" --write +npx --yes prettier@latest "${LATEST_USER_GUIDE}/**/*.md" --write echo "" echo "Done! Generated documentation content in docs/source/user-guide/latest/" diff --git a/docs/source/contributor-guide/release_process.md b/docs/source/contributor-guide/release_process.md index c4e23606fee..ef31cf5bfc7 100644 --- a/docs/source/contributor-guide/release_process.md +++ b/docs/source/contributor-guide/release_process.md @@ -167,8 +167,9 @@ git add docs/source/user-guide/latest/ git commit -m "Generate docs for 0.13.0 release" ``` -The script runs one Maven build per supported Spark version, so it takes a while. Open a PR with this commit -targeting the release branch. +The script runs one Maven build per supported Spark version, so it takes a while. It formats the generated +pages with the latest prettier, which is what CI installs, so it needs network access to npm. Open a PR with this +commit targeting the release branch. ### Update Maven Version