Merge pull request #2 from dukefirehawk/bug-fix/deprecated
Upgaded libraries
This commit is contained in:
commit
1bc6641651
9 changed files with 17 additions and 23 deletions
|
@ -1,5 +1,10 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## 7.1.0
|
||||||
|
|
||||||
|
* Required Dart >= 2.18.x
|
||||||
|
* Updated `analyzer` to 5.x.x
|
||||||
|
|
||||||
## 7.0.0
|
## 7.0.0
|
||||||
|
|
||||||
* Required Dart >= 2.17.x
|
* Required Dart >= 2.17.x
|
||||||
|
|
|
@ -225,13 +225,15 @@ class RenamingVisitor extends RecursiveAstVisitor {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void visitLibraryDirective(LibraryDirective node) {
|
void visitLibraryDirective(LibraryDirective node) {
|
||||||
var name = node.name.name;
|
var name = node.name2?.name;
|
||||||
|
|
||||||
|
if (name != null) {
|
||||||
if (name.startsWith(oldName)) {
|
if (name.startsWith(oldName)) {
|
||||||
replace[[node.offset, node.end]] =
|
replace[[node.offset, node.end]] =
|
||||||
'library ${name.replaceFirst(oldName, newName)};';
|
'library ${name.replaceFirst(oldName, newName)};';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void visitPartOfDirective(PartOfDirective node) {
|
void visitPartOfDirective(PartOfDirective node) {
|
||||||
|
|
|
@ -2,12 +2,6 @@ import 'package:code_builder/code_builder.dart';
|
||||||
import 'generator.dart';
|
import 'generator.dart';
|
||||||
|
|
||||||
class CustomServiceGenerator extends ServiceGenerator {
|
class CustomServiceGenerator extends ServiceGenerator {
|
||||||
@override
|
|
||||||
bool get createsModel => false;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool get createsValidator => false;
|
|
||||||
|
|
||||||
const CustomServiceGenerator() : super('Custom');
|
const CustomServiceGenerator() : super('Custom');
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -8,6 +8,7 @@ class ServiceGenerator {
|
||||||
|
|
||||||
List<MakerDependency> get dependencies => [];
|
List<MakerDependency> get dependencies => [];
|
||||||
|
|
||||||
|
/*
|
||||||
@deprecated
|
@deprecated
|
||||||
bool get createsModel => true;
|
bool get createsModel => true;
|
||||||
|
|
||||||
|
@ -22,6 +23,7 @@ class ServiceGenerator {
|
||||||
|
|
||||||
@deprecated
|
@deprecated
|
||||||
bool get shouldRunBuild => false;
|
bool get shouldRunBuild => false;
|
||||||
|
*/
|
||||||
|
|
||||||
bool get goesFirst => false;
|
bool get goesFirst => false;
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,6 @@ import 'package:code_builder/code_builder.dart';
|
||||||
class MapServiceGenerator extends ServiceGenerator {
|
class MapServiceGenerator extends ServiceGenerator {
|
||||||
const MapServiceGenerator() : super('In-Memory');
|
const MapServiceGenerator() : super('In-Memory');
|
||||||
|
|
||||||
@override
|
|
||||||
bool get createsModel => false;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Expression createInstance(LibraryBuilder library, MethodBuilder methodBuilder,
|
Expression createInstance(LibraryBuilder library, MethodBuilder methodBuilder,
|
||||||
String name, String lower) {
|
String name, String lower) {
|
||||||
|
|
|
@ -10,9 +10,6 @@ class MongoServiceGenerator extends ServiceGenerator {
|
||||||
List<MakerDependency> get dependencies =>
|
List<MakerDependency> get dependencies =>
|
||||||
const [MakerDependency('angel3_mongo', '^7.0.0')];
|
const [MakerDependency('angel3_mongo', '^7.0.0')];
|
||||||
|
|
||||||
@override
|
|
||||||
bool get createsModel => false;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void applyToConfigureServer(
|
void applyToConfigureServer(
|
||||||
LibraryBuilder library,
|
LibraryBuilder library,
|
||||||
|
|
|
@ -10,9 +10,6 @@ class RethinkServiceGenerator extends ServiceGenerator {
|
||||||
List<MakerDependency> get dependencies =>
|
List<MakerDependency> get dependencies =>
|
||||||
const [MakerDependency('angel3_rethink', '^4.0.0')];
|
const [MakerDependency('angel3_rethink', '^4.0.0')];
|
||||||
|
|
||||||
@override
|
|
||||||
bool get createsModel => false;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void applyToConfigureServer(
|
void applyToConfigureServer(
|
||||||
LibraryBuilder library,
|
LibraryBuilder library,
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
name: angel3_cli
|
name: angel3_cli
|
||||||
version: 7.0.0
|
version: 7.1.0
|
||||||
description: Command line tools for the Angel3 framework, including scaffolding.
|
description: Command line tools for the Angel3 framework, including scaffolding.
|
||||||
homepage: https://angel3-framework.web.app/
|
homepage: https://angel3-framework.web.app/
|
||||||
repository: https://github.com/dukefirehawk/angel3-cli
|
repository: https://github.com/dukefirehawk/angel3-cli
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.17.0 <3.0.0'
|
sdk: '>=2.18.0 <3.0.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
analyzer: ^4.0.0
|
analyzer: ^5.2.0
|
||||||
args: ^2.1.1
|
args: ^2.1.1
|
||||||
code_builder: ^4.0.0
|
code_builder: ^4.0.0
|
||||||
dart_style: ^2.0.1
|
dart_style: ^2.0.1
|
||||||
|
|
|
@ -42,7 +42,7 @@ void main() async {
|
||||||
var contents = lineList.fold<String>('', (prev, cur) {
|
var contents = lineList.fold<String>('', (prev, cur) {
|
||||||
var updatedCur = updateImport(cur, oldName, newName);
|
var updatedCur = updateImport(cur, oldName, newName);
|
||||||
updatedCur = updateMustacheBinding(updatedCur, oldName, newName);
|
updatedCur = updateMustacheBinding(updatedCur, oldName, newName);
|
||||||
return prev + '\n' + updatedCur;
|
return '$prev\n$updatedCur';
|
||||||
});
|
});
|
||||||
await file.writeAsString(fmt.format(contents));
|
await file.writeAsString(fmt.format(contents));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue