Merge pull request #89 from dukefirehawk/bug-fix/deprecated

Fixed angel3_orm_generator
This commit is contained in:
Thomas Hii 2022-12-17 18:25:16 +08:00 committed by GitHub
commit c83ba22439
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 27 additions and 23 deletions

View file

@ -1,5 +1,10 @@
# Change Log
## 7.1.0
* Require Dart >= 2.18
* Upgraded `relectable` to 4.x.x
## 7.0.0
* Require Dart >= 2.17

View file

@ -1,13 +1,13 @@
name: angel3_container_generator
version: 7.0.0
version: 7.1.0
description: Codegen support for using pkg:reflectable with pkg:angel3_container.
homepage: https://angel3-framework.web.app/
repository: https://github.com/dukefirehawk/angel/tree/master/packages/container/angel_container_generator
environment:
sdk: '>=2.17.0 <3.0.0'
sdk: '>=2.18.0 <3.0.0'
dependencies:
angel3_container: ^7.0.0
reflectable: ^3.0.4
reflectable: ^4.0.2
dev_dependencies:
build_runner: ^2.1.2
build_test: ^2.1.3

View file

@ -2,7 +2,6 @@ import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_html/angel3_html.dart';
import 'package:angel3_test/angel3_test.dart';
import 'package:belatuk_html_builder/elements.dart';
import 'package:belatuk_html_builder/belatuk_html_builder.dart';
import 'package:test/test.dart';
void main() {

View file

@ -108,7 +108,7 @@ Future<Document?> _loadViewTemplate(Directory viewsDirectory, String name,
sourceUrl: file.uri, asDSX: asDSX, onError: errors.add);
if (doc == null) {
throw ArgumentError(file.basename + " does not exists");
throw ArgumentError("${file.basename} does not exists");
}
try {
@ -118,7 +118,7 @@ Future<Document?> _loadViewTemplate(Directory viewsDirectory, String name,
// Ignore these errors, so that we can show syntax errors.
}
if (processed == null) {
throw ArgumentError(file.basename + " does not exists");
throw ArgumentError("${file.basename} does not exists");
}
return processed;
}

View file

@ -10,8 +10,7 @@ class JaelError extends Error {
@override
String toString() {
var label = severity == JaelErrorSeverity.warning ? 'warning' : 'error';
return '$label: ${span.start.toolString}: $message\n' +
span.highlight(color: true);
return '$label: ${span.start.toolString}: $message\n${span.highlight(color: true)}';
}
}

View file

@ -64,11 +64,7 @@ class Renderer {
'<b>$type:</b> ${error.span.start.toolString}: ${error.message}')
..writeln('<br>')
..writeln(
'<span style="color: red;">' +
htmlEscape
.convert(error.span.highlight(color: false))
.replaceAll('\n', '<br>') +
'</span>',
'<span style="color: red;">${htmlEscape.convert(error.span.highlight(color: false)).replaceAll('\n', '<br>')}</span>',
)
..outdent()
..writeln('</li>');

View file

@ -8,7 +8,9 @@ part of 'stateful.dart';
abstract class _StatefulAppJaelTemplate implements Component<_AppState> {
//Timer? get _timer;
@override
void beforeDestroy();
@override
DomNode render() {
return h('div', {}, [text('Tick count: '), text(state.ticks.toString())]);

View file

@ -25,11 +25,10 @@ abstract class _LabeledInputJaelTemplate implements Component<dynamic> {
h('b', {}, [text(name.toString()), text(':')])
]),
h('br', {}, []),
h('input', {
'name': name,
'placeholder': "Enter " + name! + "...",
'type': "text"
}, [])
h(
'input',
{'name': name, 'placeholder': "Enter ${name!}...", 'type': "text"},
[])
]);
}
}

View file

@ -1,5 +1,9 @@
# Change Log
## 7.1.1
* Temporily fixed `analyzer` to 5.2.0 to resolve undocumented breaking changes in 5.3.1.
## 7.1.0
* [Breaking] Require Dart >= 2.18

View file

@ -1,5 +1,5 @@
name: angel3_orm_generator
version: 7.1.0
version: 7.1.1
description: Code generators for Angel3 ORM. Generates query builder classes.
homepage: https://angel3-framework.web.app/
repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_generator
@ -10,7 +10,7 @@ dependencies:
angel3_serialize: ^7.0.0
angel3_orm: ^7.0.0
angel3_serialize_generator: ^7.1.0
analyzer: ^5.0.0
analyzer: 5.2.0
inflection3: ^0.5.3+1
build: ^2.0.1
build_config: ^1.0.0

View file

@ -19,7 +19,7 @@ dev_dependencies:
angel3_framework: ^7.0.0
build_runner: ^2.0.1
lints: ^2.0.0
# dependency_overrides:
dependency_overrides:
# angel3_container:
# path: ../../container/angel_container
# angel3_framework:
@ -40,5 +40,5 @@ dev_dependencies:
# path: ../angel_orm
# angel3_migration:
# path: ../angel_migration
# angel3_orm_generator:
# path: ../angel_orm_generator
angel3_orm_generator:
path: ../angel_orm_generator