Skip to content

chore(deps): lock file maintenance - #2039

Merged
stipsan merged 2 commits into
mainfrom
renovate/lock-file-maintenance
Sep 29, 2026
Merged

stipsan merged 2 commits into
mainfrom
renovate/lock-file-maintenance

Conversation

@squiggler-app

@squiggler-app squiggler-app Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Update Change
lockFileMaintenance All locks refreshed

🔧 This Pull Request updates lock files to use the latest dependency versions.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • On day 1 of the month, every 12 months (* * 1 */12 *)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate using a curated preset maintained by Sanity. View repository job log here


Note

Low Risk
Comment-only oxlint suppression moves and rule renames; no functional code changes.

Overview
Despite the Renovate lock file maintenance framing, the visible diff is not dependency logic—it’s oxlint housekeeping across multiple Sanity plugins after a tooling bump.

Suppressions are repositioned so oxlint-disable-next-line sits on the line that actually triggers the rule (typically the as … cast or the closing ) of a call), instead of on the line above. That pattern shows up in @sanity/assist, block-insert-picker, document-internationalization, presets, internationalized-array tests/utils, and sanity-translations-tab.

Rule IDs are normalized: many typescript-eslint/no-unsafe-type-assertion comments become typescript/no-unsafe-type-assertion or plain no-unsafe-type-assertion. Image hotspot array switches one spot to a short oxlint-disable / oxlint-enable block around an image value cast.

New react/purity suppressions are added where code uses new Date() / Date.getTime() inside render or useMemo (Assist presence/history, TimeAgo, media table “last updated”).

@sanity/assist fixedListenQuery only reformats the defer(...) wrapper; the disable comment moves to the observable type assertion.

No feature, API, or runtime behavior changes—only lint comment placement and identifiers so CI stays green with updated oxlint.

Reviewed by Cursor Bugbot for commit 736db11. Bugbot is set up for automated code reviews on this repo. Configure here.

@squiggler-app
squiggler-app Bot requested a review from a team as a code owner September 28, 2026 14:43
@squiggler-app
squiggler-app Bot enabled auto-merge (squash) September 28, 2026 14:43
@squiggler-app
squiggler-app Bot requested review from pedrobonamin and removed request for a team September 28, 2026 14:43
@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
plugins-studio Ready Ready Preview Sep 29, 2026 12:45am UTC
1 Skipped Deployment
Project Deployment Actions Updated
plugins-e2e-test-studio Ignored Ignored Sep 29, 2026 12:45am UTC

Request Review

@changeset-bot

changeset-bot Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 736db11

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@socket-security

socket-security Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​bynder/​compact-view@​6.0.1 ⏵ 6.1.091 -210098 +197 +20
Updatednpm/​@​changesets/​cli@​3.0.1 ⏵ 3.0.399 +110074 +195 -1100
Updatednpm/​@​lezer/​highlight@​1.2.3 ⏵ 1.2.41001007690100
Updatednpm/​@​sanity/​vanilla-extract-vite-plugin@​0.2.17 ⏵ 0.2.1976 -91009997 +1100
Updatednpm/​@​types/​google.maps@​3.65.5 ⏵ 3.66.410010079 +194 +2100
Updatednpm/​@​sanity/​ailf@​7.36.0 ⏵ 7.38.180 -710083 +197100
Updatednpm/​@​types/​node@​24.13.3 ⏵ 24.19.010010081 +196 +1100
Updatednpm/​tsx@​4.23.12 ⏵ 4.23.151001008194100
Updatednpm/​@​codemirror/​legacy-modes@​6.5.3 ⏵ 6.5.410010010088 +2100
Updatednpm/​oxlint@​1.83.0 ⏵ 1.86.099 +110091 +196 +1100
Updatednpm/​@​tanstack/​react-query@​5.101.4 ⏵ 5.104.099 +110091 +498 +1100
Updatednpm/​@​uiw/​codemirror-themes@​4.25.11 ⏵ 4.25.1210010010092 +5100
Updatednpm/​katex@​0.18.4 ⏵ 0.18.992 +1100100 +199 +2100
Updatednpm/​@​vis.gl/​react-google-maps@​1.9.0 ⏵ 1.10.19910010094 -2100
Updatednpm/​react-hook-form@​7.85.0 ⏵ 7.89.099100100 +194 -1100
Updatednpm/​@​testing-library/​user-event@​14.6.6 ⏵ 14.6.7100 +1100100 +194100
Updatednpm/​react-virtuoso@​4.18.12 ⏵ 4.18.15100 +1100100 +195 +1100
Updatednpm/​oxlint-tsgolint@​7.0.2001 ⏵ 7.0.20031001009795 +1100
Updatednpm/​knip@​6.33.0 ⏵ 6.38.099 +110095 +196 +1100
Updatednpm/​@​changesets/​changelog-github@​1.0.0 ⏵ 1.0.11001009595 +2100
Updatednpm/​inquirer@​14.0.2 ⏵ 14.2.210010010097 +1100
Updatednpm/​@​portabletext/​editor@​7.12.3 ⏵ 7.12.499 +1100100100100
Updatednpm/​@​playwright/​test@​1.62.1 ⏵ 1.63.010010010099100
Updatednpm/​@​portabletext/​plugin-input-rule@​6.0.21 ⏵ 6.0.2299100100100100

View full report

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

✅ E2E Tests

🟢 44 passed • view full report • view run

Studio: https://plugins-e2e-test-studio-iaalogqwi.sanity.dev

Datasets: pr-2039-chromium-36504590442, pr-2039-firefox-36504590442

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 33.32% 5811 / 17435
🔵 Statements 33.1% 6144 / 18558
🔵 Functions 29.4% 1537 / 5227
🔵 Branches 24.55% 3018 / 12290
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
plugins/@sanity/assist/src/_lib/fixedListenQuery.ts 13.04% 0% 0% 13.04% 24-29, 38-53, 63-101
plugins/@sanity/assist/src/assistDocument/AssistDocumentInput.tsx 0% 0% 0% 0% 15-62
plugins/@sanity/assist/src/assistDocument/components/AssistDocumentForm.tsx 0.98% 0% 0% 1.05% 43-289
plugins/@sanity/assist/src/assistInspector/InstructionTaskHistoryButton.tsx 7.27% 0% 0% 8.51% 78-167, 183-259
plugins/@sanity/assist/src/assistInspector/index.ts 33.33% 100% 0% 33.33% 11-26
plugins/@sanity/assist/src/components/TimeAgo.tsx 0% 0% 0% 0% 5-18
plugins/@sanity/assist/src/presence/AssistAvatar.tsx 36.36% 0% 0% 36.36% 61-96
plugins/@sanity/assist/src/presence/AssistDocumentPresence.tsx 0% 0% 0% 0% 10-50
plugins/@sanity/assist/src/presence/useAssistPresence.ts 3.84% 0% 0% 4% 11-63
plugins/@sanity/block-insert-picker/src/blockInsertPicker.tsx 95.02% 85.98% 97.67% 97.51% 120, 142, 244-245, 264, 274, 346, 358, 371, 456-457
plugins/@sanity/document-internationalization/src/components/LanguageOption.tsx 93.75% 89.13% 100% 93.61% 76, 80, 84
plugins/@sanity/document-internationalization/src/test/helpers.ts 100% 100% 100% 100%
plugins/@sanity/presets/src/registry.tsx 95.34% 89.65% 100% 95.23% 92, 160
plugins/sanity-plugin-hotspot-array/src/ImageHotspotArray.tsx 4.25% 0% 0% 4.34% 42-179
plugins/sanity-plugin-internationalized-array/src/utils/getDocumentsToTranslate.ts 92.3% 88.23% 100% 96% 35, 42
plugins/sanity-plugin-media/src/components/TableRowAsset/index.tsx 6.57% 0% 0% 7.35% 60-73, 85-89, 96-99, 103-411
plugins/sanity-translations-tab/src/configuration/baseFieldLevelConfig.ts 9.52% 0% 0% 9.52% 25-38, 45-94
plugins/sanity-translations-tab/src/configuration/baseI18nArrayConfig.ts 7.69% 0% 0% 7.69% 24-52, 59-99
plugins/sanity-translations-tab/src/configuration/baseDocumentLevelConfig/documentLevelPatch.ts 4% 0% 0% 4.16% 30-111
plugins/sanity-translations-tab/src/configuration/baseDocumentLevelConfig/index.ts 8.69% 0% 0% 8.69% 27-87, 97-115
plugins/sanity-translations-tab/src/configuration/baseDocumentLevelConfig/legacyDocumentLevelPatch.ts 5.26% 0% 0% 5.26% 12-61
Generated in workflow #10179 for commit 736db11 by the Vitest Coverage Report Action

Following the oxlint 1.86.0 update, the CI `lint` job failed due to
newly introduced `react/purity` diagnostics and a change in diagnostic
span anchoring for multiline `no-unsafe-type-assertion` expressions. Per
task instructions, targeted `oxlint-disable-next-line` suppressions have
been added and realigned, deferring architectural refactors to follow-up
PRs.

### Summary of Changes

* **`react/purity` suppressions**: Added `oxlint-disable-next-line
react/purity` directives across render-phase `new Date()` and
`Date.now()` calls in `@sanity/assist` and `sanity-plugin-media`.
* **Span realignment for `no-unsafe-type-assertion`**: In oxlint 1.86.0,
multiline type assertions report diagnostics on the line containing `}
as <Type>` rather than the opening line of the statement. Realigned
directives directly above the assertion line across `@sanity/assist`,
`sanity-plugin-hotspot-array`, `@sanity/document-internationalization`,
`sanity-plugin-internationalized-array`, `@sanity/block-insert-picker`,
`sanity-translations-tab`, and `@sanity/presets`.

### Example

```tsx
// Before (oxlint < 1.86.0 anchored at statement start; 1.86.0 flagged the assertion line as unsuppressed):
// oxlint-disable-next-line typescript/no-unsafe-type-assertion
const config = {
  ...defaults,
  enabled: true,
} as PluginConfig

// After (anchored directly above the assertion line):
const config = {
  ...defaults,
  enabled: true,
  // oxlint-disable-next-line typescript/no-unsafe-type-assertion
} as PluginConfig
```

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Comment-only lint directive moves and new suppressions; no application
logic, data handling, or API changes.
> 
> **Overview**
> Restores CI lint after **oxlint 1.86.0** by updating inline
suppressions only—no runtime or type behavior changes.
> 
> **`react/purity`**: Adds `oxlint-disable-next-line react/purity` where
components call `new Date()` / relative time formatting during render
(Assist presence/history, `TimeAgo`, media asset rows).
> 
> **`no-unsafe-type-assertion` span anchoring**: Multiline `as Type`
assertions now report on the closing assertion line, so
`oxlint-disable-next-line` comments were moved from the statement start
to immediately above the `} as …` line across Assist,
block-insert-picker, document-internationalization,
internationalized-array, presets, hotspot-array, and
sanity-translations-tab. A few rule names were normalized to oxlint’s
`no-unsafe-type-assertion` (including a block disable/enable in
`ImageHotspotArray`).
> 
> Test files received the same realignment for mock `as any` / stub
return values.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
7fe29fa. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@stipsan
stipsan disabled auto-merge September 29, 2026 00:45
@stipsan
stipsan merged commit cb68d65 into main Sep 29, 2026
25 checks passed
@stipsan
stipsan deleted the renovate/lock-file-maintenance branch September 29, 2026 00:52
cursor Bot pushed a commit that referenced this pull request Sep 29, 2026
Brings in the lock file maintenance from #2039. The only conflict was the
generated pnpm-lock.yaml: resolved by taking main's lockfile and letting
`pnpm install` re-apply this branch's manifest changes, which adds just the
plugins/@sanity/themer and dev/storybook importers and the catalog bumps
on top of main's refreshed resolutions.
cursor Bot pushed a commit that referenced this pull request Sep 29, 2026
Resolves the pnpm-lock.yaml conflict with the lock file maintenance in
#2039 by taking main's lockfile and running pnpm install. Versions only
move for this branch's own changes (oxfmt 0.71.0 with tinypool 2.2.0,
husky and lint-staged removed). pnpm also recomputes the peer suffixes
of snapshots that have oxfmt as an optional peer (sanity@next,
@sanity/cli); clean main plus this branch's package.json and catalog
changes yields the same lockfile.
cursor Bot pushed a commit that referenced this pull request Sep 29, 2026
Resolves the pnpm-lock.yaml conflict with the lock file maintenance in
#2039 by taking main's lockfile and running pnpm install. Versions only
move for this branch's own changes (the vitest tree: vitest,
@vitest/coverage-v8, @vitest/mocker and @vitest/spy 5.0.2, plus
why-is-node-running 3.2.2, tinybench 6.2.0 and magic-string 1.4.2).
pnpm also recomputes the peer suffixes of snapshots that have vitest as
an optional peer (sanity@next, @sanity/cli and others); the Studio next
versions stay at main's. Clean main plus this branch's
pnpm-workspace.yaml yields the same lockfile.
cursor Bot pushed a commit that referenced this pull request Sep 29, 2026
Resolves the conflicts with the lock file maintenance in #2039, which also
brought #2045's suppression changes to main:

- pnpm-lock.yaml: took main's lockfile and ran `pnpm install` to re-apply
  this branch's catalog change. main already resolves oxlint 1.86.0 and
  oxlint-tsgolint 7.0.2003, so no resolved version changes; the diff is
  the catalog specifiers plus pnpm recomputing sanity@next peer-variant
  suffixes. A clean main with only this branch's pnpm-workspace.yaml
  change produces the identical lockfile.
- plugins/@sanity/assist/src/_lib/fixedListenQuery.ts: took main's version
  (#2045's), which already fixes the suppression.
cursor Bot pushed a commit that referenced this pull request Sep 29, 2026
…2039

@sanity/presets and sanity-plugin-hotspot-array only had #2045's suppression moves, which reached main with the lock file maintenance in #2039, so this PR no longer changes them.
cursor Bot pushed a commit that referenced this pull request Sep 29, 2026
Resolves the pnpm-lock.yaml conflict with the lock file maintenance in
#2039 by taking main's lockfile and running pnpm install. Versions only
move for this branch's own changes: tsdown 0.23.0, @sanity/tsdown-config
0.28.2, @sanity/pkg-utils 13.0.3, rolldown-plugin-dts 0.28.6 (the patch
still applies, with the same hash), @sanity/vanilla-extract-tsdown-plugin
0.4.2 and their dependencies. pnpm also recomputes the peer suffixes of
the sanity@next, @sanity/cli and @sanity/runtime-cli snapshots; the Studio
stays on 6.17.0-next.108.
cursor Bot pushed a commit that referenced this pull request Sep 29, 2026
Brings in Renovate's lock file maintenance (#2039). pnpm-lock.yaml
conflicted: it takes main's refreshed lockfile, and pnpm 12.6.0 re-applies
this branch's changes on top (the packageManagerDependencies block and the
[email protected] tree with its optional-peer suffixes). No other version moves;
sanity stays on 6.17.0-next.108, and pnpm-workspace.yaml needed no changes.
stipsan added a commit that referenced this pull request Sep 29, 2026
…2048)

<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
Puts this repo on the same pnpm version and settings as
[sanity-io/ui](https://github.com/sanity-io/ui) `main`: `packageManager`
`[email protected]`, ui's pnpm settings in `pnpm-workspace.yaml`, ui's CI
setup action (`pnpm/setup@v3`) but with its store cache off, and a
lockfile regenerated with pnpm 12.6.0. The `Dedupe lockfile` workflow
stays, with the one change pnpm 12 needs.

## Builds on #2044, supersedes #2043, #2044 and #1131

- **#2044** (pnpm 12.6.0 + `autoDedupe` + Vercel CLI bump) is the base.
Its commits are cherry-picked with `-x`. #2044's interim
`installCommand` workaround in `dev/e2e-studio/vercel.json`, which it
later removed, is left out, so this PR doesn't touch any Vercel config.
#2044 left CI on `pnpm/action-setup` + `actions/setup-node`; this PR
switches to ui's action.
- **#2043** (Renovate's plain `packageManager` bump) fails `E2E /
deploy-preview`, because `vercel@57` can't parse pnpm 12's lockfile (see
below).
- **#1131** (an early `pnpm/setup@v1` attempt) is covered by the CI
change here.
- **#2018** (lockfile regenerated from scratch) is not superseded: it
re-resolves every dependency, which is out of this PR's scope.

## Changes

| | Before | After |
| --- | --- | --- |
| `packageManager` | `[email protected]` | `[email protected]` (as in ui) |
| `pnpm-workspace.yaml` | | `autoDedupe: true` and
`strictPeerDependencies: false` (as in ui) |
| `.github/actions/setup` | `pnpm/action-setup@v6` +
`actions/setup-node@v7` + `pnpm install` | ui's action (`pnpm/setup@v3`,
`runtime: node@lts`) with `cache: false`, where ui has `cache: true` |
| `.github/workflows/pnpm-if-needed.yml` (`Dedupe lockfile`) | runs
`pnpm dedupe` once | kept; runs `pnpm dedupe` twice |
| `vercel` (root devDependency) | `^57.0.0` | `^60.1.3` |

- **Lockfile:** main's lockfile after #2039, plus this PR's changes as
pnpm 12.6.0 re-applied them. Those changes are the
`packageManagerDependencies` block, the `[email protected]` tree with the
optional-peer suffixes it brings, and `autoDedupe`'s dedupes: the same
`zod` and `gaxios` ones as the pending #2052, plus the peer toggle
described below. No other versions change, and `[email protected]`
stays put. #2039's refresh had already removed the three duplicates the
first revision collapsed.
- **Vercel CLI:** pnpm 12 writes the lockfile as two YAML documents.
`vercel@57`'s bundled `@vercel/build-utils` reads only the first, falls
back to npm, and fails on `workspace:*`, which is #2043's failure.
`58.9.5` is the first CLI that parses it, and every release from
`58.7.0` on ships without npm provenance (still published from GitHub
Actions OIDC). So `trustPolicy: no-downgrade` needs the exact versions
pnpm reports as `ERR_PNPM_TRUST_DOWNGRADE` in `trustPolicyExclude`:
`[email protected]` and 31 `@vercel/*` packages.
- **CI setup:** `pnpm/setup` reads `packageManager`, installs Node LTS,
runs `pnpm install`, and caches pnpm's lockfile-verification verdict
across jobs, which saves the ~28s supply-chain check. `ailf-eval.yml`
passes `runtime: node@lts` instead of `node-version: lts/*`.
`release.yml` keeps `pnpm/action-setup` + `actions/setup-node`, as in
ui.
- **Store cache off, unlike ui** (commit `bddef7a4`). With `cache:
true`, `pnpm/setup` uploads a new ~645 MiB store entry after every job,
even for an unchanged lockfile, because its keys include the run id.
That was 12 entries (7.7 GB) per push here, evicting the Playwright
browser caches the e2e jobs reuse. With it off, test shards spend 16–19s
in setup and nothing afterwards, against 19–23s plus 9–12s of upload
with it on. ui keeps `cache: true` and has the same issue. Revert
`bddef7a4` to match ui.
- **`Dedupe lockfile` workflow kept, adapted for pnpm 12** (commit
`a7e1057f`). On the current lockfile, pnpm 12.6.0's `pnpm dedupe` isn't
idempotent. Each run toggles `@vitejs/devtools` and
`oxc-transform-react` in the peer suffixes of
`plugins/@sanity/debug-preview-url-secret-plugin`'s `sanity` and
`@sanity/tsdown-config` entries, without changing any version. Run once,
as before, the workflow would open a toggle-only PR after every lockfile
change on `main`, and each automerged dedupe PR would trigger the next.
A second run undoes the toggle and keeps real dedupes. An earlier commit
in this branch deleted the workflow; `82810b5e` reverts that.
- **Docs:** AGENTS.md, CONTRIBUTING.md and README.md now require pnpm
v12. AGENTS.md and `e2e/README.md` explain the two-document lockfile and
the Vercel CLI floor; per Copilot's review of #2044, the trust-policy
wording only lists versions that pnpm reports as downgrades. AGENTS.md
also says not to commit lockfile diffs that only flip the peer toggle.

No changeset: no published package's manifest or runtime code changes,
as with the pnpm 11 bump in #1579.

## Merge with main

`main` gained one commit after this branch started: Renovate's lock file
maintenance (#2039, `cb68d65e`). It conflicted only in `pnpm-lock.yaml`.
`main` is merged in rather than rebased, so nothing was force-pushed.
The resolution takes main's lockfile and lets pnpm 12.6.0 re-apply this
PR's changes; `pnpm-workspace.yaml` needed no further changes. #2039's
25 source files merged cleanly.

## What Cody needs to do

- **Add the "🤖 bot" label.** The agent's label tool can't edit PRs in
this repo.
- **Close #2044 and #1131** when this lands. Renovate autocloses #2043.
The pending dedupe PR #2052 is redundant, since its four lines are
already in this lockfile. It merges cleanly with this PR in either
order.
- **Vercel:** nothing to set up. No project, env var or `vercel.json`
changes; only the root `vercel` CLI devDependency moves.
- **Secrets and ruleset:** no new secrets, and the required checks
(`lint`, `build`, `test`, Socket) keep their names.

## Open questions

1. **Vercel CLI trust exclusions.** This is #2044's call, which
overrides the reason #1890 was closed: 32 exact versions without
provenance in `trustPolicyExclude`. Every future `vercel` bump has to
add its own versions, so Renovate's `vercel` PRs will fail their
artifact update until someone does. The alternative is e2e previews that
can't build on pnpm 12.
2. **`strictPeerDependencies: false`** matches ui but is already pnpm's
default; ui carried it over from an old `.npmrc`. Keep it for parity, or
drop it?
3. **Store cache in ui.** ui has the same per-job uploads. Turn its
store cache off too?

## Known pnpm 12.6.0 issue

The peer toggle also shows up locally. A fresh `pnpm install`, or the
implicit install pnpm runs before scripts when `node_modules` looks
stale, flips those two suffixes in `pnpm-lock.yaml`. Frozen installs,
which CI uses, never do. The lockfile before #2039 didn't toggle; main's
refreshed resolutions exposed it, and it happens with `autoDedupe` off
too.

## Not in this PR

- vitest 5, oxfmt (#2047), oxlint (#2049) and the tsdown setup are
sibling PRs. Whichever lands later merges `main` and regenerates the
lockfile.
- ui's `packageExtensions` entry for `@testing-library/jest-dom` belongs
to its vitest 5 setup.
- ui's root `engines.node: ">=22.13"` and macOS test job are Node and
test-matrix changes, not pnpm. Plugins' tooling needs Node ≥ 22.18
anyway (AGENTS.md).
- Plugins-specific pnpm settings that ui doesn't have (`trustPolicy`,
`dedupePeers`, `dedupeDirectDeps`, `publicHoistPattern`) stay.

## Verification

- **Lockfile:** regenerated on `main` at `cb68d65e` by pnpm 12.6.0 run
directly on Node 24.21.0. A cold `pnpm install --frozen-lockfile` passes
the supply-chain check (2,615 entries), and without the Vercel
exclusions it fails with `ERR_PNPM_TRUST_DOWNGRADE`.
- **Dedupe workflow:** from the committed lockfile, from its toggled
state, and from the committed lockfile with #2052's duplicates put back,
two `CI=true pnpm dedupe --config.ignore-scripts=true` runs give,
respectively, no change, no change, and exactly #2052's dedupes. A
single run gives the toggle every time.
- **Local checks on the merged tree:** `pnpm lint`, `pnpm knip`, `pnpm
build` (52/52 tasks) and `pnpm test run` (224 files, 1,391 tests) pass.
- **CI:** everything passes on `bddef7a4`, including `deploy-preview`
(Vercel CLI 60.1.3 detects the lockfile and installs with pnpm 12.6.0)
and e2e on Chromium and Firefox. CI on `a7e1057f`, which only touches
the dedupe workflow and AGENTS.md, is running.
- **zizmor:** `zizmor .github` reports the same findings as on `main` at
every severity.

<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-0c45b56b-fd33-55f7-b22c-89bde73748e4?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-0c45b56b-fd33-55f7-b22c-89bde73748e4&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <[email protected]>
stipsan added a commit that referenced this pull request Sep 29, 2026
…ommit hook on lefthook (#2047)

<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
Brings oxfmt in line with sanity-io/ui's `main`: the same version, the
same config, and the same scripts and CI wiring. The pre-commit hook
moves from husky and lint-staged to lefthook, set up like
sanity-io/sanity's. Supersedes #1919.

## Commits

1. **`chore(deps): update oxfmt to ^0.71.0`**: the catalog goes from
^0.63.0 to ui's ^0.71.0, with ui's oxfmt resolution: oxfmt 0.71.0 and
`tinypool` 2.2.0, the same versions and integrity hashes as ui's
lockfile. There's a patch changeset for `@sanity/plugin-kit`, whose
optional `oxfmt` peer uses the catalog.
2. **`chore(format): align the oxfmt config with sanity-io/ui`**: root
`oxfmt.config.ts` now ignores `storybook-static/**` and `CHANGELOG.md`,
like ui's `.oxfmtrc.json`. `.vscode/settings.json` points
`oxc.fmt.configPath` at `oxfmt.config.ts` instead of the `.oxfmtrc.json`
that #1565 deleted. AGENTS.md records the parity with ui and the
exceptions.
3. **`chore: drop the husky and lint-staged pre-commit hook, like
sanity-io/ui`**: superseded by commit 6, which brings the hook back on
lefthook.
4. **`chore(format): drop the oxfmt preset's .changeset/*.md override,
like sanity-io/ui`**: the `@sanity/plugin-kit/oxfmt` preset loses its
Prettier-era `singleQuote: false` override for `.changeset/*.md`, as
ui's `.oxfmtrc.json` did when ui switched Changesets to oxfmt formatting
(sanity-io/ui#2957). It gets a patch changeset for `@sanity/plugin-kit`,
since the preset is published. This part moved here from #2046 because
it's formatter config. AGENTS.md now explains how changesets get quoted.
5. **`chore(format): run pnpm format`**: requotes this PR's own
changeset from commit 1. Everything else already passed under oxfmt
0.71.
6. **`chore: run oxfmt on staged files with lefthook, like
sanity-io/sanity`**: see below.

## Pre-commit hook: husky and lint-staged → lefthook

This mirrors how sanity-io/sanity replaced husky and lint-staged
(sanity-io/sanity#12755, then sanity-io/sanity#12767 and
sanity-io/sanity#12953):

- **`lefthook` ^2.1.14** as a root devDependency, sanity's range. It
resolves to 2.1.14, as in sanity's lockfile.
- **`allowBuilds: lefthook: true`** in `pnpm-workspace.yaml`, as in
sanity. Lefthook's own install script runs `lefthook install` during
`pnpm install`, and it skips when `CI` is set, which covers GitHub
Actions and Vercel. There's no root `postinstall` script: sanity dropped
its `lefthook install --reset-hooks-path` postinstall in #12767 for this
package build.
- **`lefthook.yml`** with sanity's layout: a parallel `pre-commit` with
two jobs that run oxfmt on staged files with `stage_fixed: true`. The
jobs are `format-scripts` (`*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}`) and
`format-other` (`*.{md,yml,yaml,css,json,jsonc}`).
- `mts`, `cts` and `jsonc` are additions to sanity's globs. They cover
this repo's `.mts`, `turbo.jsonc` and `knip.jsonc` files, which the old
lint-staged glob partly covered.
- sanity's `oxlint --fix` line is left to the oxlint alignment (#2049).
- **Direct binary calls:** the jobs call `node_modules/.bin/oxfmt`
instead of sanity's `pnpm oxfmt`. Running pnpm in a hook triggers pnpm
12's implicit install, which flips the lockfile's peer toggle (see
AGENTS.md). sanity switched to `pnpm oxfmt` in #12953 because lefthook
doesn't put `node_modules/.bin` on `PATH`; the path solves that too.
- **Lockfile:** `pnpm-lock.yaml` gains only lefthook 2.1.14 and its
platform packages (100 lines). A plain install would also have bumped
the Studio's `next` overrides from `6.17.0-next.108` to
`6.17.0-next.112`, so I resolved it through a local registry proxy that
served the locked versions as `next`, as AGENTS.md describes. The
lockfile has no `localhost` or `tarball:` entries.
- **Docs:** AGENTS.md documents the hook, `LEFTHOOK=0`, the one-time
reset for clones that ran husky, and `pnpm
--config.verify-deps-before-run=false <script>` for local runs. README's
note that formatting also runs in a pre-commit hook is back.

## Merges with `main`

`main` is merged in, not rebased, so nothing was force-pushed. After
each merge, `pnpm-lock.yaml` is `main`'s lockfile regenerated with pnpm
12.6.0, invoked directly so `packageManagerDependencies` stays, minus
the peer toggle that AGENTS.md describes.

- **#2039 (lock file maintenance):** only the lockfile conflicted.
- **#2048 (pnpm 12.6.0):** `package.json` conflicted next to the removed
`lint-staged` block. The resolution keeps both sides: `main`'s
`packageManager: [email protected]` and `vercel` ^60.1.3, without the block. A
follow-up commit restores `main`'s side of the peer toggle, which the
regeneration had flipped.
- **#2046 (themer move):** only the lockfile conflicted. `pnpm format`
then requoted #2046's three changesets in a separate commit:
`dashboard-widget-vercel-xstate`, `shared-deps-sanity-ui-icons-motion`
and `themer-plugins-monorepo`, 45 frontmatter lines, quote-only. The new
`plugins/@sanity/themer` package and `dev/storybook` already passed.
- **#2053 (Version Packages):** it released and deleted those three
changesets, so the modify/delete conflicts resolve to `main`'s
deletions. It didn't change the lockfile, and `pnpm format` changes
nothing after the merge.

`pnpm-lock.yaml` differs from `main` only by this PR's own changes:

- oxfmt and its bindings go from 0.63.0 to 0.71.0, and `tinypool` from
2.1.0 to 2.2.0.
- husky, lint-staged and their four exclusive dependencies are removed.
- lefthook 2.1.14 and its platform packages are added.

No other version moves, and the Studio stays on `6.17.0-next.108`.

## How it compares with ui

- **Options:** identical, overrides included (`printWidth`, `semi`,
`singleQuote`, `bracketSpacing`, `quoteProps`, `sortImports`,
`sortPackageJson`). They come from the `@sanity/plugin-kit/oxfmt`
preset.
- **Ignore patterns:** `dist/**`, `storybook-static/**`,
`pnpm-lock.yaml` and `CHANGELOG.md` in both. Two differences remain:
  - `turbo/**/*.hbs` is plugins-only (the turbo generator templates).
- ui's `**/sanity.types.ts` is left out. In ui it was for
`apps/docs/sanity.types.ts` and has matched nothing since the docs app
went static. Here, `pnpm typegen` formats
`dev/test-studio/sanity.types.ts` on purpose: the test studio runs
typegen with `formatGeneratedCode: false` and then `pnpm format`.
Ignoring the file would make the next TypeGen PR unformat it.
- **Config file:** plugins keeps `oxfmt.config.ts` re-exporting the
published preset instead of ui's `.oxfmtrc.json`. #1565 made that switch
so the preset is exactly what the monorepo formats with, and
plugin-kit's `verify-package` expects plugins to use it. oxfmt, the Oxc
extension and Changesets' formatter detection all read
`oxfmt.config.ts`. See the open question.
- **Scripts and CI:** the `format` script is identical to ui's (`oxfmt .
--no-error-on-unmatched-pattern`). Neither repo checks formatting on
PRs, and both run the same shared `format-if-needed.yml` on `main`, so
no workflow changes are needed. `oxfmt .` also formats
`.github/workflows/*.yml`, which that workflow can't push, and 0.71
changes none of them. ui has no pre-commit hook; this repo keeps one, on
lefthook.
- **VS Code:** ui points `oxc.fmt.configPath` at its config file, but
plugins pointed it at a file that doesn't exist. I drove `oxfmt --lsp`
directly: with the old setting, the editor silently formats with oxfmt's
defaults (double quotes, semicolons, bracket spacing, unsorted imports),
and with `oxfmt.config.ts` it matches `pnpm format`.

## Changesets

- **Changesets formats what it writes with oxfmt.**
`.changeset/config.json` sets `"format": "oxfmt"` (from #2046). I called
`@changesets/write` (what `changeset add` uses) directly. With the
override it writes `"@sanity/plugin-kit": patch`; without it,
`'@sanity/plugin-kit': patch`, the same as `pnpm format`.
- **`changeset version` is unaffected.** It only hands `CHANGELOG.md`
files to the formatter. This PR ignores those, and oxfmt skips them and
exits 0 thanks to `--no-error-on-unmatched-pattern`.
- **`changeset status` parses the single-quoted frontmatter.** It lists
this PR's two changesets for `@sanity/plugin-kit` 10.0.11.

## What to expect after merging

- **Renovate changesets get a follow-up format PR, as in ui.** The
shared Renovate changesets workflow uses
`mscharley/dependency-changesets-action`, which always writes double
quotes and has no formatting option. After a Renovate PR merges, the
Auto format workflow opens (or updates) a `chore(format): 🤖 ✨` PR that
requotes the changeset. ui has had one after most Renovate merges since
sanity-io/ui#2957: sanity-io/ui#2971, sanity-io/ui#2980,
sanity-io/ui#2986, sanity-io/ui#2998, sanity-io/ui#3002,
sanity-io/ui#3013 and sanity-io/ui#3024.
- **Clones that ran husky need a one-time reset.** They still have
`core.hooksPath=.husky/_`. There, `lefthook install` refuses to install
and prints how to fix it, and `pnpm install` continues. Until the reset,
husky's leftover runner does nothing, so commits simply aren't
formatted. `git config --unset core.hooksPath && pnpm install` fixes it.

## Related PRs

- **#1919** (Renovate, oxfmt ^0.71.0): superseded. This PR has the same
bump, with the lockfile regenerated on current `main`, plus the config
alignment. Close it if Renovate doesn't once this merges.
- **#2046** (themer move) and **#2048** (pnpm 12): merged, and merged
into this PR.
- **#2049** (oxlint) conflicts with this PR in `pnpm-workspace.yaml`,
where its `oxlint` catalog lines sit next to `oxfmt`. Keep both sides.
It could also add sanity's `oxlint --fix` line to the `format-scripts`
job, calling `node_modules/.bin/oxlint` directly.
- **#2050** (vitest 5) conflicts only in `pnpm-lock.yaml`.
- **#2051** (tsdown) doesn't conflict.
- Whichever PR lands later merges `main` and regenerates the lockfile
without committing the peer toggle.

## What Cody needs to do

- Add the `🤖 bot` label: the agent's label tool couldn't edit PRs in
this repository.
- Triage Socket's alert. It flags `[email protected]`'s install script
(`node postinstall.js`) as a low-priority warning. That script is what
installs the hook: `allowBuilds: lefthook: true` enables it, as in
sanity-io/sanity, and it skips when `CI` is set. Mark it as acceptable
risk if you agree. Socket's required checks pass either way.
- After merging, tell contributors to run `git config --unset
core.hooksPath && pnpm install` once, so lefthook replaces husky's hook.
- Merge the Renovate follow-up format PRs as they come, as in ui.
- No Vercel, secrets or ruleset changes, and no new secrets or env vars.

## Open question

**`.oxfmtrc.json`:** should plugins switch to ui's JSON config file,
too? That would mean no longer re-exporting the plugin-kit preset, and
it would reverse #1565. I kept `oxfmt.config.ts`, since the formatting
result is already the same as ui's.

## Verification

- **The hook**, tested on throwaway commits, with `pnpm-lock.yaml`
untouched each time:
  - Staged TS and JSON files get formatted and re-staged.
- A tracked `.vscode/settings.json` (its folder is gitignored) is
re-staged without the `[FAILED]` that lint-staged printed.
  - A staged `CHANGELOG.md`, which oxfmt ignores, passes as-is.
- In a partially staged file, only the staged hunk is formatted and the
unstaged hunk is kept.
- The commit that adds the hook ran it on its own files in 0.4 seconds.
- **Clones that ran husky:** with `core.hooksPath=.husky/_`, `lefthook
install` exits 1 with instructions and installs nothing, as described
above.
- **Local checks** at the head commit, with pnpm 12.6.0 on Node 24.21
and `CI=true` (lefthook's install script skips):
- `pnpm install --frozen-lockfile`, which leaves `pnpm-lock.yaml`
untouched
  - `oxfmt --check` (2,018 files)
  - `oxlint` and `knip`
  - the full turbo build (54 tasks)
  - `vitest run` (235 files, 1,509 tests)
  - `pnpm test:browser` (4 files, 7 stories)
- **CI** is fully green at the head commit (`123af257`): build, lint,
knip, all four test shards, coverage, `storybook-test`, both e2e
browsers, Bugbot, and both Vercel checks, whose installs run lefthook's
install script. The branch is up to date with `main`.
<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-0b8c4f47-d9af-5929-8254-d25847e7e2dd?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-0b8c4f47-d9af-5929-8254-d25847e7e2dd&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <[email protected]>

This branch was successfully deployed

1 active deployment
Preview – plugins-studio — 736db11e Deployed Sep 29, 2026 by vercel[bot]
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