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