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

@json-layout/core

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@json-layout/core - npm Package Compare versions

Comparing version 0.16.0 to 0.16.1

2

package.json
{
"name": "@json-layout/core",
"version": "0.16.0",
"version": "0.16.1",
"description": "Compilation and state management utilities for JSON Layout.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -162,3 +162,4 @@ import { isSwitchStruct, childIsCompObject, isCompositeLayout, isFocusableLayout } from '@json-layout/vocabulary'

const matchChildError = (error, skeleton, dataPath, parentDataPath) => {
if (error.instancePath.startsWith(dataPath) && !(typeof skeleton.key === 'string' && skeleton.key.startsWith('$allOf'))) return true
if (!error.schemaPath.startsWith(skeleton.pointer)) return false
if (error.instancePath.startsWith(dataPath)) return true
return false

@@ -380,7 +381,14 @@ }

const error = context.errors?.find(error => matchError(error, skeleton, dataPath, parentDataPath)) ?? context.errors?.find(error => matchChildError(error, skeleton, dataPath, parentDataPath))
let error = context.errors?.find(error => matchError(error, skeleton, dataPath, parentDataPath))
if (!error) {
error = context.errors?.find(error => matchChildError(error, skeleton, dataPath, parentDataPath))
}
// capture errors so that they are not repeated in parent nodes
if (layout.comp !== 'none') {
if (error) context.errors = context.errors?.filter(error => !matchError(error, skeleton, dataPath, parentDataPath) && !matchChildError(error, skeleton, dataPath, parentDataPath))
if (error) {
context.errors = context.errors?.filter(error => {
return !matchError(error, skeleton, dataPath, parentDataPath) && !matchChildError(error, skeleton, dataPath, parentDataPath)
})
}
}

@@ -387,0 +395,0 @@ const validated = validationState.validatedForm ||

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