diff --git a/.github/renovate.json b/.github/renovate.json index 7bc957c3818..386dcd52abb 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -41,6 +41,7 @@ "@sanity/export", "@sanity/icons", "@sanity/insert-menu", + "@sanity/mutate", "@sanity/presentation", "@sanity/ui", "get-it", @@ -60,6 +61,7 @@ "@sanity/export", "@sanity/icons", "@sanity/insert-menu", + "@sanity/mutate", "@sanity/pkg-utils", "@sanity/presentation", "@sanity/tsdoc", diff --git a/package.json b/package.json index 3e54365f83d..26807a58ace 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,6 @@ "@babel/preset-env": "^7.24.7", "@babel/preset-react": "^7.24.7", "@babel/preset-typescript": "^7.24.7", - "@bjoerge/mutiny": "^0.7.1", "@google-cloud/storage": "^7.11.0", "@jest/globals": "^29.7.0", "@playwright/test": "1.44.1", @@ -109,6 +108,7 @@ "@sanity/client": "^6.21.1", "@sanity/eslint-config-i18n": "1.0.0", "@sanity/eslint-config-studio": "^4.0.0", + "@sanity/mutate": "^0.8.0", "@sanity/pkg-utils": "6.10.9", "@sanity/prettier-config": "^1.0.2", "@sanity/test": "0.0.1-alpha.1", diff --git a/packages/@sanity/migrate/package.json b/packages/@sanity/migrate/package.json index 1d1288fbf7b..5911d3438e6 100644 --- a/packages/@sanity/migrate/package.json +++ b/packages/@sanity/migrate/package.json @@ -50,8 +50,8 @@ "watch": "pkg-utils watch" }, "dependencies": { - "@bjoerge/mutiny": "^0.7.0", "@sanity/client": "^6.21.1", + "@sanity/mutate": "^0.8.0", "@sanity/types": "3.53.0", "@sanity/util": "3.53.0", "arrify": "^2.0.1", diff --git a/packages/@sanity/migrate/src/runner/normalizeMigrateDefinition.ts b/packages/@sanity/migrate/src/runner/normalizeMigrateDefinition.ts index 14573b5d4f4..c4fa95f9313 100644 --- a/packages/@sanity/migrate/src/runner/normalizeMigrateDefinition.ts +++ b/packages/@sanity/migrate/src/runner/normalizeMigrateDefinition.ts @@ -1,5 +1,5 @@ -import {SanityEncoder} from '@bjoerge/mutiny' import {type Mutation as RawMutation} from '@sanity/client' +import {SanityEncoder} from '@sanity/mutate' import {type Path, type SanityDocument} from '@sanity/types' import arrify from 'arrify' diff --git a/packages/@sanity/migrate/src/runner/utils/__tests__/toSanityMutations.test.ts b/packages/@sanity/migrate/src/runner/utils/__tests__/toSanityMutations.test.ts index dd9a19e4efe..6ed39b0bd1c 100644 --- a/packages/@sanity/migrate/src/runner/utils/__tests__/toSanityMutations.test.ts +++ b/packages/@sanity/migrate/src/runner/utils/__tests__/toSanityMutations.test.ts @@ -3,14 +3,14 @@ import {afterEach, describe, expect, it, jest} from '@jest/globals' /* eslint-enable simple-import-sort/imports */ -import {SanityEncoder} from '@bjoerge/mutiny' +import {SanityEncoder} from '@sanity/mutate' import {type Mutation, type Transaction} from '../../../mutations' import {toSanityMutations, type TransactionPayload} from '../toSanityMutations' -jest.mock('@bjoerge/mutiny', () => { +jest.mock('@sanity/mutate', () => { // eslint-disable-next-line @typescript-eslint/consistent-type-imports - const actual = jest.requireActual('@bjoerge/mutiny') + const actual = jest.requireActual('@sanity/mutate') return { ...actual, SanityEncoder: { diff --git a/packages/@sanity/migrate/src/runner/utils/toSanityMutations.ts b/packages/@sanity/migrate/src/runner/utils/toSanityMutations.ts index b6dbc50b146..20b1283fd68 100644 --- a/packages/@sanity/migrate/src/runner/utils/toSanityMutations.ts +++ b/packages/@sanity/migrate/src/runner/utils/toSanityMutations.ts @@ -1,5 +1,5 @@ -import {SanityEncoder} from '@bjoerge/mutiny' import {type Mutation as SanityMutation} from '@sanity/client' +import {SanityEncoder} from '@sanity/mutate' import arrify from 'arrify' import {type Mutation, type Transaction} from '../../mutations' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2a80f6a7a5e..efa5442c3d3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,9 +30,6 @@ importers: '@babel/preset-typescript': specifier: ^7.24.7 version: 7.24.7(@babel/core@7.25.2) - '@bjoerge/mutiny': - specifier: ^0.7.1 - version: 0.7.1(debug@4.3.6) '@google-cloud/storage': specifier: ^7.11.0 version: 7.11.0(encoding@0.1.13) @@ -57,6 +54,9 @@ importers: '@sanity/eslint-config-studio': specifier: ^4.0.0 version: 4.0.0(eslint@8.57.0)(typescript@5.5.4) + '@sanity/mutate': + specifier: ^0.8.0 + version: 0.8.0(debug@4.3.6) '@sanity/pkg-utils': specifier: 6.10.9 version: 6.10.9(@types/babel__core@7.20.5)(@types/node@18.19.31)(debug@4.3.6)(typescript@5.5.4) @@ -1038,12 +1038,12 @@ importers: packages/@sanity/migrate: dependencies: - '@bjoerge/mutiny': - specifier: ^0.7.0 - version: 0.7.1(debug@4.3.6) '@sanity/client': specifier: ^6.21.1 version: 6.21.1(debug@4.3.6) + '@sanity/mutate': + specifier: ^0.8.0 + version: 0.8.0(debug@4.3.6) '@sanity/types': specifier: 3.53.0 version: link:../types @@ -2607,10 +2607,6 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - '@bjoerge/mutiny@0.7.1': - resolution: {integrity: sha512-j2WzqTM/HoO6kpoFdozNknLAgzEDoaa1TILfKeYKHbr3PQRoZits1ov/+q+M5hZwV2uST+mOEhkAMcyTe+BY3A==} - engines: {node: '>=18'} - '@codemirror/autocomplete@6.17.0': resolution: {integrity: sha512-fdfj6e6ZxZf8yrkMHUSJJir7OJkHkZKaOZGzLWIYp2PZ3jd+d+UjG8zVPqJF6d3bKxkhvXTPan/UZ1t7Bqm0gA==} peerDependencies: @@ -4389,6 +4385,10 @@ packages: '@sanity/color': ^2.0 || ^3.0 || ^3.0.0-beta react: ^18.3 || >=19.0.0-rc + '@sanity/mutate@0.8.0': + resolution: {integrity: sha512-70tVQD2HjRx9O273BZbqOT8llFAsQFjYUz3lLvbybo8nvcxu/of2PHyTTHe3QIqkB63FHEQ5T7UBrWxlccCX8Q==} + engines: {node: '>=18'} + '@sanity/mutator@3.37.2': resolution: {integrity: sha512-F0MvseVtgPBaPxNZtSidF6BQeygviYThgmhRbjZ89AhlRhWiLODvLakdogFmwD1NEQ0tpKn+8m0pQIOHgt2C3w==} @@ -12348,17 +12348,6 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@bjoerge/mutiny@0.7.1(debug@4.3.6)': - dependencies: - '@sanity/client': 6.21.1(debug@4.3.6) - '@sanity/diff-match-patch': 3.1.1 - hotscript: 1.0.13 - mendoza: 3.0.7 - nanoid: 5.0.7 - rxjs: 7.8.1 - transitivePeerDependencies: - - debug - '@codemirror/autocomplete@6.17.0(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.29.1)(@lezer/common@1.2.1)': dependencies: '@codemirror/language': 6.10.2 @@ -14233,6 +14222,17 @@ snapshots: '@sanity/color': 3.0.6 react: 18.3.1 + '@sanity/mutate@0.8.0(debug@4.3.6)': + dependencies: + '@sanity/client': 6.21.1(debug@4.3.6) + '@sanity/diff-match-patch': 3.1.1 + hotscript: 1.0.13 + mendoza: 3.0.7 + nanoid: 5.0.7 + rxjs: 7.8.1 + transitivePeerDependencies: + - debug + '@sanity/mutator@3.37.2': dependencies: '@sanity/diff-match-patch': 3.1.1 diff --git a/scripts/doc-report/docReportCreate.ts b/scripts/doc-report/docReportCreate.ts index 113eddd4ca2..a9d72bf9d4f 100644 --- a/scripts/doc-report/docReportCreate.ts +++ b/scripts/doc-report/docReportCreate.ts @@ -10,7 +10,7 @@ import { set, setIfMissing, upsert, -} from '@bjoerge/mutiny' +} from '@sanity/mutate' import {filter, map, mergeMap, of, tap} from 'rxjs' import ts, {type JSDoc, type JSDocComment, SyntaxKind} from 'typescript'