Skip to content

Commit 20b4b95

Browse files
committed
changelog v3.0
1 parent 415311b commit 20b4b95

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/docs
22
/test
3+
/changelog
34
/.github
45
/.gitignore
56
/.editorconfig

changelog/v3.0.0.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Description
2+
3+
In v3.0.0, v-f-d is compatible with both decorators API stage 3 and stage 2 now.
4+
5+
# Decorators API stage 3
6+
7+
To enable this, you need to update TypeScript to 5.x and set `compilerOptions.experimentalDecorators` to `false` (value `true` for stage 2).
8+
9+
> Currently some vue libraries(e.g. Volar) may not compatible with TypeScript 5.x.
10+
11+
# Breaking changes
12+
13+
### Cast class component to vue options API
14+
15+
Using `toNative` to cast a class component to vue options API, after that, the casted component could be used as a native vue component in where vue accepts it.
16+
17+
> Currently `toNative` is not necessary, because v-f-d use a vue internal API, but it is not stable and may missing in the future vue verions. So `toNameve` is recommended.
18+
19+
```typescript
20+
@Component
21+
export class MyComp extends Vue{}
22+
export default toNative(MyComp)
23+
24+
//Code also works currently:
25+
@Component
26+
export default class MyComp extends Vue{}
27+
```
28+
29+
### Depreactate init class property despends on another in constructor
30+
31+
This is not allowed now.
32+
```typescript
33+
@Component({
34+
name: "MyComponent"
35+
})
36+
export class MyComponent extends Vue {
37+
@Prop
38+
prop!: string
39+
40+
field = this.prop // this is deprecated, it will be undefined
41+
}
42+
43+
export default toNative(MyComponent)
44+
```
45+
46+
### Remove `index-return-cons`
47+
48+
Remove `vue-facing-decorator/dist/index-return-cons`, you won't need this if `toNative` exists.
49+
50+
# What's new
51+
52+
* `createDecorator` has a preserve option. see docs.
53+
54+
* `v-model` sets event name in emits option now.
55+
56+

src/index-return-cons.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './index'

0 commit comments

Comments
 (0)