@portabletext/toolkit
Advanced tools
+6
-26
| { | ||
| "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) |
+2
-6
@@ -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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
14
-22.22%0
-100%81057
-0.61%1277
-0.31%+ Added
- Removed
Updated