vue-types

Vue Prop Types definitions

MIT License

Downloads
394.6K
Stars
551
Committers
18

Bot releases are hidden (Show)

vue-types - v4.0.0

Published by dwightjack over 3 years ago

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
vue-types - v2.0.3 (also v3.0.2 for Vue3)

Published by dwightjack over 3 years ago

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

vue-types - V2.0.1

Published by dwightjack about 4 years ago

Patch release

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

vue-types - v2.0.0

Published by dwightjack about 4 years ago

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

  • better TypeScript support.
  • improved logging (#13).
  • modern build provided by microbundle (reference).
vue-types - v1.7.0

Published by dwightjack almost 5 years ago

Features

  • extend accepts a VueType type instance as base type (#56)
vue-types - v1.6.2

Published by dwightjack almost 5 years ago

Bugfix Release

  • Fixes oneOf TS definition (#62)
vue-types - v1.6.1

Published by dwightjack almost 5 years ago

BugFix Release

  • Fixes a too much recursion error in shim #60
vue-types - v.1.6.0

Published by dwightjack about 5 years ago

Minor Release

vue-types - v1.5.7

Published by dwightjack over 5 years ago

Bugfix Release

vue-types - v1.5.6

Published by dwightjack over 5 years ago

Bugfix Release

  • fix .extend() (#54)
vue-types - v1.5.5

Published by dwightjack over 5 years ago

Security Fix

  • updated tooling and build chain
  • Fix #53 and #52
vue-types - v.1.5.3

Published by dwightjack over 5 years ago

Bug Fixes

  • Fixes missing default values when using the shimmed version #51
vue-types - v.1.5.0

Published by dwightjack over 5 years ago

New features

  • Added a production shim to reduce bundle size (docs). #41
  • Added a validate method to native types to setup a validator function in a chainable fashion (see example here). #40
  • Added a global extend method to add custom proptypes to VueTypes (docs) #35

Minor changes

  • Refined Typescript types and test suite
vue-types - v1.3.3

Published by dwightjack about 6 years ago

Maintenance Release

  • Development Dependencies updates
  • Addressed lodash.isplainobjet vulnerability issue (#33)
vue-types - v1.3.2

Published by dwightjack over 6 years ago

Patch Release

  • Better documentation for VueTypes.shape.def() function (ref #32)
  • Fixed typescript type definition for default values of array and objects prop types. Now accepts both raw values and factories.
vue-types - v1.3.1

Published by dwightjack over 6 years ago

Bugfix release

  • TS typings fix: allow any object property when assigning default value to .shape.loose.def(...) types
vue-types - v1.3.0

Published by dwightjack over 6 years ago

Minor Changes

New Features

  • Added TypeScript type definitions

Maintenance

  • Updated development packages
vue-types - v1.2.3

Published by dwightjack over 6 years ago

Maintenance Release

  • Dependencies updates
  • Set Vue as external peer dependency
vue-types - V1.2.1

Published by dwightjack over 6 years ago

Bugfix Release

Changelog

  • silence warnings inside nested validation process. #30
vue-types - v1.2.0

Published by dwightjack over 6 years ago

Minor Changes

  • JavaScript transpilation is based on babel-preset-env and browserlist. #26 #27
  • Exposes two utility functions: utils.validate() and utils.toType(). Check README for usage details #21
Package Rankings
Top 6.69% on Proxy.golang.org
Top 1.61% on Npmjs.org
Top 31.99% on Repo1.maven.org
Related Projects