Skip to content

Lock Prettier for formatting checks - #161

Merged
zanieb merged 1 commit into
astral-sh:mainfrom
zaniebot:agent/lock-prettier
Aug 18, 2026
Merged

zanieb merged 1 commit into
astral-sh:mainfrom
zaniebot:agent/lock-prettier

Conversation

@zaniebot

@zaniebot zaniebot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

The formatting job lets npx resolve a new version of prettier on each run. Record [email protected] in a private npm manifest and lockfile, disable dependency lifecycle scripts by default, and invoke the installed binary. Formatter updates now have a reviewable version and integrity change instead of happening implicitly during CI.

Related: #162 adds an enforced seven-day release-age policy to this lockfile. astral-sh/astral-tl#21 and astral-sh/trusted-publishing-examples#12 make the same locked-formatter change. astral-sh/uv#21193 covers uv's direct prettier invocations.

@zanieb
zanieb marked this pull request as ready for review August 18, 2026 17:20
@zanieb
zanieb merged commit a37ea92 into astral-sh:main Aug 18, 2026
14 checks passed
zanieb pushed a commit that referenced this pull request Aug 20, 2026
The formatter is locked, but new npm resolutions have no release-age
policy or supported-client floor. Require `npm>=11.10.0` with
`engine-strict`, wait seven days before selecting newly published
packages, and pin Node.js to `24.19.0` in CI. Configure Renovate for the
root formatter manifest and the formatter workflow's Node.js pin under
the shared dependency policy, leaving unrelated GitHub Actions updates
disabled. The locked Prettier version is unchanged.

Follow-up to #161. Related: astral-sh/packse#324 and
astral-sh/astral-tl#21 apply the same effective seven-day `npm` policy;
astral-sh/uv#21193 combines it with locked formatter tooling.

---------

Co-authored-by: zaniebot <[email protected]>
charliermarsh pushed a commit to astral-experiments/ohm that referenced this pull request Aug 27, 2026
The formatting job downloads `prettier` through `npx` without a
committed lockfile. Record the existing `[email protected]` in a private
npm manifest and lockfile, disable dependency lifecycle scripts by
default, and invoke the installed binary. Require `npm>=11.10.0` through
`engines.npm` and `engine-strict` so older clients cannot silently
ignore the seven-day `min-release-age` policy for new resolutions, and
pin Node.js to `24.19.0` in CI. Formatter updates now have a reviewable
version and integrity change instead of happening during CI. Enable
Renovate for the root formatter manifest so its locked versions continue
to receive updates under the shared policy.

Related: astral-sh/hawk#161 and astral-sh/uv#21193 cover the
corresponding `prettier` consumption paths. astral-sh/internal-dev#61
records the equivalent locked tool environment for `bun`.
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.

2 participants