Skip to content

Harden Prettier tooling with prek - #27842

Draft
zaniebot wants to merge 5 commits into
astral-sh:mainfrom
zaniebot:agent/lock-prettier-hooks
Draft

zaniebot wants to merge 5 commits into
astral-sh:mainfrom
zaniebot:agent/lock-prettier-hooks

Conversation

@zaniebot

@zaniebot zaniebot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

The YAML hook already uses a frozen [email protected] revision, but its Node/npm installation policy is implicit, and the README generator fetches [email protected] through npx. Keep both versions in native prek hook environments, require prek==0.4.13, and pin managed Node to 24.19.0 with Renovate updates limited to Node 24. Configure frozen revisions and a seven-day tag cooldown for prek update, and apply npm_config_ignore_scripts=true and npm_config_min_release_age=7 in CI and documented contributor shells. The README generator passes the same policy to project-locked prek exec prettier-readmes; its frozen 3.8.3 alias is invoked explicitly and updated deliberately. This freezes hook revisions, not the full transitive npm dependency tree.

Related: astral-sh/ty#4314 applies the matching native prek policy. astral-sh/docstring-adder#236 removes an unnecessary prettier hook instead. astral-sh/uv#21193 uses a separate locked npm toolchain for its direct formatter invocations, and #27837 sets the install-script defaults for Ruff's other JavaScript projects. #27843 separately manages the documentation build through a dependency group.

@zaniebot zaniebot changed the title Lock repository Prettier tools Harden Prettier tooling with prek Aug 18, 2026
@astral-sh-bot

astral-sh-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

zanieb pushed a commit that referenced this pull request Aug 18, 2026
The WebAssembly test and npm publication jobs select `node-version: 24`,
so the Node.js and bundled `npm` versions can change between runs
without a workflow change. Pin both selectors to `24.19.0`, keeping the
existing Node major and publication permissions. The existing Renovate
GitHub Actions manager continues to track these inputs.

Related: #27838, #27839, and
#27844 pin the playground runtimes; #27842
covers the `prek`-managed runtime. astral-sh/packse#326 makes the
corresponding exact Node.js 24 pin for formatter CI.

Co-authored-by: zaniebot <[email protected]>
zanieb pushed a commit that referenced this pull request Aug 19, 2026
The playground workflows disable dependency lifecycle scripts, but
ordinary local installs in the playground, its API, and the ty benchmark
project still enable them. Set `ignore-scripts` in each project's
`.npmrc` so the same default applies outside CI, while preserving the
existing seven-day release-age policy. Because `ignore-scripts` also
suppresses first-party pre/post hooks, the playground's `build`,
`dev:build`, and `start` commands invoke their required WASM preparation
explicitly. The datastore instructions now install from the API lockfile
and invoke its local Wrangler instead of allowing `npx` to resolve a
separate dependency tree.

Related: astral-sh/ruff-vscode#1151 and astral-sh/ty-vscode#525 apply
the same install-script default to the editor extensions.
#27844 enforces the cooldown-supporting `npm` floor,
#27842 hardens the native `prek` formatter environment,
and #27838 locks the playground deployment toolchain.

---------

Co-authored-by: zaniebot <[email protected]>
@astral-sh-bot

astral-sh-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Full report with detailed diff (timing results)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant