// deprecations
DEPRECATION_VNODE_HOOKS,
+ DEPRECATION_V_IS,
// Special value for higher-order compilers to pick up the last code
// to avoid collision of error codes. This should always be kept as the last
[ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED]: `"scopeId" option is only supported in module mode.`,
// deprecations
- [ErrorCodes.DEPRECATION_VNODE_HOOKS]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted.`,
+ [ErrorCodes.DEPRECATION_VNODE_HOOKS]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
+ [ErrorCodes.DEPRECATION_V_IS]: `v-is="component-name" has been deprecated. Use is="vue:component-name" instead. v-is support will be removed in 3.4.`,
// just to fulfill types
[ErrorCodes.__EXTEND_POINT__]: ``
}
} else {
// directive
- // v-is (TODO Deprecate)
+ // v-is (TODO: remove in 3.4)
if (p.name === 'is') {
return true
} else if (
}
}
- // 1.5 v-is (TODO: Deprecate)
+ // 1.5 v-is (TODO: remove in 3.4)
const isDir = !isExplicitDynamic && findDir(node, 'is')
if (isDir && isDir.exp) {
+ if (__DEV__) {
+ context.onWarn(
+ createCompilerError(ErrorCodes.DEPRECATION_V_IS, isDir.loc)
+ )
+ }
return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
isDir.exp
])
}
export const enum DOMErrorCodes {
- X_V_HTML_NO_EXPRESSION = 52 /* ErrorCodes.__EXTEND_POINT__ */,
+ X_V_HTML_NO_EXPRESSION = 53 /* ErrorCodes.__EXTEND_POINT__ */,
X_V_HTML_WITH_CHILDREN,
X_V_TEXT_NO_EXPRESSION,
X_V_TEXT_WITH_CHILDREN,
// errors out if there are collisions.
if (DOMErrorCodes.X_V_HTML_NO_EXPRESSION < ErrorCodes.__EXTEND_POINT__) {
throw new Error(
- 'DOMErrorCodes need to be updated to match extension point from core ErrorCodes.'
+ `DOMErrorCodes need to be updated to ${
+ ErrorCodes.__EXTEND_POINT__ + 1
+ } to match extension point from core ErrorCodes.`
)
}
}
}
export const enum SSRErrorCodes {
- X_SSR_UNSAFE_ATTR_NAME = 62 /* DOMErrorCodes.__EXTEND_POINT__ */,
+ X_SSR_UNSAFE_ATTR_NAME = 65 /* DOMErrorCodes.__EXTEND_POINT__ */,
X_SSR_NO_TELEPORT_TARGET,
X_SSR_INVALID_AST_NODE
}
// errors out if there are collisions.
if (SSRErrorCodes.X_SSR_UNSAFE_ATTR_NAME < DOMErrorCodes.__EXTEND_POINT__) {
throw new Error(
- 'SSRErrorCodes need to be updated to match extension point from core DOMErrorCodes.'
+ `SSRErrorCodes need to be updated to ${
+ DOMErrorCodes.__EXTEND_POINT__ + 1
+ } to match extension point from core DOMErrorCodes.`
)
}
}