Skip to content

Commit bf1553c

Browse files
committed
add 0.12 deprecation warnings
1 parent 70045b8 commit bf1553c

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

src/util/debug.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,23 @@ function enableDebug () {
4646
*/
4747

4848
exports.assertAsset = function (val, type, id) {
49+
/* istanbul ignore if */
50+
if (type === 'directive') {
51+
if (id === 'component') {
52+
exports.warn(
53+
'v-component has been deprecated in 0.12. ' +
54+
'Use custom element syntax instead.'
55+
)
56+
return
57+
}
58+
if (id === 'with') {
59+
exports.warn(
60+
'v-with has been deprecated in 0.12. ' +
61+
'Use props instead.'
62+
)
63+
return
64+
}
65+
}
4966
if (!val) {
5067
exports.warn('Failed to resolve ' + type + ': ' + id)
5168
}

src/util/options.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ strats.props = function (parentVal, childVal) {
123123
: parentVal
124124
}
125125

126+
/**
127+
* 0.11 deprecation warning
128+
*/
129+
130+
strats.paramAttributes = function () {
131+
/* istanbul ignore next */
132+
_.warn(
133+
'"paramAttributes" option has been deprecated in 0.12. ' +
134+
'Use "props" instead.'
135+
)
136+
}
137+
126138
/**
127139
* Assets
128140
*

0 commit comments

Comments
 (0)