chore(deps): update npm packages (major) #6
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 contains the following updates:
^18
->^22.10.5
^1.4.0
->^3.0.0
^0.31.4
->^2.1.8
Release Notes
vinejs/vine (@vinejs/vine)
v3.0.0
: Breaking changes and bug fixesCompare Source
This release contains a few breaking changes along with a handful of new improvements and bug fixes.
Breaking changes
Infer type
The infer type of schema now marks
optional
fields asoptional
within the TypeScript types. This ensures the property can be missing altogether from the data object/inferred types vs being marked asundefined
explicitly. For example:SUBTYPE symbol
Custom types extending the VineJS
BaseLiteralType
now must define thesymbols.SUBTYPE
property on the schema. This property can be used by schema transformers to get a more accurate type for the schema node. Here's how theStringSchema
defines theSUBTYPE
property.For example:
Bug Fixes
Features
Pull Requests
New Contributors
Full Changelog: vinejs/vine@v2.1.0...v3.0.0
v2.1.0
: Add "tryValidate", "toJSON" method and "in" validation ruleCompare Source
tryValidate
The
tryValidate
method can be used to perform validation without throwing a validation error. Instead, the errors are returned as the return value of the method, which is a tuple.The
try
prefix is inspired from the Java world.in
The
in
validation rule has been added for theVineNumber
schema type and can be used to ensure the value of field is part of the allowed values list.toJSON
The
validator.toJSON
method can be used to get the validator and its refs as JSON.Commits
a70ff38
)cebb8e0
)39204e4
)0b5e212
)72912af
)34e07fc
)a7e18b7
)62d450c
)5259933
)What's Changed
New Contributors
Full Changelog: vinejs/vine@v2.0.0...v2.1.0
v2.0.0
: Improved error reporting for fields inside arrays and infer schema input typesCompare Source
This release contains a couple of minor breaking changes. So let's first talk about them.
Improved error reporting for fields inside arrays ( Breaking )
In the previous versions of VineJS, the error reporting for fields inside arrays could have been better.
Given the following schema and data
The errors reported up until 2.0 were
If you notice, the field name inside arrays is defined as
categories.*
and not the actual index of the item inside the array. Now, you may think that I can replace the*
with theindex
property value and get a nested path to the item index within the array.Well, the replacement of
*
might work in this situation. But it will not work when there are errors inside nested arrays or the field that failed the validation is a grandchild of an array. Because theindex
property only exists when the field is an immediate child of an array.But anyway, after this release, you do not have to perform any manual substitutions. The field names are nested paths with the correct index. The following is an example of errors with
@vinejs/vine@2
.Infer Schema Input value ( Breaking )
After this release, you can infer the input values a Schema type accepts. Let's consider the following example.
If you notice, the
is_admin
property accepts aboolean | string | number
. VineJS is built for parsing form inputs submitted over HTTP. Therefore, it receives all inputs asstring
values and performs normalization before performing any sort of validation.Because of this change, the
BaseSchema
classes accept another generic value for theInputTypes
. So, if you use the BaseSchema anywhere in your apps, make sure to pass the Input type as the first generic argument.Also, please consult this commit for a better understanding of the change. vinejs/vine@df27df8
Define error messages for specific array index or a wildcard ( New feature )
Now, you will be able to define custom error messages for specific array indexes with a wildcard fallback for rest of the indexes. For example:
Commits
9dd733c
df27df8
3d59dad
8ff246f
What's Changed
New Contributors
Full Changelog: vinejs/vine@v1.7.0...v2.0.0
v1.8.0
: Add requiredIf rulesCompare Source
Please check docs to learn how
requiredIf
rules work. And check this PR to understand the difference betweenvine.union
andrequiredIf
rules.Commits
893d378
81beff7
21ac492
d2a03a3
ef50170
200bb39
63c49e2
f94d274
02ff0a5
d6f5589
ffb2a4e
What's Changed
New Contributors
Full Changelog: vinejs/vine@v1.7.1...v1.8.0
v1.7.1
: Bug fix and performance improvementsCompare Source
bcebea5
9dd9d85
6e412b2
3e35b83
4c88fa1
92a48c8
What's Changed
Full Changelog: vinejs/vine@v1.7.0...v1.7.1
v1.7.0
: Support for validating datesCompare Source
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
e85356b
e07cb69
1b5c497
b39b00c
02c2945
223bb93
c893f10
628b4c7
ce6c52c
cf08e2a
72d098d
16bd6e8
5d2a97a
f98e099
v1.6.0
: Bundling with tsupCompare Source
627ee41
v1.5.3
: Use validator.js specific importsCompare Source
459f3e5
v1.5.2
: Export VineValidator classCompare Source
cfaeeff
74ca7e0
9b7bc07
Full Changelog: vinejs/vine@v1.5.1...v1.5.2
v1.5.1
: Fix: Make schema classes Macroable to be extensibleCompare Source
2f5258c
89efc20
d04800c
a417418
41bd3d5
Full Changelog: vinejs/vine@v1.5.0...v1.5.1
v1.5.0
: Add API to make validation metadata type-safeCompare Source
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
09c4097
a02908d
4181ee4
f24ebb8
92697c4
fcad2fb
Full Changelog: vinejs/vine@v1.4.1...v1.5.0
v1.4.1
: Export testing factoriesCompare Source
ffe8279
Full Changelog: vinejs/vine@v1.4.0...v1.4.1
vitest-dev/vitest (vitest)
v2.1.8
Compare Source
🐞 Bug Fixes
View changes on GitHub
v2.1.7
Compare Source
🐞 Bug Fixes
pnpm.overrides
or yarn resolutions to override thevite
version in thevitest
package - the APIs are compatible.View changes on GitHub
v2.1.6
Compare Source
🚀 Features
View changes on GitHub
v2.1.5
Compare Source
🚀 Features
🐞 Bug Fixes
dangerouslyIgnoreUnhandledErrors
without base reporter - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6808 (0bf0a)unhandledRejection
even when base reporter is not used - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6812 (8878b)sequence.concurrent
from theRuntimeConfig
type - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6880 (6af73).poll
,.element
,.rejects
/.resolves
, andlocator.*
weren't awaited - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6877 (93b67)enter
or'a'
- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6848 (487c8)🏎 Performance
View changes on GitHub
v2.1.4
Compare Source
🚀 Features
transformIndexHtml
- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6725 (16902)🐞 Bug Fixes
v=
queries to setup files imports - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6759 (b8258)toThrowError
with empty string parameter - by @shulaoda in https://github.com/vitest-dev/vitest/issues/6710 (a6129)test.extend
type exports - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6707 (e5c38)🏎 Performance
hash
to replacecreateHash
- by @btea in https://github.com/vitest-dev/vitest/issues/6703 (5d07b)View changes on GitHub
v2.1.3
Compare Source
🐞 Bug Fixes
toBeNaN, toBeUndefined, toBeNull, toBeTruthy, toBeFalsy
- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6697 (e0027)/mockServiceWorker.js
instead of/__vitest_msw__
- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6687 (4b2ce)toMatchObject
diff - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6620 (d289e)<empty line>
logs when interleavingconsole.log/error
- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6644 (9ece3)fast-glob
instead oftinyglobby
in Vitest - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6688 (70baa)🏎 Performance
View changes on GitHub
v2.1.2
Compare Source
🐞 Bug Fixes
Vitest.setServer
to postconfigureServer
hook to enable import analysis for workspace config loading - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6584 (e7f35)BenchmarkResult.samples
array to reduce memory usage - by @hi-ogawa and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6541 (a6407)data:
protocol on preview provider file upload - by @userquin in https://github.com/vitest-dev/vitest/issues/6501 (e9821)*.astro
by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6565 (f8ff7)cleanOnRerun: false
to invalidate previous results - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6592 (88bde)toBeDefined
withexpect.poll
- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6562 (f7da6)beforeAll
failed - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6524 (fb797)onTestFinished
andonTestFailed
duringretry
andrepeats
- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6609 (c5e29)--standalone
- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6577 (d0bf8)View changes on GitHub
v2.1.1
Compare Source
🐞 Bug Fixes
View changes on GitHub
v2.1.0
Compare Source
This release makes another big change to the Browser Mode by introducing locators API: