Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yup

Package Overview
Dependencies
Maintainers
1
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yup - npm Package Versions

1
1113

0.7.2

Diff

monastic.panic
published 0.7.1 •

monastic.panic
published 0.7.0 •

Changelog

Source

0.7.0

breaking

  • the validation() method has been renamed to test() and has a new signature requiring a name argument
  • exclusive validations now trump the previous one instead of defering to it e.g: string().max(10).max(15) has a max of 15 instead of 10

other changes

  • expose advanced signature for custom validation tests, gives finer grained control over how tests are added
  • added the abortEarly (default: true) option
  • transforms are passed an addition parameter: 'originalValue' you allow recovering from a bad transform further up the chain (provided no one mutated the value)
monastic.panic
published 0.6.3 •

Changelog

Source

0.6.3

  • fix concat() method and add tests
monastic.panic
published 0.6.2 •

Changelog

Source

0.6.2

  • fix validations where nullable fields were failing due to null values e.g string.max()
monastic.panic
published 0.6.1 •

Changelog

Source

0.6.1

  • fix export error
monastic.panic
published 0.6.0 •

Changelog

Source

0.6.0

breaking

  • Removed the extend and create methods. Use whatever javascript inheritance patterns you want instead.
  • the resolution order of defaults and coercions has changed. as well as the general handling of null values.
    • Number: null will coerce to false when nullable() is not specified. NaN values will now fail isType() checks
    • String: null will coerce to '' when nullable() is not specified
    • Date: Invalid dates will not be coerced to null, but left as invalid date, This is probably not a problem for anyone as invalid dates will also fail isType() checks
  • default values are cloned everytime they are returned, so it is impossible to share references to defaults across schemas. No one should be doing that anyway
  • stopped pretending that using schemas as conditions in when() actually worked (it didn't)

other changes

  • transform() now passes the original value to each transformer. Allowing you to recover from a bad transform.
  • added the equals() alias for oneOf
monastic.panic
published 0.5.1 •

monastic.panic
published 0.5.0 •

Changelog

Source

0.5.0

breaking

  • isValid is now async, provide a node style callback, or use the promise the method returns to read the validity. This change allows for more robust validations, specifically remote ones for client code (or db queries for server code). The cast method is still, and will remain, synchronous.

other changes

  • added validate method (also async) which resolves to the value, and rejects with a new ValidationError
theporchrat
published 0.4.2 •

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc