Skip to content

v6.0.0

Compare
Choose a tag to compare
@mysticatea mysticatea released this 07 Feb 22:34
· 145 commits to master since this release
v6.0.0
28729dd

This release supported the new syntax in Vue.js 2.6 🎉

Breaking changes

This release contains a drastic change about VDirectiveKey AST node because now the directive key have gotten to be able to have JavaScript expression.

  export interface VDirectiveKey extends HasLocation, HasParent {
      type: "VDirectiveKey"
      parent: VAttribute
-     name: string
-     argument: string | null
-     modifiers: string[]
-     shorthand: boolean
+     name: VIdentifier
+     argument: VExpressionContainer | VIdentifier | null
+     modifiers: VIdentifier[]
  }
  • It changed the members name, argument, and modifiers to AST nodes from strings. Especially, argument will be a VExpressionContainer node if the directive has dynamic argument syntax.
  • It removed shorthand member. To check wheather the directive key is a shorthand or not, use name.rawName member.
    • :foo ... directiveKey.name.rawName is ":" (and directiveKey.name.name is "bind").
    • .foo ... directiveKey.name.rawName is "." (and directiveKey.name.name is "bind" and directiveKey.modifiers includes the identifier node of "prop").
    • @foo ... directiveKey.name.rawName is "@" (and directiveKey.name.name is "on").
    • #foo ... directiveKey.name.rawName is "#" (and directiveKey.name.name is "slot").

Commits