Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump yup from 0.32.11 to 1.2.0 in /frontend (#2312)
Bumps [yup](https://github.com/jquense/yup) from 0.32.11 to 1.2.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jquense/yup/releases">yup's releases</a>.</em></p> <blockquote> <h2>v1 Because I finally got around to it</h2> <p><a href="https://redirect.github.com/jquense/yup/issues/1906">jquense/yup#1906</a></p> <h2>v1.0.0-beta.7</h2> <p>Fixes published artifacts for the <code>main</code> field</p> <h2>v1.0.0-beta.5 - partial fixes and cast migration path</h2> <p>Beta 5 fixes <code>partial</code> and <code>deepPartial</code> making it work correctly with <code>lazy</code> schema. Specifically the optionality is added <em>after</em> lazy is evaluated but before any other <code>when</code> conditions are added. This makes it consistent with other conditional schema, where runtime conditions always supersede previous schema configuration. This allows for optional overrides if necessary.</p> <pre lang="ts"><code>const person = object({ name: string().required(), age: number().required(), legalGuardian: string().when('age', { is: (age) => age != null && age < 18, then: (schema) => schema.required(), }), }); <p>const optionalPerson = person.partial()</p> <p>person.cast({name: 'James', age: 6 }) // => TypeError legalGuardian required</p> <p>// age is still required b/c it's applied after the <code>partial</code> optionalPerson.cast({name: 'James', age: 6 }) // => TypeError legalGuardian required </code></pre></p> <p>This works slightly differently for <code>lazy</code> which have no schema to "start" with:</p> <pre lang="ts"><code>const config = object({ nameOrIdNumber: lazy((value) => { if (typeof value === 'number') return number().required() return string().required() }), }); <p>const opti = config.partial()</p> <p>config.cast({}) // => TypeError nameOrIdNumber is required</p> <p>config.partial().cast({}) // => {} </code></pre></p> <h2>Cast optionality migration path</h2> <p>A larger breaking change in v1 is the assertion of optionality during <code>cast</code>, making previous patterns like <code>string().nullable().required()</code> no longer possible. Generally this pattern is used when deserialized data is not valid to start, but will become valid through user input such as with an HTML form. v1 no longer allows this, but in order to make migration easier we've added an option to <code>cast</code> that mimics the previous behavior (not exactly but closely).</p> <pre lang="ts"><code>const name = string().required() </tr></table> </code></pre> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jquense/yup/blob/master/CHANGELOG.md">yup's changelog</a>.</em></p> <blockquote> <h1><a href="https://github.com/jquense/yup/compare/v1.1.1...v1.2.0">1.2.0</a> (2023-05-25)</h1> <h3>Features</h3> <ul> <li>expose printValue (<a href="https://redirect.github.com/jquense/yup/issues/2002">#2002</a>) (<a href="https://redirect.github.com/jquense/yup/issues/2008">#2008</a>) (<a href="https://github.com/jquense/yup/commit/1fadba10b0d1cad60f3708bd28282ab04a55eff6">1fadba1</a>)</li> <li>pass options to <code>default(options => value)</code> (<a href="https://github.com/jquense/yup/commit/e5c5440767d32a8be6c4a12a5f6176924e058fd2">e5c5440</a>), closes <a href="https://redirect.github.com/jquense/yup/issues/1984">#1984</a></li> </ul> <h2><a href="https://github.com/jquense/yup/compare/v1.1.0...v1.1.1">1.1.1</a> (2023-04-14)</h2> <h3>Bug Fixes</h3> <ul> <li><strong>docs:</strong> Broken anchores (<a href="https://redirect.github.com/jquense/yup/issues/1979">#1979</a>) (<a href="https://github.com/jquense/yup/commit/4ed45762e955ac6af0dec935a91e815a5a1cf5b9">4ed4576</a>)</li> <li>make null validation errors consistent across schema (<a href="https://redirect.github.com/jquense/yup/issues/1982">#1982</a>) (<a href="https://github.com/jquense/yup/commit/f99949747456d7bf55da3dd38dcf86bbddba3169">f999497</a>)</li> <li><strong>object:</strong> excluded edges are merged when concating schema (<a href="https://github.com/jquense/yup/commit/c07b08f033be8eea00d74a5da1cf735cf97e69df">c07b08f</a>), closes <a href="https://redirect.github.com/jquense/yup/issues/1969">#1969</a></li> </ul> <h1><a href="https://github.com/jquense/yup/compare/v1.0.2...v1.1.0">1.1.0</a> (2023-04-12)</h1> <h3>Bug Fixes</h3> <ul> <li>tuple describe() method (<a href="https://redirect.github.com/jquense/yup/issues/1947">#1947</a>) (<a href="https://github.com/jquense/yup/commit/297f1682296ee0b53e5e252477d5a6d7d82df707">297f168</a>)</li> </ul> <h3>Features</h3> <ul> <li>only resolve "strip()" for schema when used as an object field (<a href="https://redirect.github.com/jquense/yup/issues/1977">#1977</a>) (<a href="https://github.com/jquense/yup/commit/2ba1104798dcf3b9385997e5fbaa41b4d711472d">2ba1104</a>)</li> <li>respect context for object's children (<a href="https://redirect.github.com/jquense/yup/issues/1971">#1971</a>) (<a href="https://github.com/jquense/yup/commit/edfe6acde9e11ec2bfe2ad41aad867daae7041ce">edfe6ac</a>)</li> </ul> <h2><a href="https://github.com/jquense/yup/compare/v1.0.0...v1.0.2">1.0.2</a> (2023-02-27)</h2> <h3>Bug Fixes</h3> <ul> <li>fix array describe not including conditions (<a href="https://github.com/jquense/yup/commit/4040592ccd068ab71e06417b4d355007636cb78c">4040592</a>), closes <a href="https://redirect.github.com/jquense/yup/issues/1920">#1920</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jquense/yup/commit/6dfc75a3ae2a6edbab81c03cbccb0d668e221abf"><code>6dfc75a</code></a> Publish v1.2.0</li> <li><a href="https://github.com/jquense/yup/commit/e5c5440767d32a8be6c4a12a5f6176924e058fd2"><code>e5c5440</code></a> feat: pass options to <code>default(options => value)</code></li> <li><a href="https://github.com/jquense/yup/commit/1fadba10b0d1cad60f3708bd28282ab04a55eff6"><code>1fadba1</code></a> feat: expose printValue (<a href="https://redirect.github.com/jquense/yup/issues/2002">#2002</a>) (<a href="https://redirect.github.com/jquense/yup/issues/2008">#2008</a>)</li> <li><a href="https://github.com/jquense/yup/commit/6ed11480a3fc57ee88824abcf486bf0c205115d2"><code>6ed1148</code></a> fix a typo in README (<a href="https://redirect.github.com/jquense/yup/issues/2003">#2003</a>)</li> <li><a href="https://github.com/jquense/yup/commit/1086aa93fdd08a554936a409c30788058dbc7c32"><code>1086aa9</code></a> Publish v1.1.1</li> <li><a href="https://github.com/jquense/yup/commit/11d860a37bb3a7329436404dca2b8a2d0de8b638"><code>11d860a</code></a> add test</li> <li><a href="https://github.com/jquense/yup/commit/c07b08f033be8eea00d74a5da1cf735cf97e69df"><code>c07b08f</code></a> fix(object): excluded edges are merged when concating schema</li> <li><a href="https://github.com/jquense/yup/commit/f99949747456d7bf55da3dd38dcf86bbddba3169"><code>f999497</code></a> fix: make null validation errors consistent across schema (<a href="https://redirect.github.com/jquense/yup/issues/1982">#1982</a>)</li> <li><a href="https://github.com/jquense/yup/commit/4ed45762e955ac6af0dec935a91e815a5a1cf5b9"><code>4ed4576</code></a> fix(docs): Broken anchores (<a href="https://redirect.github.com/jquense/yup/issues/1979">#1979</a>)</li> <li><a href="https://github.com/jquense/yup/commit/d8748732f6f4afbab271e427028525209623c5ac"><code>d874873</code></a> Publish v1.1.0</li> <li>Additional commits viewable in <a href="https://github.com/jquense/yup/compare/v0.32.11...v1.2.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=yup&package-manager=npm_and_yarn&previous-version=0.32.11&new-version=1.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
- Loading branch information