egoist / poi

⚡A zero-config bundler for JavaScript applications.
https://poi.js.org
MIT License
5.23k stars 255 forks source link

chore(deps): bump superstruct from 0.6.0 to 0.15.1 #785

Open dependabot-preview[bot] opened 3 years ago

dependabot-preview[bot] commented 3 years ago

Bumps superstruct from 0.6.0 to 0.15.1.

Changelog

Sourced from superstruct's changelog.

Changelog

This document maintains a list of changes to the superstruct package with each new version. Until 1.0.0 is released, breaking changes will be added as minor version bumps, and smaller changes and fixes won't be detailed.

0.15.0 — March 25, 2021

FIXED

Unions can now be coerced. Previously unions created a barrier in coercion such that structs nested inside unions would not have their coercion logic triggered, but this has been fixed.

Assigning preserves type structs. Previously using the assign helper would implicitly convert type structs into object structs which wasn't expected and confusing, but this has been fixed.

0.14.0 — January 26, 2021

BREAKING

The mask helper now works for nested objects. Previously it would only mask the properties at the top-level of a struct, however now it acts deeply. You can use it to define object structs once, but use them either strictly or loosely.

The masked coercion has been removed. This previously allowed you to mix in masking to a specific struct, but the mask helper is a more robust way to do this, and it doesn't force you to maintain two separate structs.

0.13.0 — December 11, 2020

NEW

Structs can now define an entries iterator for nested values. Previously iterating through nested values was defined in a one-off manner inside certain structs, but this led to non-uniform support. Now, any struct can define an entries iterator that will cause nested values to be automatically coerced and validated.

Coercion receives context objects and supports nested values. Previously context objects were only passed to the validations and refinements. But now the same context is passed to coercions too so you can implement more complex logic. And coercions are automatically applied to nested values thanks to the addition of entries.

Iteration logic has gotten simpler, and more performant. The addition of the entries logic has enabled us to only ever iterate through a tree of values one time for coercion and validation, instead of once each. This should speed up most standard use cases.

BREAKING

The ctx.fail() function has been removed. Previously you'd use it to return more information about a failure inside a struct. Now you can simply return a partial failure object.

The ctx.check() function has been removed. Previously you'd use it to validate nested objects in more complex struct shapes. Now you can use the new entries property for this instead.

The context.struct and context.value properties have been removed. These properties were previously available, but unnecessary since anywhere you have the context object you will also know the value and the specific struct that is being validated. Keeping them around required extra unnecessary plumbing in the library that made composing structs much more difficult so they were removed.

0.12.0 — November 24, 2020

NEW

New Describe utility type. This new utility lets you define a struct from an existing TypeScript type and ensure that the struct's validation matches it, otherwise TypeScript's compiler will error. For example:

type User = {
  id: number
  name: string
}

</tr></table>

... (truncated)

Commits
  • 1cb4515 v0.15.1
  • b312997 fix max refinement error message
  • 5bf86e5 v0.15.0
  • a9aff6d update changelog
  • fb0913e feat(union): add support for coercion of union types (#723)
  • d05febd feat(assign): return type struct when assigning to type struct (#721)
  • 546e5fe trigger docs rebuiled
  • 1e5257c Bump rollup-plugin-ts from 1.3.7 to 1.3.10
  • afc25da Bump @types/node from 14.14.34 to 14.14.35
  • 185fffa Bump rollup from 2.41.2 to 2.42.2
  • Additional commits viewable in compare view


Dependabot compatibility score

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 will not automatically merge this PR because this dependency is pre-1.0.0.


Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking Bump now in your Dependabot dashboard.

Dependabot commands and options
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) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Automerge options (never/patch/minor, and dev/runtime dependencies) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)