New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

yup

Package Overview
Dependencies
Maintainers
1
Versions
130
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.5

Diff

monastic.panic
published 0.7.4 •

monastic.panic
published 0.7.3 •

monastic.panic
published 0.7.2 •

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
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