Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit aa60806

Browse files
committed
chore(deps): Bump ansi version to 0.3.0, change_case to 1.1.0
1 parent a59530e commit aa60806

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

‎lib/src/format.dart‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'types/format.dart';
44
import 'types/lint.dart';
55

66
const _kDefaultSigns = [' ', '⚠', '✖'];
7-
final _defaultColors = [ansi.white, ansi.yellow, ansi.red];
7+
final _defaultColors = [white, yellow, red];
88

99
///
1010
/// Format commitlint [report] to formatted output message.
@@ -22,10 +22,10 @@ String format({
2222

2323
List<String> _formatInput(LintOutcome result) {
2424
final sign = '⧗';
25-
final decoration = ansi.gray(sign);
25+
final decoration = gray(sign);
2626
final commitText =
2727
result.errors.isNotEmpty ? result.input : result.input.split('\n').first;
28-
final decoratedInput = ansi.bold(commitText);
28+
final decoratedInput = bold(commitText);
2929
final hasProblem = result.errors.isNotEmpty || result.warnings.isNotEmpty;
3030
return hasProblem || Verbose.enabled
3131
? ['$decoration input: $decoratedInput']
@@ -37,7 +37,7 @@ List<String> _formatResult(LintOutcome result) {
3737
final sign = _kDefaultSigns[problem.level.index];
3838
final color = _defaultColors[problem.level.index];
3939
final decoration = color(sign);
40-
final name = ansi.gray(problem.name);
40+
final name = gray(problem.name);
4141
return '$decoration ${problem.message} $name';
4242
});
4343

@@ -47,7 +47,7 @@ List<String> _formatResult(LintOutcome result) {
4747
final summary = problems.isNotEmpty || Verbose.enabled
4848
? '$decoration found ${result.errors.length} error(s), ${result.warnings.length} warning(s)'
4949
: '';
50-
final fmtSummary = summary.isNotEmpty ? ansi.bold(summary) : summary;
50+
final fmtSummary = summary.isNotEmpty ? bold(summary) : summary;
5151
return [
5252
...problems,
5353
if (problems.isNotEmpty) '',
@@ -65,7 +65,7 @@ String _selectSign(LintOutcome result) {
6565

6666
String Function(String) _selectColor(LintOutcome result) {
6767
if (result.errors.isNotEmpty) {
68-
return ansi.red;
68+
return red;
6969
}
70-
return result.warnings.isNotEmpty ? ansi.yellow : ansi.green;
70+
return result.warnings.isNotEmpty ? yellow : green;
7171
}

‎pubspec.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ environment:
88
sdk: '>=2.15.0 <3.0.0'
99

1010
dependencies:
11-
ansi: ^0.2.2
11+
ansi: ^0.3.0
1212
args: ^2.3.1
13-
change_case: ^1.0.0+3
13+
change_case: ^1.1.0
1414
path: ^1.8.0
1515
verbose: ^0.1.0
1616
yaml: ^3.1.1

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /