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.3-canary.0
to
4.0.0
+6
-26
package.json
{
"name": "@portabletext/toolkit",
"version": "3.0.3-canary.0",
"version": "4.0.0",
"description": "Toolkit of handy utility functions for dealing with Portable Text",

@@ -40,32 +40,12 @@ "keywords": [

"browserslist": "extends @sanity/browserslist-config",
"eslintConfig": {
"parserOptions": {
"ecmaFeatures": {
"modules": true
},
"ecmaVersion": 9,
"sourceType": "module"
},
"extends": [
"sanity",
"sanity/typescript"
],
"ignorePatterns": [
"dist/**/"
]
},
"dependencies": {
"@portabletext/types": "^2.0.15"
"@portabletext/types": "^3.0.0"
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.29.6",
"@changesets/cli": "^2.29.7",
"@sanity/browserslist-config": "^1.0.5",
"@sanity/pkg-utils": "^8.1.4",
"@sanity/pkg-utils": "^8.1.29",
"@types/node": "^24.10.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitest/coverage-v8": "^4.0.6",
"eslint": "^8.57.1",
"eslint-config-sanity": "^7.1.4",
"npm-run-all2": "^8.0.4",

@@ -76,4 +56,4 @@ "oxfmt": "^0.9.0",

"rimraf": "^4.4.1",
"typedoc": "^0.28.12",
"typescript": "5.9.2",
"typedoc": "^0.28.14",
"typescript": "5.9.3",
"vitest": "^4.0.6"

@@ -80,0 +60,0 @@ },

+4
-4

@@ -1,2 +0,2 @@

import type { PortableTextBlock, PortableTextListItemBlock, TypedObject } from '@portabletext/types'
import type {PortableTextBlock, PortableTextListItemBlock, TypedObject} from '@portabletext/types'

@@ -111,3 +111,3 @@ import {

} else {
; (currentList as ToolkitPortableTextDirectList).children.push(
;(currentList as ToolkitPortableTextDirectList).children.push(
newList as ToolkitPortableTextDirectList,

@@ -142,3 +142,3 @@ )

const matchingBranch = tree[tree.length - 1]
const match = matchingBranch && findListMatching(matchingBranch, { level: block.level || 1 })
const match = matchingBranch && findListMatching(matchingBranch, {level: block.level || 1})
if (match && match.listItem === block.listItem) {

@@ -155,3 +155,3 @@ currentList = match

// eslint-disable-next-line no-console
// oxlint-disable-next-line no-console
console.warn('Unknown state encountered for block', block)

@@ -158,0 +158,0 @@ tree.push(block)

@@ -109,3 +109,3 @@ import type {

PortableTextSpan | ToolkitPortableTextList
> { }
> {}

@@ -168,7 +168,3 @@ /**

*/
children: (
| ToolkitTextNode
| ToolkitNestedPortableTextSpan
| ArbitraryTypedObject
)[]
children: (ToolkitTextNode | ToolkitNestedPortableTextSpan | ArbitraryTypedObject)[]
}

Sorry, the diff of this file is not supported yet