Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sanity/migrate

Package Overview
Dependencies
Maintainers
55
Versions
219
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/migrate - npm Package Compare versions

Comparing version 3.53.1-styled-fork.4 to 3.54.0

2

lib/index.esm.js
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc