Skip to content

Releases: dwightjack/vue-types

v4.0.0

27 Jun 09:46
Compare
Choose a tag to compare

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)

02 Feb 06:27
Compare
Choose a tag to compare

Warning message fix (#76). Thanks @FAKER-A

V2.0.1

14 Aug 04:47
Compare
Choose a tag to compare

Patch release

Fix a bug with default import in CommonJS (#68)

v2.0.0

09 Aug 10:34
Compare
Choose a tag to compare

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 and symbol validators do not have a type 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

v1.7.0

26 Nov 05:56
Compare
Choose a tag to compare

Features

  • extend accepts a VueType type instance as base type (#56)

v1.6.2

12 Nov 04:18
Compare
Choose a tag to compare

Bugfix Release

  • Fixes oneOf TS definition (#62)

v1.6.1

08 Nov 07:16
Compare
Choose a tag to compare

BugFix Release

  • Fixes a too much recursion error in shim #60

v.1.6.0

05 Aug 06:06
Compare
Choose a tag to compare

Minor Release

  • The UMD build now includes a minified version of the shim #57
  • Uses is-plain-object instead of lodash/isPlainObject #53 (comment)

v1.5.7

17 Jul 06:18
Compare
Choose a tag to compare

Bugfix Release

  • Allow explicit undefined key value in shape validation (#55)
  • Throws an error in type validation when type has a value of undefined (#54 (comment))

v1.5.6

11 Jul 01:59
Compare
Choose a tag to compare

Bugfix Release

  • fix .extend() (#54)