Socket
Socket
Sign inDemoInstall

@rjsf/utils

Package Overview
Dependencies
Maintainers
2
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.13.2 to 5.13.3

22

lib/schema/toPathSchema.js

@@ -41,5 +41,21 @@ import get from 'lodash/get';

if (ITEMS_KEY in schema && Array.isArray(formData)) {
formData.forEach((element, i) => {
pathSchema[i] = toPathSchemaInternal(validator, schema.items, `${name}.${i}`, rootSchema, element, _recurseList);
});
const { items: schemaItems, additionalItems: schemaAdditionalItems } = schema;
if (Array.isArray(schemaItems)) {
formData.forEach((element, i) => {
if (schemaItems[i]) {
pathSchema[i] = toPathSchemaInternal(validator, schemaItems[i], `${name}.${i}`, rootSchema, element, _recurseList);
}
else if (schemaAdditionalItems) {
pathSchema[i] = toPathSchemaInternal(validator, schemaAdditionalItems, `${name}.${i}`, rootSchema, element, _recurseList);
}
else {
console.warn(`Unable to generate path schema for "${name}.${i}". No schema defined for it`);
}
});
}
else {
formData.forEach((element, i) => {
pathSchema[i] = toPathSchemaInternal(validator, schemaItems, `${name}.${i}`, rootSchema, element, _recurseList);
});
}
}

@@ -46,0 +62,0 @@ else if (PROPERTIES_KEY in schema) {

4

package.json
{
"name": "@rjsf/utils",
"version": "5.13.2",
"version": "5.13.3",
"main": "dist/index.js",

@@ -89,3 +89,3 @@ "module": "lib/index.js",

"license": "Apache-2.0",
"gitHead": "4cfaa984c3343d9cbaabd147c5c24b2c01e28726"
"gitHead": "e00648782c16d4c8857c113a7f13c1ba3b593982"
}

@@ -76,12 +76,40 @@ import get from 'lodash/get';

if (ITEMS_KEY in schema && Array.isArray(formData)) {
formData.forEach((element, i: number) => {
pathSchema[i] = toPathSchemaInternal<T, S, F>(
validator,
schema.items as S,
`${name}.${i}`,
rootSchema,
element,
_recurseList
);
});
const { items: schemaItems, additionalItems: schemaAdditionalItems } = schema;
if (Array.isArray(schemaItems)) {
formData.forEach((element, i: number) => {
if (schemaItems[i]) {
pathSchema[i] = toPathSchemaInternal<T, S, F>(
validator,
schemaItems[i] as S,
`${name}.${i}`,
rootSchema,
element,
_recurseList
);
} else if (schemaAdditionalItems) {
pathSchema[i] = toPathSchemaInternal<T, S, F>(
validator,
schemaAdditionalItems as S,
`${name}.${i}`,
rootSchema,
element,
_recurseList
);
} else {
console.warn(`Unable to generate path schema for "${name}.${i}". No schema defined for it`);
}
});
} else {
formData.forEach((element, i: number) => {
pathSchema[i] = toPathSchemaInternal<T, S, F>(
validator,
schemaItems as S,
`${name}.${i}`,
rootSchema,
element,
_recurseList
);
});
}
} else if (PROPERTIES_KEY in schema) {

@@ -88,0 +116,0 @@ for (const property in schema.properties) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc