diff --git a/CHANGELOG.md b/CHANGELOG.md index 322936d..e7aa4d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 2.1.4+1 +* Patch `part of 'path'` renames. + # 2.1.4 * The `migration` argument to `model` just emits an annotation now. * Add the ORM boilerplate. diff --git a/lib/src/commands/rename.dart b/lib/src/commands/rename.dart index 553f359..e95586f 100644 --- a/lib/src/commands/rename.dart +++ b/lib/src/commands/rename.dart @@ -167,11 +167,13 @@ class RenamingVisitor extends RecursiveAstVisitor { @override visitPartOfDirective(PartOfDirective ctx) { - var name = ctx.libraryName.name; + if (ctx.libraryName != null) { + var name = ctx.libraryName.name; - if (name.startsWith(oldName)) { - replace[[ctx.offset, ctx.end]] = - 'part of ' + name.replaceFirst(oldName, newName) + ';'; + if (name.startsWith(oldName)) { + replace[[ctx.offset, ctx.end]] = + 'part of ' + name.replaceFirst(oldName, newName) + ';'; + } } } } diff --git a/pubspec.yaml b/pubspec.yaml index cd125d7..e79ae8e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ author: Tobe O description: Command-line tools for the Angel framework. homepage: https://github.com/angel-dart/angel_cli name: angel_cli -version: 2.1.4 +version: 2.1.4+1 dependencies: analyzer: ">=0.32.0" args: ^1.0.0