Skip to content

Releases: dwightjack/vue-types

[email protected]

09 Jul 01:21
aeda994
Compare
Choose a tag to compare

[email protected]

09 Jul 01:23
aeda994
Compare
Choose a tag to compare

[email protected]

02 May 09:39
39ad7c6
Compare
Choose a tag to compare

[email protected]

26 Jul 04:51
324ef4b
Compare
Choose a tag to compare

[email protected]

23 Jun 06:14
07601bb
Compare
Choose a tag to compare

[email protected]

23 Jun 06:15
07601bb
Compare
Choose a tag to compare

[email protected]

15 May 03:17
ee5a8ca
Compare
Choose a tag to compare

v5.0.2

22 Dec 03:11
Compare
Choose a tag to compare

Fix

  • expose the validateType function in the shim build (fixes #319)

v5.0.1

23 Nov 07:00
Compare
Choose a tag to compare

Note: v5.0.0 has been skipped due to an internal bug. Please use v5.0.1 or above.

Breaking Changes

Default for booleans

bool().def(undefined) explicitly sets the default: undefined property on the type instead of removing it (#284):

const type = bool().def(true) //  { type: Boolean, default: true }

// vue-types@4
type.def(undefined)//  { type: Boolean }

// vue-types@5
type.def(undefined)//  { type: Boolean, default: undefined }

Nullable strict validation

nullable validates only when a prop value is === null. This change makes it easier to use it with other validators like oneOfType.

oneOfType and oneOf strict validation

When passed a oneOf validator, oneOfType checks the actual values instead of their types.

const type = oneOfType([oneOf(['auto', 'fit-content'] as const), Number]);

// vue-types@4
typeof type === string | number

// @vue-types@5
typeof type === 'auto' | 'fit-content' | number

This makes it easier to define complex validators mixing specific values and generic types.

Standalone Nuxt module

Nuxt support has been moved to a dedicated module: vue-types-nuxt including support for both Nuxt@2 and Nuxt@3. See the usage documentation here: https://dwightjack.github.io/vue-types/guide/installation.html#nuxt

Minor Changes

  • oneOf supports null as a value: oneOf(['on', 'off', null])
  • Support for union types in oneOf (#147)

Other Changes and Notes

  • Documentation migrated to VitePress.
  • Repository structure converted to an NPM monorepo.

v4.2.1

01 Aug 05:56
Compare
Choose a tag to compare

Bugfix Release

  • shared types definitions were published in the wrong folder (f455c09)