Skip to content

Commit 297cf43

Browse files
committed
update bad usage of 'deprecated'
1 parent a7c98d1 commit 297cf43

File tree

71 files changed

+103
-101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+103
-101
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# vue-migration-helper <sup>`RC`</sup>
22

3-
> CLI tool to aid in migration from Vue 1.x to 2.0. It scans files for Vue-specific code and provides detailed warnings when deprecated patterns are found.
3+
> CLI tool to aid in migration from Vue 1.x to 2.0. It scans files for Vue-specific code and provides detailed warnings when deprecated patterns are found. It cannot reliably catch _every_ deprecation, but should get you 80% of the way there.
44
55
![Screenshot](http://i.imgur.com/aHh5TfR.png)
66

@@ -17,6 +17,8 @@ cd path/to/my-vue-project
1717
vue-migration-helper
1818
# scan all files in specific sub-directories
1919
vue-migration-helper src folder-a folder-b
20+
# scan a specific file or files
21+
vue-migration-helper src/app.vue
2022
```
2123

2224
When you want to update, just run the install again:

helpers/print-summary.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ module.exports = function (deprecationsFound) {
77
if (!deprecationsFound) {
88
console.log()
99
console.log(chalk.green(
10-
'No deprecated patterns detected. Well done!'
10+
'No obsolete syntax was detected. Well done!'
1111
))
1212
console.log()
1313
console.log(chalk.yellow(
14-
'Note however that only about 80% of deprecations are detectable with this utility. See the migration guide for the rest:'
14+
'Note however that only about 80% of API changes are detectable with this utility. See the migration guide for the rest:'
1515
))
1616
console.log()
1717
console.log(chalk.blue.underline(migrationGuideUrlFor('vue')))

helpers/print-summary.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ describe('Helper: print-summary', () => {
1414
const stdout = catchLog(() => {
1515
printSummary(false)
1616
})
17-
expect(stdout).toContain('No deprecated patterns detected.')
17+
expect(stdout).toContain('No obsolete syntax was detected.')
1818
})
1919
})

rules/vue-router/canreuse-false.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
fix: (
1111
'Remove the ' + chalk.red('canReuse') + ' option'
1212
),
13-
docsHash: 'canReuse-false-deprecated',
13+
docsHash: 'canReuse-false',
1414
type: 'js'
1515
}
1616
}

rules/vue-router/hashbang-false.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
fix: (
1111
'Remove the ' + chalk.red('hashbang') + ' option'
1212
),
13-
docsHash: 'hashbang-false-deprecated',
13+
docsHash: 'hashbang-false',
1414
type: 'js'
1515
}
1616
}

rules/vue-router/history-and-abstract-modes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
'Replace ' + chalk.red(match) + ' with ' +
1212
chalk.green('mode' + spaceBeforeColon + ':' + spaceAfterColon + '\'' + mode + '\'')
1313
),
14-
docsHash: mode + '-true-deprecated',
14+
docsHash: mode + '-true',
1515
type: 'js'
1616
}
1717
}

rules/vue-router/history-and-abstract-modes.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ describe('Rule: history-and-abstract-modes', () => {
5050
history: true,
5151
`)
5252
expect(warning).toBeTruthy()
53-
expect(warning.docsHash).toBe('history-true-deprecated')
53+
expect(warning.docsHash).toBe('history-true')
5454
})
5555

5656
it('sets the correct docsHash for abstract: true', () => {
5757
const warning = check(`
5858
abstract: true,
5959
`)
6060
expect(warning).toBeTruthy()
61-
expect(warning.docsHash).toBe('abstract-true-deprecated')
61+
expect(warning.docsHash).toBe('abstract-true')
6262
})
6363
})

rules/vue-router/loading-route-data.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ module.exports = {
66
pattern: /\$loadingRouteData/,
77
warning: function (match) {
88
return {
9-
reason: 'The same results can now be achieved with normal reactive properties, so it\'s been deprecated',
9+
reason: 'The same results can now be achieved with normal reactive properties, so it\'s been removed',
1010
fix: (
1111
'Replace ' + chalk.red('$loadingRouteData') + ' with a reactive property that you define (see the link below for an example)'
1212
),
13-
docsHash: 'loadingRouteData-deprecated',
13+
docsHash: 'loadingRouteData',
1414
type: 'js'
1515
}
1616
}

rules/vue-router/root-option.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
'Rename the ' + chalk.red('root') + ' option to ' +
1212
chalk.green('base')
1313
),
14-
docsHash: 'root-deprecated',
14+
docsHash: 'root',
1515
type: 'js'
1616
}
1717
}

rules/vue-router/router-alias.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
'Replace ' + chalk.red(routerAlias) + ' with ' +
1212
'an alias option in a route definition (see link below for details)'
1313
),
14-
docsHash: 'router-alias-deprecated',
14+
docsHash: 'router-alias',
1515
type: 'js'
1616
}
1717
}

0 commit comments

Comments
 (0)