Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@portabletext/toolkit

Package Overview
Dependencies
Maintainers
10
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@portabletext/toolkit - npm Package Compare versions

Comparing version
3.0.1
to
3.0.2
+2
-3
dist/index.cjs

@@ -56,3 +56,2 @@ "use strict";

function buildMarksTree(block) {
var _a;
const { children } = block, markDefs = block.markDefs ?? [];

@@ -75,3 +74,3 @@ if (!children || !children.length)

for (pos; pos < nodeStack.length; pos++) {
const mark = ((_a = nodeStack[pos]) == null ? void 0 : _a.markKey) || "", index = marksNeeded.indexOf(mark);
const mark = nodeStack[pos]?.markKey || "", index = marksNeeded.indexOf(mark);
if (index === -1)

@@ -85,3 +84,3 @@ break;

for (const markKey of marksNeeded) {
const markDef = markDefs == null ? void 0 : markDefs.find((def) => def._key === markKey), markType = markDef ? markDef._type : markKey, node = {
const markDef = markDefs?.find((def) => def._key === markKey), markType = markDef ? markDef._type : markKey, node = {
_type: "@span",

@@ -88,0 +87,0 @@ _key: span._key,

@@ -54,3 +54,2 @@ function isPortableTextSpan(node) {

function buildMarksTree(block) {
var _a;
const { children } = block, markDefs = block.markDefs ?? [];

@@ -73,3 +72,3 @@ if (!children || !children.length)

for (pos; pos < nodeStack.length; pos++) {
const mark = ((_a = nodeStack[pos]) == null ? void 0 : _a.markKey) || "", index = marksNeeded.indexOf(mark);
const mark = nodeStack[pos]?.markKey || "", index = marksNeeded.indexOf(mark);
if (index === -1)

@@ -83,3 +82,3 @@ break;

for (const markKey of marksNeeded) {
const markDef = markDefs == null ? void 0 : markDefs.find((def) => def._key === markKey), markType = markDef ? markDef._type : markKey, node = {
const markDef = markDefs?.find((def) => def._key === markKey), markType = markDef ? markDef._type : markKey, node = {
_type: "@span",

@@ -86,0 +85,0 @@ _key: span._key,

+3
-6
{
"name": "@portabletext/toolkit",
"version": "3.0.1",
"version": "3.0.2",
"description": "Toolkit of handy utility functions for dealing with Portable Text",

@@ -42,6 +42,3 @@ "keywords": [

],
"browserslist": [
"extends @sanity/browserslist-config",
"node 14"
],
"browserslist": "extends @sanity/browserslist-config",
"prettier": "@sanity/prettier-config",

@@ -89,3 +86,3 @@ "eslintConfig": {

"engines": {
"node": "^14.13.1 || >=16.0.0"
"node": ">=20.19 <22 || >=22.12"
},

@@ -92,0 +89,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet