Vue Prop Types definitions
oneOfType
regression (#188)custom()
validator functions are executed when used as shape()
properties (https://github.com/dwightjack/vue-types/pull/177)custom()
validator functions are executed when used as shape()
properties (https://github.com/dwightjack/vue-types/issues/176)VueTypes.extend([... ])
(https://github.com/dwightjack/vue-types/pull/158 thanks @iamricogo)This release introduces two main changes that may be breaking depending on your application setup:
With the wide support for the ES Module format in Node.js, browsers and bundlers, VueTypes has switched to this format by default. CommonJS is still supported for older bundlers and Node.js versions, while UMD is available for direct usage in browsers.
This change will not affect most usage scenarios; anyway, if you are using the shim version or have configured your bundler to alias vue-types
module, make sure to read the updated installation documentation.
The following changes where introduced to support both versions of Vue.
prop.type
can be true
on Vue 2 componentsTypeScript definitions have changed between v2 and v3 of Vue. The most notable change is that PropOptions.type
can now be true
. To support both version, VueTypes uses customized component prop's TS definitions. This change should not affect your application.
In VueTypes 2, the library used the global Vue.config.silent
property to manage its logging behavior. This property is no more available in Vue 3 and thus the behaviour has been changed.
If you wan to replicate the old behavior in applications using VueTypes 4 and Vue 2, you can add the following line to your entry point (documentation):
import Vue from 'vue'
import VueTypes from 'vue-types'
VueTypes.config.silent = Vue.config.silent
Warning message fix (#76). Thanks @FAKER-A