Patch rename
This commit is contained in:
parent
d2b1082435
commit
449a71100e
3 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
# 2.1.4+1
|
||||||
|
* Patch `part of 'path'` renames.
|
||||||
|
|
||||||
# 2.1.4
|
# 2.1.4
|
||||||
* The `migration` argument to `model` just emits an annotation now.
|
* The `migration` argument to `model` just emits an annotation now.
|
||||||
* Add the ORM boilerplate.
|
* Add the ORM boilerplate.
|
||||||
|
|
|
@ -167,11 +167,13 @@ class RenamingVisitor extends RecursiveAstVisitor {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
visitPartOfDirective(PartOfDirective ctx) {
|
visitPartOfDirective(PartOfDirective ctx) {
|
||||||
var name = ctx.libraryName.name;
|
if (ctx.libraryName != null) {
|
||||||
|
var name = ctx.libraryName.name;
|
||||||
|
|
||||||
if (name.startsWith(oldName)) {
|
if (name.startsWith(oldName)) {
|
||||||
replace[[ctx.offset, ctx.end]] =
|
replace[[ctx.offset, ctx.end]] =
|
||||||
'part of ' + name.replaceFirst(oldName, newName) + ';';
|
'part of ' + name.replaceFirst(oldName, newName) + ';';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ author: Tobe O <thosakwe@gmail.com>
|
||||||
description: Command-line tools for the Angel framework.
|
description: Command-line tools for the Angel framework.
|
||||||
homepage: https://github.com/angel-dart/angel_cli
|
homepage: https://github.com/angel-dart/angel_cli
|
||||||
name: angel_cli
|
name: angel_cli
|
||||||
version: 2.1.4
|
version: 2.1.4+1
|
||||||
dependencies:
|
dependencies:
|
||||||
analyzer: ">=0.32.0"
|
analyzer: ">=0.32.0"
|
||||||
args: ^1.0.0
|
args: ^1.0.0
|
||||||
|
|
Loading…
Reference in a new issue