Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .changeset/forty-crabs-beg.md

This file was deleted.

81 changes: 0 additions & 81 deletions .changeset/wet-bottles-drop.md

This file was deleted.

82 changes: 82 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,87 @@
# vue-types

## 6.0.0

### Major Changes

- 306173f: #### Drop Vue 2 support

Vue 2 reached End of Life (EOL) on December 31st, 2023. By dropping Vue 2 compatibility we can deliver a smaller package and make the source code more maintainable.

If you're unable to update to Vue 3, please use vue-types@5.x

#### Removed `VueTypes.extend` method

`VueTypes.extend` was deprecated in v5. In v6 this method has been removed. Please migrate your code to use ES6+ `extends` feature.

Example:

Using `VueTypes.extend` (old):

```js
import VueTypes from 'vue-types'

export const VueTypesProject = VueTypes.extend([
{
name: 'maxLength',
type: String,
validator: (max, v) => v.length <= max,
},
{
name: 'positive',
getter: true,
type: Number,
validator: (v) => v > 0,
},
])
```

Using ES6+ `extends` (new):

```js
import VueTypes, { toType } from 'vue-types'

export class VueTypesProject extends VueTypes {
static maxLength(max) {
return toType('maxLength', {
type: String,
validator: (v) => String(v).length <= max,
})
}

static get positive() {
return toType('positive', {
type: Number,
validator: (v) => v > 0,
})
}
}
```

#### Package format review:

- ESM and CJS builds target is ESNext (browsers with support for the latest JavaScript features).
- UMD builds target is ES2016 (aligned with [Vue 3 browser support](https://vuejs.org/about/faq#what-browsers-does-vue-support))

If you're using a bundler, you should not encounter any issue.

If you are directly referencing or importing a specific file in the `dist` or `shim` folder, you might need to update its path as described in the following table:

| Old (v5) | New (v6) |
| -------------------------- | ------------------- |
| `dist/vue-types.m.js` | `dist/index.mjs` |
| `dist/vue-types.modern.js` | `dist/index.mjs` |
| `dist/vue-types.cjs` | `dist/index.cjs` |
| `dist/vue-types.umd.js` | `dist/index.umd.js` |
| `dist/shim.m.js` | `dist/shim.mjs` |
| `dist/shim.modern.js` | `dist/shim.mjs` |
| `dist/shim.cjs` | `dist/shim.cjs` |
| `dist/shim.umd.js` | `dist/shim.umd.js` |
| `shim/index.m.js` | `dist/shim.mjs` |
| `shim/index.modern.js` | `dist/shim.mjs` |
| `shim/index.cjs` | `dist/shim.cjs` |
| `shim/index.umd.js` | `dist/shim.umd.js` |

## 5.1.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-types",
"version": "5.1.3",
"version": "6.0.0",
"description": "Prop types utility for Vue",
"author": "Marco Solazzi",
"license": "MIT",
Expand Down
12 changes: 12 additions & 0 deletions packages/nuxt/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# vue-types-nuxt

## 3.0.0

### Major Changes

- 37c8fa4: - Remove Nuxt@2 support
- Update vue-types dependency to v6

### Patch Changes

- Updated dependencies [306173f]
- vue-types@6.0.0

## 2.0.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-types-nuxt",
"version": "2.0.3",
"version": "3.0.0",
"license": "MIT",
"type": "module",
"exports": {
Expand Down
Loading