@conform-to/yup
Advanced tools
Comparing version 0.7.0-pre.0 to 0.7.0-pre.1
35
index.js
@@ -1,4 +0,28 @@ | ||
import { parse as parse$1 } from '@conform-to/dom'; | ||
import * as yup from 'yup'; | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var dom = require('@conform-to/dom'); | ||
var yup = require('yup'); | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
var n = Object.create(null); | ||
if (e) { | ||
Object.keys(e).forEach(function (k) { | ||
if (k !== 'default') { | ||
var d = Object.getOwnPropertyDescriptor(e, k); | ||
Object.defineProperty(n, k, d.get ? d : { | ||
enumerable: true, | ||
get: function () { return e[k]; } | ||
}); | ||
} | ||
}); | ||
} | ||
n["default"] = e; | ||
return Object.freeze(n); | ||
} | ||
var yup__namespace = /*#__PURE__*/_interopNamespace(yup); | ||
function getFieldsetConstraint(source) { | ||
@@ -68,3 +92,3 @@ var description = source.describe(); | ||
function parse(payload, config) { | ||
return parse$1(payload, { | ||
return dom.parse(payload, { | ||
resolve(payload, intent) { | ||
@@ -76,3 +100,3 @@ var schema = typeof config.schema === 'function' ? config.schema(intent) : config.schema; | ||
var resolveError = error => { | ||
if (error instanceof yup.ValidationError) { | ||
if (error instanceof yup__namespace.ValidationError) { | ||
return { | ||
@@ -114,2 +138,3 @@ error: error.inner.reduce((result, e) => { | ||
export { getFieldsetConstraint, parse }; | ||
exports.getFieldsetConstraint = getFieldsetConstraint; | ||
exports.parse = parse; |
@@ -6,6 +6,5 @@ { | ||
"license": "MIT", | ||
"version": "0.7.0-pre.0", | ||
"type": "module", | ||
"main": "index.cjs", | ||
"module": "index.js", | ||
"version": "0.7.0-pre.1", | ||
"main": "index.js", | ||
"module": "index.mjs", | ||
"types": "index.d.ts", | ||
@@ -15,6 +14,6 @@ "exports": { | ||
"types": "./index.d.ts", | ||
"module": "./index.js", | ||
"import": "./index.js", | ||
"require": "./index.cjs", | ||
"default": "./index.js" | ||
"module": "./index.mjs", | ||
"import": "./index.mjs", | ||
"require": "./index.js", | ||
"default": "./index.mjs" | ||
} | ||
@@ -31,3 +30,3 @@ }, | ||
"peerDependencies": { | ||
"@conform-to/dom": "0.7.0-pre.0", | ||
"@conform-to/dom": "0.7.0-pre.1", | ||
"yup": ">=0.32.0" | ||
@@ -34,0 +33,0 @@ }, |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14649
No