
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
@sanity/mutate
Advanced tools
Experimental toolkit for working with Sanity mutations in JavaScript & TypeScript
[!NOTE] Experimental. Use at your own risk.
A TypeScript toolkit for Sanity mutations:
npm install @sanity/mutate
import {
at,
create,
createIfNotExists,
patch,
SanityEncoder,
set,
setIfMissing,
} from '@sanity/mutate'
const projectId = '<projectId>'
const dataset = '<dataset>'
const mutations = [
create({_type: 'dog', name: 'Fido'}),
createIfNotExists({_id: 'document-1', _type: 'someType'}),
patch('other-document', [
at('published', set(true)),
at('address', setIfMissing({_type: 'address'})),
at('address.city', set('Oslo')),
]),
]
await fetch(
`https://${projectId}.api.sanity.io/v2026-05-12/data/mutate/${dataset}`,
{
method: 'POST',
mode: 'cors',
credentials: 'include',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify(SanityEncoder.encodeAll(mutations)),
},
)
Full reference and guides at https://sanity-io.github.io/mutate (sources in docs/; run the site locally with pnpm docs:dev):
MIT
FAQs
Experimental toolkit for working with Sanity mutations in JavaScript & TypeScript
The npm package @sanity/mutate receives a total of 947,535 weekly downloads. As such, @sanity/mutate popularity was classified as popular.
We found that @sanity/mutate demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.