From 84918577d246619c2786b65479e5dd8ed5c6a7ae Mon Sep 17 00:00:00 2001 From: Chris Fritz Date: Tue, 1 Nov 2016 11:17:25 -0400 Subject: [PATCH] fix problematic use of 'deprecated' in warnings (#4043) --- src/compiler/parser/index.js | 2 +- src/platforms/web/compiler/modules/class.js | 5 +++-- test/unit/modules/compiler/parser.spec.js | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/compiler/parser/index.js b/src/compiler/parser/index.js index 1c49f14e..8e591e86 100644 --- a/src/compiler/parser/index.js +++ b/src/compiler/parser/index.js @@ -399,7 +399,7 @@ function processAttrs (el) { if (expression) { warn( `${name}="${value}": ` + - 'Interpolation inside attributes has been deprecated. ' + + 'Interpolation inside attributes has been removed. ' + 'Use v-bind or the colon shorthand instead. For example, ' + 'instead of
, use
.' ) diff --git a/src/platforms/web/compiler/modules/class.js b/src/platforms/web/compiler/modules/class.js index 59fdc2e6..eb93895f 100644 --- a/src/platforms/web/compiler/modules/class.js +++ b/src/platforms/web/compiler/modules/class.js @@ -15,8 +15,9 @@ function transformNode (el: ASTElement, options: CompilerOptions) { if (expression) { warn( `class="${staticClass}": ` + - 'Interpolation inside attributes has been deprecated. ' + - 'Use v-bind or the colon shorthand instead.' + 'Interpolation inside attributes has been removed. ' + + 'Use v-bind or the colon shorthand instead. For example, ' + + 'instead of
, use
.' ) } } diff --git a/test/unit/modules/compiler/parser.spec.js b/test/unit/modules/compiler/parser.spec.js index 4d78bfe5..885f59f7 100644 --- a/test/unit/modules/compiler/parser.spec.js +++ b/test/unit/modules/compiler/parser.spec.js @@ -256,7 +256,7 @@ describe('parser', () => { expect(ast2.classBinding).toBe('class1') // interpolation warning parse('

hello world

', baseOptions) - expect('Interpolation inside attributes has been deprecated').toHaveBeenWarned() + expect('Interpolation inside attributes has been removed').toHaveBeenWarned() }) it('style binding', () => { @@ -318,7 +318,7 @@ describe('parser', () => { expect(ast1.attrs[2].value).toBe('"hello world"') // interpolation warning parse('', baseOptions) - expect('Interpolation inside attributes has been deprecated').toHaveBeenWarned() + expect('Interpolation inside attributes has been removed').toHaveBeenWarned() }) if (!isIE) {