CUSTOM_DIR = 'CUSTOM_DIR',
ATTR_FALSE_VALUE = 'ATTR_FALSE_VALUE',
- ATTR_ENUMERATED_COERSION = 'ATTR_ENUMERATED_COERSION',
+ ATTR_ENUMERATED_COERCION = 'ATTR_ENUMERATED_COERCION',
TRANSITION_CLASSES = 'TRANSITION_CLASSES',
TRANSITION_GROUP_ROOT = 'TRANSITION_GROUP_ROOT',
link: `https://v3.vuejs.org/guide/migration/attribute-coercion.html`
},
- [DeprecationTypes.ATTR_ENUMERATED_COERSION]: {
+ [DeprecationTypes.ATTR_ENUMERATED_COERCION]: {
message: (name: string, value: any, coerced: string) =>
`Enumerated attribute "${name}" with v-bind value \`${value}\` will ` +
`${
`If the usage is intended, ` +
`you can disable the compat behavior and suppress this warning with:` +
`\n\n configureCompat({ ${
- DeprecationTypes.ATTR_ENUMERATED_COERSION
+ DeprecationTypes.ATTR_ENUMERATED_COERCION
}: false })\n`,
link: `https://v3.vuejs.org/guide/migration/attribute-coercion.html`
},
if (
v2CocercedValue &&
compatUtils.softAssertCompatEnabled(
- DeprecationTypes.ATTR_ENUMERATED_COERSION,
+ DeprecationTypes.ATTR_ENUMERATED_COERCION,
instance,
key,
value,
| V_ON_KEYCODE_MODIFIER | ● | `v-on` no longer supports keyCode modifiers | [link](https://v3.vuejs.org/guide/migration/keycode-modifiers.html) |
| CUSTOM_DIR | ● | Custom directive hook names changed | [link](https://v3.vuejs.org/guide/migration/custom-directives.html) |
| ATTR_FALSE_VALUE | ● | No longer removes attribute if binding value is boolean `false` | [link](https://v3.vuejs.org/guide/migration/attribute-coercion.html) |
-| ATTR_ENUMERATED_COERSION | ● | No longer special case enumerated attributes | [link](https://v3.vuejs.org/guide/migration/attribute-coercion.html) |
+| ATTR_ENUMERATED_COERCION | ● | No longer special case enumerated attributes | [link](https://v3.vuejs.org/guide/migration/attribute-coercion.html) |
| TRANSITION_GROUP_ROOT | ● | `<transition-group>` no longer renders a root element by default | [link](https://v3.vuejs.org/guide/migration/transition-group.html) |
| COMPONENT_ASYNC | ● | Async component API changed (now requires `defineAsyncComponent`) | [link](https://v3.vuejs.org/guide/migration/async-components.html) |
| COMPONENT_FUNCTIONAL | ● | Functional component API changed (now must be plain functions) | [link](https://v3.vuejs.org/guide/migration/functional-components.html) |
).toHaveBeenWarned()
})
-test('ATTR_ENUMERATED_COERSION', () => {
+test('ATTR_ENUMERATED_COERCION', () => {
const vm = new Vue({
template: `<div :draggable="null" :spellcheck="0" contenteditable="foo" />`
}).$mount()
expect(vm.$el.getAttribute('spellcheck')).toBe('true')
expect(vm.$el.getAttribute('contenteditable')).toBe('true')
expect(
- (deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERSION]
+ (deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERCION]
.message as Function)('draggable', null, 'false')
).toHaveBeenWarned()
expect(
- (deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERSION]
+ (deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERCION]
.message as Function)('spellcheck', 0, 'true')
).toHaveBeenWarned()
expect(
- (deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERSION]
+ (deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERCION]
.message as Function)('contenteditable', 'foo', 'true')
).toHaveBeenWarned()
})