@json-layout/core
Advanced tools
Comparing version
{ | ||
"name": "@json-layout/core", | ||
"version": "1.4.4", | ||
"version": "1.5.0", | ||
"description": "Compilation and state management utilities for JSON Layout.", | ||
@@ -60,4 +60,6 @@ "type": "module", | ||
"homepage": "https://github.com/json-layout/json-layout#readme", | ||
"peerDependencies": { | ||
"@json-layout/vocabulary": "^1.5.0" | ||
}, | ||
"dependencies": { | ||
"@json-layout/vocabulary": "~1.4.2", | ||
"ajv": "^8.17.1", | ||
@@ -64,0 +66,0 @@ "ajv-errors": "^3.0.0", |
// import Debug from 'debug' | ||
import { normalizeLayoutFragment, isSwitchStruct, isGetItemsExpression, isGetItemsFetch, isItemsLayout, getSchemaFragmentType, isCompositeLayout, childIsCompositeCompObject } from '@json-layout/vocabulary' | ||
import { normalizeLayoutFragment, mergeNullableSubSchema, isSwitchStruct, isGetItemsExpression, isGetItemsFetch, isItemsLayout, getSchemaFragmentType, isCompositeLayout, childIsCompositeCompObject } from '@json-layout/vocabulary' | ||
import { makeSkeletonTree } from './skeleton-tree.js' | ||
@@ -54,5 +54,7 @@ import { partialResolveRefs } from './utils/resolve-refs.js' | ||
} | ||
const knownNullable = mergeNullableSubSchema(schema) | ||
const resolvedSchema = partialResolveRefs(schema, schemaId, getJSONRef) | ||
let { type, nullable } = getSchemaFragmentType(resolvedSchema) | ||
if (knownType) type = knownType | ||
if (knownNullable) nullable = knownNullable | ||
@@ -59,0 +61,0 @@ // improve on ajv error messages based on ajv-errors (https://ajv.js.org/packages/ajv-errors.html) |
Sorry, the diff of this file is not supported yet
185064
0.08%4209
0.05%+ Added
- Removed
- Removed