Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/plugin-kit-node-engines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sanity/plugin-kit': patch
---

Narrow `engines.node` from `>=24` to `^24.11.0 || >=26.0.0`, the Node.js 24+ versions that `@sanity/pkg-utils` 13 supports
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ Tests run against the dedicated bare-bones `dev/e2e-studio` (workspaces `/chromi

### Node.js version notes

`dev/test-studio` declares `engines.node: "24"`; the monorepo otherwise targets latest LTS. Node 24 is preferred when available, and **Node >= 22.18 is required for a full `pnpm build`**: the `@repo/generators` build runs `tsdown`, which loads its `.mts` config through Node's native TypeScript support. On older Node 22.x (e.g. the `v22.14.0` that may be the VM default) that build fails with `Failed to import module "unrun"`. **`pnpm format` and `pnpm lint` also require Node >= 22.18** (oxfmt and oxlint load the TypeScript `oxfmt.config.ts` / `oxlint.config.ts` through the same mechanism). A new enough runtime is usually available via `nvm` (e.g. `export PATH="$HOME/.nvm/versions/node/v22.22.2/bin:$PATH"`). `pnpm test` works on older Node 22 too.
`dev/test-studio` declares `engines.node: "24"`; the monorepo otherwise targets latest LTS. Node 24 is preferred when available, and **Node >= 22.18 is required for a full `pnpm build`**: the `@repo/generators` build runs `tsdown`, which loads its `.mts` config through Node's native TypeScript support. tsdown 0.23, `@sanity/tsdown-config` and `@sanity/pkg-utils` 13 support Node `^22.18.0 || ^24.11.0 || >=26.0.0`, so Node 25 is not supported for builds. On older Node 22.x (e.g. the `v22.14.0` that may be the VM default) that build fails with `Failed to import module "unrun"`. **`pnpm format` and `pnpm lint` also require Node >= 22.18** (oxfmt and oxlint load the TypeScript `oxfmt.config.ts` / `oxlint.config.ts` through the same mechanism). A new enough runtime is usually available via `nvm` (e.g. `export PATH="$HOME/.nvm/versions/node/v22.22.2/bin:$PATH"`). `pnpm test` works on older Node 22 too.

### Lint / build / test

Expand Down
6 changes: 4 additions & 2 deletions packages/@sanity/plugin-kit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ Check the [FAQ](#faq) fro more on these.

> npm install --save-dev @sanity/plugin-kit

Running the plugin-kit CLI requires Node.js 24 or newer. Plugins scaffolded by plugin-kit are not
affected by this requirement: they declare the wider Node.js range shared with `@sanity/pkg-utils`.
Running the plugin-kit CLI requires Node.js `^24.11.0 || >=26.0.0`, the Node.js 24+ versions its
build peer `@sanity/pkg-utils` runs on. Plugins scaffolded by plugin-kit are not affected by this
requirement: their `engines.node` (`>=20.19 <22 || >=22.12`, as in the package template of
`@sanity/pkg-utils`) describes where the published plugin runs, not the Node.js that builds it.

### Install build tool

Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/plugin-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
}
},
"engines": {
"node": ">=24"
"node": "^24.11.0 || >=26.0.0"
},
"binname": "plugin-kit"
}
Loading