uniforms-bridge-json-schema
Advanced tools
Comparing version 4.0.0-alpha.6 to 4.0.0-beta.1
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.JSONSchemaBridge = exports.default = void 0; | ||
const tslib_1 = require("tslib"); | ||
require("./register"); | ||
var JSONSchemaBridge_1 = require("./JSONSchemaBridge"); | ||
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(JSONSchemaBridge_1).default; } }); | ||
Object.defineProperty(exports, "JSONSchemaBridge", { enumerable: true, get: function () { return __importDefault(JSONSchemaBridge_1).default; } }); | ||
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return tslib_1.__importDefault(JSONSchemaBridge_1).default; } }); | ||
Object.defineProperty(exports, "JSONSchemaBridge", { enumerable: true, get: function () { return tslib_1.__importDefault(JSONSchemaBridge_1).default; } }); |
import { Bridge, UnknownObject } from 'uniforms'; | ||
declare type FieldError = { | ||
type FieldError = { | ||
instancePath?: string; | ||
@@ -11,3 +11,3 @@ /** Provided by Ajv < 8 */ | ||
}; | ||
declare type ValidatorResult = { | ||
type ValidatorResult = { | ||
details: FieldError[]; | ||
@@ -14,0 +14,0 @@ }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
const invariant_1 = (0, tslib_1.__importDefault)(require("invariant")); | ||
const cloneDeep_1 = (0, tslib_1.__importDefault)(require("lodash/cloneDeep")); | ||
const get_1 = (0, tslib_1.__importDefault)(require("lodash/get")); | ||
const isEmpty_1 = (0, tslib_1.__importDefault)(require("lodash/isEmpty")); | ||
const lowerCase_1 = (0, tslib_1.__importDefault)(require("lodash/lowerCase")); | ||
const memoize_1 = (0, tslib_1.__importDefault)(require("lodash/memoize")); | ||
const upperFirst_1 = (0, tslib_1.__importDefault)(require("lodash/upperFirst")); | ||
const invariant_1 = tslib_1.__importDefault(require("invariant")); | ||
const cloneDeep_1 = tslib_1.__importDefault(require("lodash/cloneDeep")); | ||
const get_1 = tslib_1.__importDefault(require("lodash/get")); | ||
const isEmpty_1 = tslib_1.__importDefault(require("lodash/isEmpty")); | ||
const lowerCase_1 = tslib_1.__importDefault(require("lodash/lowerCase")); | ||
const memoize_1 = tslib_1.__importDefault(require("lodash/memoize")); | ||
const upperFirst_1 = tslib_1.__importDefault(require("lodash/upperFirst")); | ||
const uniforms_1 = require("uniforms"); | ||
@@ -28,3 +28,3 @@ function fieldInvariant(name, condition) { | ||
} | ||
const { $ref } = partial, partialWithoutRef = (0, tslib_1.__rest)(partial, ["$ref"]); | ||
const { $ref } = partial, partialWithoutRef = tslib_1.__rest(partial, ["$ref"]); | ||
return resolveRefIfNeeded( | ||
@@ -31,0 +31,0 @@ // @ts-expect-error The `partial` and `schema` should be typed more precisely. |
import { Bridge, UnknownObject } from 'uniforms'; | ||
declare type FieldError = { | ||
type FieldError = { | ||
instancePath?: string; | ||
@@ -11,3 +11,3 @@ /** Provided by Ajv < 8 */ | ||
}; | ||
declare type ValidatorResult = { | ||
type ValidatorResult = { | ||
details: FieldError[]; | ||
@@ -14,0 +14,0 @@ }; |
{ | ||
"name": "uniforms-bridge-json-schema", | ||
"version": "4.0.0-alpha.6", | ||
"version": "4.0.0-beta.1", | ||
"license": "MIT", | ||
@@ -35,9 +35,20 @@ "main": "./cjs/index.js", | ||
], | ||
"peerDependencies": { | ||
"uniforms": "4.0.0-beta.1" | ||
}, | ||
"dependencies": { | ||
"invariant": "^2.0.0", | ||
"lodash": "^4.0.0", | ||
"tslib": "^2.2.0", | ||
"uniforms": "^4.0.0-alpha.6" | ||
"lodash": "^4.0.0" | ||
}, | ||
"gitHead": "884581ac1dc9191159459d1d5ad2c7169f8769f3" | ||
"devDependencies": { | ||
"@types/invariant": "2.2.37", | ||
"@types/lodash": "4.17.5", | ||
"tslib": "2.2.0", | ||
"typescript": "5.5.4", | ||
"uniforms": "workspace:*" | ||
}, | ||
"scripts": { | ||
"build:cjs": "tsc --build tsconfig.cjs.json", | ||
"build:esm": "tsc --build tsconfig.esm.json" | ||
} | ||
} |
@@ -216,3 +216,6 @@ import invariant from 'invariant'; | ||
if (!nextFound) { | ||
partialElement = resolveRefIfNeeded(partialElement, this.schema); | ||
partialElement = resolveRefIfNeeded( | ||
partialElement as UnknownObject, | ||
this.schema, | ||
); | ||
if (next in partialElement.properties) { | ||
@@ -239,3 +242,3 @@ definition = partialElement.properties[next]; | ||
definition[partialName]?.forEach((partial: any) => { | ||
partial = resolveRefIfNeeded(partial, this.schema); | ||
partial = resolveRefIfNeeded(partial as UnknownObject, this.schema); | ||
@@ -344,3 +347,5 @@ if (partial.required) { | ||
} else if (props.enum) { | ||
options = Object.values(props.enum).map(value => ({ value })); | ||
options = Object.values(props.enum as Record<string, unknown>).map( | ||
value => ({ value }), | ||
); | ||
} | ||
@@ -370,3 +375,5 @@ | ||
if (type === 'object' && properties) { | ||
return Object.keys(properties).map(joinName.escape); | ||
return Object.keys(properties as Record<string, unknown>).map( | ||
joinName.escape, | ||
); | ||
} | ||
@@ -373,0 +380,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3
1048
40864
5
17
+ Addeduniforms@4.0.0-beta.1(transitive)
- Removedtslib@^2.2.0
- Removeduniforms@^4.0.0-alpha.6
- Removedtslib@2.8.02.8.1(transitive)
- Removeduniforms@4.0.0-beta.4(transitive)