From 9123a770571910a6b4a2fdc15cf439a809e82149 Mon Sep 17 00:00:00 2001 From: "thomashii@dukefirehawk.com" Date: Sun, 29 May 2022 08:13:58 +0800 Subject: [PATCH] Updated dependencies --- CHANGELOG.md | 5 +++++ bin/angel3.dart | 11 +++-------- lib/src/commands/key.dart | 2 +- lib/src/commands/pub.dart | 2 +- lib/src/commands/rename.dart | 8 ++++---- pubspec.yaml | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba43c42..66fa9f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 6.1.0 + +* Updated to `analyzer` 4.x.x +* Updated to `lints` 2.x.x + ## 6.0.1 * Added `angel3-orm-mysql` template for ORM support for MariaDB and MySQL diff --git a/bin/angel3.dart b/bin/angel3.dart index a07a507..db4f353 100644 --- a/bin/angel3.dart +++ b/bin/angel3.dart @@ -7,16 +7,11 @@ import 'package:args/command_runner.dart'; import 'package:angel3_cli/angel3_cli.dart'; import 'package:io/ansi.dart'; -final String DOCTOR = 'doctor'; +//const String doctor = 'doctor'; void main(List args) async { - var runner = CommandRunner( - 'angel3', - asciiArt + - '\n\n' + - 'Command-line tools for the Angel3 framework.' + - '\n\n' + - 'https://angel3-framework.web.app'); + var runner = CommandRunner('angel3', + '$asciiArt\n\nCommand-line tools for the Angel3 framework.\n\nhttps://angel3-framework.web.app'); runner.argParser .addFlag('verbose', help: 'Print verbose output.', negatable: false); diff --git a/lib/src/commands/key.dart b/lib/src/commands/key.dart index 2fc89d6..eade104 100644 --- a/lib/src/commands/key.dart +++ b/lib/src/commands/key.dart @@ -24,7 +24,7 @@ class KeyCommand extends Command { if (await file.exists()) { var contents = await file.readAsString(); contents = contents.replaceAll(RegExp(r'jwt_secret:[^\n]+\n?'), ''); - await file.writeAsString(contents.trim() + '\njwt_secret: "$secret"'); + await file.writeAsString('${contents.trim()}\njwt_secret: "$secret"'); } } } diff --git a/lib/src/commands/pub.dart b/lib/src/commands/pub.dart index d6d68d1..6900a32 100644 --- a/lib/src/commands/pub.dart +++ b/lib/src/commands/pub.dart @@ -7,7 +7,7 @@ String resolvePub() { var exec = File(Platform.resolvedExecutable); var pubPath = exec.parent.uri.resolve('pub').path; if (Platform.isWindows) { - pubPath = pubPath.replaceAll(_leadingSlashes, '') + '.bat'; + pubPath = '${pubPath.replaceAll(_leadingSlashes, '')}.bat'; } pubPath = Uri.decodeFull(pubPath); return pubPath; diff --git a/lib/src/commands/rename.dart b/lib/src/commands/rename.dart index bf229ee..84923c3 100644 --- a/lib/src/commands/rename.dart +++ b/lib/src/commands/rename.dart @@ -148,7 +148,7 @@ Future renameDartFiles(Directory dir, String oldName, String newName) async { var contents = lineList.fold('', (prev, cur) { var updatedCur = updateImport(cur, oldName, newName); updatedCur = updateMustacheBinding(updatedCur, oldName, newName); - return prev + '\n' + updatedCur; + return '$prev\n$updatedCur'; }); await file.writeAsString(fmt.format(contents)); @@ -198,7 +198,7 @@ class RenamingVisitor extends RecursiveAstVisitor { if (uri == 'package:$oldName/$oldName.dart') { return 'package:$newName/$newName.dart'; } else if (uri.startsWith('package:$oldName/')) { - return 'package:$newName/' + uri.replaceFirst('package:$oldName/', ''); + return 'package:$newName/${uri.replaceFirst('package:$oldName/', '')}'; } else { return uri; } @@ -229,7 +229,7 @@ class RenamingVisitor extends RecursiveAstVisitor { if (name.startsWith(oldName)) { replace[[node.offset, node.end]] = - 'library ' + name.replaceFirst(oldName, newName) + ';'; + 'library ${name.replaceFirst(oldName, newName)};'; } } @@ -240,7 +240,7 @@ class RenamingVisitor extends RecursiveAstVisitor { if (name.startsWith(oldName)) { replace[[node.offset, node.end]] = - 'part of ' + name.replaceFirst(oldName, newName) + ';'; + 'part of ${name.replaceFirst(oldName, newName)};'; } } } diff --git a/pubspec.yaml b/pubspec.yaml index c28b905..5be8e1b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,12 +1,12 @@ name: angel3_cli -version: 6.0.1 +version: 6.1.0 description: Command line tools for the Angel3 framework, including scaffolding. homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel3-cli environment: sdk: '>=2.16.0 <3.0.0' dependencies: - analyzer: ^3.0.0 + analyzer: ^4.0.0 args: ^2.1.1 code_builder: ^4.0.0 dart_style: ^2.0.1 @@ -24,6 +24,6 @@ dependencies: watcher: ^1.0.0 yaml: ^3.1.0 dev_dependencies: - lints: ^1.0.0 + lints: ^2.0.0 executables: angel3: angel3