[Snyk] Upgrade @vinejs/vine from 1.4.1 to 1.7.0 #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade @vinejs/vine from 1.4.1 to 1.7.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Release notes
Package name: @vinejs/vine
This release adds support for validating dates in VineJS. You may check the documentation here. https://vinejs.dev/docs/types/date
The
vine.date
schema type accepts a string value formatted as a date and returns an instance of the JavaScript Date object. The reason we accept a string is because the data submitted over an HTTP request will always represent date/datetime as a string.Once you have a date, you may validate it further by comparing it against a fixed value or compare it against values from other fields. You may refer the documentation to view all the available validation rules.
Commits
v1.6.0...v1.7.0
v1.5.3...v1.6.0
v1.5.2...v1.5.3
Full Changelog: v1.5.1...v1.5.2
Full Changelog: v1.5.0...v1.5.1
In VineJS, you can pass runtime metadata to the validation pipeline, which you can access from the validation rules, union predicates, etc. The metadata API was not type-safe until now. However, this release allows you to define the static metadata types and a validation function to validate them at runtime.
One example is the
unique
validation rule. You might want the unique validation rule to check all the database rows except the one for the currently logged-in user. In that case, you will pass the currently logged-in userId to the statically compiled validation schema using metadata as follows.However, there is no way to know that
updateUserValidator
needs the currently logged-in user id to be functional.From
@ vinejs/[email protected]
, you can use thewithMetaData
method to define static types for the metadata a validator accepts. The schema will look as follows.You can pass a callback to
withMetaData
to validate the metadata at runtime if needed.Commits
Full Changelog: v1.4.1...v1.5.0
Full Changelog: v1.4.0...v1.4.1
Commit messages
Package name: @vinejs/vine
Compare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs