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

@json-layout/core

Package Overview
Dependencies
Maintainers
0
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.24.0 to 0.24.1

types/compile/index.d.ts

2

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

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

@@ -425,6 +425,10 @@ import { isSwitchStruct, childIsCompObject, isCompositeLayout, isFocusableLayout, isItemsLayout, isGetItemsExpression, isGetItemsFetch } from '@json-layout/vocabulary'

let nodeData = data
if (nodeData === null && !layout.nullable) nodeData = undefined
/** @type {unknown} */
let nodeData = typeof data === 'object' && !(data instanceof File)
? produceStateNodeData(
/** @type {Record<string, unknown>} */(data ?? {}),
if (typeof nodeData === 'object' && !(nodeData instanceof File)) {
nodeData = produceStateNodeData(
/** @type {Record<string, unknown>} */(nodeData ?? {}),
dataPath,

@@ -436,10 +440,10 @@ children,

)
: data
// the producer is not perfect, sometimes data is considered mutated but it is actually the same
// we double check here to avoid unnecessary re-renders
if (nodeData !== data) {
if (Array.isArray(data) && Array.isArray(nodeData)) nodeData = shallowProduceArray(data, nodeData)
// @ts-ignore
else if (typeof data === 'object' && typeof nodeData === 'object') nodeData = shallowProduceObject(data, nodeData)
// the producer is not perfect, sometimes data is considered mutated but it is actually the same
// we double check here to avoid unnecessary re-renders
if (nodeData !== data) {
if (Array.isArray(data) && Array.isArray(nodeData)) nodeData = shallowProduceArray(data, nodeData)
// @ts-ignore
else if (typeof data === 'object' && typeof nodeData === 'object') nodeData = shallowProduceObject(data, nodeData)
}
}

@@ -446,0 +450,0 @@

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