@sanity/migrate
Advanced tools
Comparing version 3.53.1-styled-fork.4 to 3.54.0
import { fromString } from "@sanity/util/paths"; | ||
import arrify from "arrify"; | ||
import { SanityEncoder } from "@bjoerge/mutiny"; | ||
import { SanityEncoder } from "@sanity/mutate"; | ||
import { open, unlink, mkdir } from "node:fs/promises"; | ||
@@ -5,0 +5,0 @@ import createDebug from "debug"; |
@@ -22,3 +22,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: !0 }); | ||
var paths = require("@sanity/util/paths"), arrify = require("arrify"), mutiny = require("@bjoerge/mutiny"), promises = require("node:fs/promises"), createDebug = require("debug"), FIFO = require("fast-fifo"), createSafeJsonParser = require("@sanity/util/createSafeJsonParser"), groqJs = require("groq-js"), client$1 = require("@sanity/client"), client = require("@sanity/util/client"), node_os = require("node:os"), path = require("node:path"); | ||
var paths = require("@sanity/util/paths"), arrify = require("arrify"), mutate = require("@sanity/mutate"), promises = require("node:fs/promises"), createDebug = require("debug"), FIFO = require("fast-fifo"), createSafeJsonParser = require("@sanity/util/createSafeJsonParser"), groqJs = require("groq-js"), client$1 = require("@sanity/client"), client = require("@sanity/util/client"), node_os = require("node:os"), path = require("node:path"); | ||
function _interopDefaultCompat(e) { | ||
@@ -228,3 +228,3 @@ return e && typeof e == "object" && "default" in e ? e : { default: e }; | ||
function normalizeMutation(change) { | ||
return Array.isArray(change) ? change.flatMap((ch) => normalizeMutation(ch)) : isRawMutation(change) ? mutiny.SanityEncoder.decodeAll([change]) : [change]; | ||
return Array.isArray(change) ? change.flatMap((ch) => normalizeMutation(ch)) : isRawMutation(change) ? mutate.SanityEncoder.decodeAll([change]) : [change]; | ||
} | ||
@@ -257,6 +257,6 @@ function isRawMutation(mutation) { | ||
function normalizeDocumentMutation(documentId, change) { | ||
return Array.isArray(change) ? change.flatMap((ch) => normalizeDocumentMutation(documentId, ch)) : isRawMutation(change) ? mutiny.SanityEncoder.decodeAll([change])[0] : isTransaction(change) || isMutation(change) ? change : patch(documentId, change); | ||
return Array.isArray(change) ? change.flatMap((ch) => normalizeDocumentMutation(documentId, ch)) : isRawMutation(change) ? mutate.SanityEncoder.decodeAll([change])[0] : isTransaction(change) || isMutation(change) ? change : patch(documentId, change); | ||
} | ||
function normalizeNodeMutation(path2, change) { | ||
return Array.isArray(change) ? change.flatMap((ch) => normalizeNodeMutation(path2, ch)) : isRawMutation(change) ? mutiny.SanityEncoder.decodeAll([change])[0] : isNodePatch(change) ? at(path2.concat(change.path), change.op) : isOperation(change) ? at(path2, change) : change; | ||
return Array.isArray(change) ? change.flatMap((ch) => normalizeNodeMutation(path2, ch)) : isRawMutation(change) ? mutate.SanityEncoder.decodeAll([change])[0] : isNodePatch(change) ? at(path2.concat(change.path), change.op) : isOperation(change) ? at(path2, change) : change; | ||
} | ||
@@ -990,7 +990,7 @@ function migrateNodeType(migration, value, path2, context) { | ||
transactionId: mut.id, | ||
mutations: mutiny.SanityEncoder.encodeAll(mut.mutations) | ||
mutations: mutate.SanityEncoder.encodeAll(mut.mutations) | ||
}; | ||
continue; | ||
} | ||
yield mutiny.SanityEncoder.encodeAll(arrify__default.default(mut)); | ||
yield mutate.SanityEncoder.encodeAll(arrify__default.default(mut)); | ||
} | ||
@@ -997,0 +997,0 @@ } |
{ | ||
"name": "@sanity/migrate", | ||
"version": "3.53.1-styled-fork.4+a93ef546cf", | ||
"version": "3.54.0", | ||
"description": "Tooling for running data migrations on Sanity.io projects", | ||
@@ -53,6 +53,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@bjoerge/mutiny": "^0.7.0", | ||
"@sanity/client": "^6.21.1", | ||
"@sanity/types": "3.53.1-styled-fork.4+a93ef546cf", | ||
"@sanity/util": "3.53.1-styled-fork.4+a93ef546cf", | ||
"@sanity/client": "^6.21.2", | ||
"@sanity/mutate": "^0.8.0", | ||
"@sanity/types": "3.54.0", | ||
"@sanity/util": "3.54.0", | ||
"arrify": "^2.0.1", | ||
@@ -66,3 +66,3 @@ "debug": "^4.3.4", | ||
"@jest/globals": "^29.7.0", | ||
"@repo/package.config": "3.53.0", | ||
"@repo/package.config": "3.54.0", | ||
"@types/arrify": "^2.0.1", | ||
@@ -75,3 +75,3 @@ "@types/debug": "^4.1.12", | ||
}, | ||
"gitHead": "a93ef546cf6eada681da73245cfccc934022c51f" | ||
"gitHead": "7531cda80b5a9af691a2b3ccf4b96ed04e64f60e" | ||
} |
@@ -1,3 +0,3 @@ | ||
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' | ||
@@ -4,0 +4,0 @@ import arrify from 'arrify' |
@@ -1,3 +0,3 @@ | ||
import {SanityEncoder} from '@bjoerge/mutiny' | ||
import {type Mutation as SanityMutation} from '@sanity/client' | ||
import {SanityEncoder} from '@sanity/mutate' | ||
import arrify from 'arrify' | ||
@@ -4,0 +4,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
5
6277830
+ Added@sanity/mutate@^0.8.0
+ Added@sanity/mutate@0.8.0(transitive)
+ Added@sanity/types@3.54.0(transitive)
+ Added@sanity/util@3.54.0(transitive)
+ Added@types/prop-types@15.7.13(transitive)
+ Added@types/react@18.3.12(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addeddom-walk@0.1.2(transitive)
+ Addedget-random-values@1.2.2(transitive)
+ Addedget-random-values-esm@1.0.2(transitive)
+ Addedglobal@4.4.0(transitive)
+ Addedmin-document@2.19.0(transitive)
+ Addedmoment@2.30.1(transitive)
+ Addedprocess@0.11.10(transitive)
- Removed@bjoerge/mutiny@^0.7.0
- Removed@bjoerge/mutiny@0.7.1(transitive)
Updated@sanity/client@^6.21.2
Updated@sanity/types@3.54.0
Updated@sanity/util@3.54.0