From 3cc549b21bd05a81e8b87cc4264055667b678532 Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Sat, 1 Oct 2022 14:05:46 +0200 Subject: [PATCH] Upgrade `lints` package to version `2.0.0` --- prometheus_client/CHANGELOG.md | 4 ++++ prometheus_client/lib/src/prometheus_client/collector.dart | 2 +- prometheus_client/lib/src/prometheus_client/histogram.dart | 6 +++--- prometheus_client/lib/src/prometheus_client/summary.dart | 4 ++-- prometheus_client/pubspec.yaml | 4 ++-- prometheus_client_shelf/CHANGELOG.md | 4 ++++ prometheus_client_shelf/pubspec.yaml | 4 ++-- 7 files changed, 18 insertions(+), 10 deletions(-) diff --git a/prometheus_client/CHANGELOG.md b/prometheus_client/CHANGELOG.md index 3ca10d1..0232992 100644 --- a/prometheus_client/CHANGELOG.md +++ b/prometheus_client/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.0+1 + +- Upgrade `lints` package to version `2.0.0`. + ## 1.0.0 - Stable release of prometheus_client 🎉, contains no changes since `0.6.0`. diff --git a/prometheus_client/lib/src/prometheus_client/collector.dart b/prometheus_client/lib/src/prometheus_client/collector.dart index 37dcb6e..66881c6 100644 --- a/prometheus_client/lib/src/prometheus_client/collector.dart +++ b/prometheus_client/lib/src/prometheus_client/collector.dart @@ -132,7 +132,7 @@ class CollectorRegistry { for (var name in collectorNames) { if (_namesToCollectors.containsKey(name)) { throw ArgumentError( - 'Collector already registered that provides name: ' + name); + 'Collector already registered that provides name: $name'); } } diff --git a/prometheus_client/lib/src/prometheus_client/histogram.dart b/prometheus_client/lib/src/prometheus_client/histogram.dart index c81902b..84f2508 100644 --- a/prometheus_client/lib/src/prometheus_client/histogram.dart +++ b/prometheus_client/lib/src/prometheus_client/histogram.dart @@ -135,7 +135,7 @@ class Histogram extends _SimpleCollector { for (var i = 0; i < buckets.length; ++i) { samples.add(Sample( - name + '_bucket', + '${name}_bucket', labelNamesWithLe, List.of(labelValues)..add(formatDouble(buckets[i])), child._bucketValues[i], @@ -143,8 +143,8 @@ class Histogram extends _SimpleCollector { } samples - .add(Sample(name + '_count', labelNames, labelValues, child.count)); - samples.add(Sample(name + '_sum', labelNames, labelValues, child.sum)); + .add(Sample('${name}_count', labelNames, labelValues, child.count)); + samples.add(Sample('${name}_sum', labelNames, labelValues, child.sum)); }); return [MetricFamilySamples(name, MetricType.histogram, help, samples)]; diff --git a/prometheus_client/lib/src/prometheus_client/summary.dart b/prometheus_client/lib/src/prometheus_client/summary.dart index 1510d87..c4fe2fc 100644 --- a/prometheus_client/lib/src/prometheus_client/summary.dart +++ b/prometheus_client/lib/src/prometheus_client/summary.dart @@ -96,8 +96,8 @@ class Summary extends _SimpleCollector { } samples - .add(Sample(name + '_count', labelNames, labelValues, child.count)); - samples.add(Sample(name + '_sum', labelNames, labelValues, child.sum)); + .add(Sample('${name}_count', labelNames, labelValues, child.count)); + samples.add(Sample('${name}_sum', labelNames, labelValues, child.sum)); }); return [MetricFamilySamples(name, MetricType.summary, help, samples)]; diff --git a/prometheus_client/pubspec.yaml b/prometheus_client/pubspec.yaml index e9b7f72..4fe7555 100644 --- a/prometheus_client/pubspec.yaml +++ b/prometheus_client/pubspec.yaml @@ -1,6 +1,6 @@ name: prometheus_client description: Dart implementation of the Prometheus client library providing metrics. -version: 1.0.0 +version: 1.0.0+1 homepage: https://github.com/tentaclelabs/prometheus_client environment: @@ -10,5 +10,5 @@ dependencies: collection: ^1.15.0 dev_dependencies: - lints: ^1.0.1 + lints: ^2.0.0 test: ^1.16.0 diff --git a/prometheus_client_shelf/CHANGELOG.md b/prometheus_client_shelf/CHANGELOG.md index 7fe9bd0..5830d79 100644 --- a/prometheus_client_shelf/CHANGELOG.md +++ b/prometheus_client_shelf/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.0+1 + +- Upgrade `lints` package to version `2.0.0`. + ## 1.0.0 - Stable release of prometheus_client_shelf 🎉, contains no changes since `0.6.0`. diff --git a/prometheus_client_shelf/pubspec.yaml b/prometheus_client_shelf/pubspec.yaml index 3efc8c3..c40a281 100644 --- a/prometheus_client_shelf/pubspec.yaml +++ b/prometheus_client_shelf/pubspec.yaml @@ -1,6 +1,6 @@ name: prometheus_client_shelf description: Dart implementation of the Prometheus client library providing a shelf integration. -version: 1.0.0 +version: 1.0.0+1 homepage: https://github.com/tentaclelabs/prometheus_client environment: @@ -12,7 +12,7 @@ dependencies: collection: ^1.15.0 dev_dependencies: - lints: ^1.0.1 + lints: ^2.0.0 test: ^1.16.0 # Dependency is required for the example shelf_router: ^1.0.0