Releases: dwightjack/vue-types
v4.0.0
Major Release
This release introduces two main changes that may be breaking depending on your application setup:
- The library is now published as an ES Module with fallback support for Common JS and UMD.
- Version 4.x works with both Vue 2 and Vue 3
VueTypes as an ES Module
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.
Vue 2 and Vue 3 compatibility
The following changes where introduced to support both versions of Vue.
prop.type
can be true
on Vue 2 components
TypeScript 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.
Console logging setup
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
v2.0.3 (also v3.0.2 for Vue3)
V2.0.1
v2.0.0
VueTypes has been rewritten in TypeScript and bundled with microbundle to provide native TS support and small bundle size.
v2.x should be compatible with almost every application using v1.x.
Visit the new documentation site to learn about new features and improvements.
Breaking changes
any
andsymbol
validators do not have atype
property.VueTypes
is a native ES6 class with static properties instead of a plain object.
New features
- exposes individual validators as named exports (reference).
- exposes
createTypes
to generate custom namespaced instances (reference) (#48).
Other improvements
- better TypeScript support.
- improved logging (#13).
- modern build provided by microbundle (reference).
v1.7.0
v1.6.2
v1.6.1
v.1.6.0
Minor Release
- The UMD build now includes a minified version of the shim #57
- Uses
is-plain-object
instead oflodash/isPlainObject
#53 (comment)
v1.5.7
Bugfix Release
- Allow explicit
undefined
key value in shape validation (#55) - Throws an error in type validation when
type
has a value ofundefined
(#54 (comment))