From bc2976867b4472f1f1135d60b70bcca7d4d4eb39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Dec 2023 13:37:12 +0100 Subject: [PATCH] Bump lints from 2.1.1 to 3.0.0 in /dart (#1695) * Bump lints from 2.1.1 to 3.0.0 in /dart Bumps [lints](https://github.com/dart-lang/lints) from 2.1.1 to 3.0.0. - [Release notes](https://github.com/dart-lang/lints/releases) - [Changelog](https://github.com/dart-lang/lints/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/lints/compare/v2.1.1...v3.0.0) --- updated-dependencies: - dependency-name: lints dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * update --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GIancarlo Buenaflor --- dart/lib/sentry.dart | 2 ++ dart/lib/src/protocol/sentry_transaction.dart | 35 +++++++------------ .../io_sentry_attachment.dart | 6 ++-- dart/lib/src/sentry_transaction_context.dart | 15 +++----- dart/lib/src/utils/sample_rate_format.dart | 1 + dart/pubspec.yaml | 2 +- 6 files changed, 23 insertions(+), 38 deletions(-) diff --git a/dart/lib/sentry.dart b/dart/lib/sentry.dart index 9d06bb7e2a..987e1f014a 100644 --- a/dart/lib/sentry.dart +++ b/dart/lib/sentry.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. /// A pure Dart client for Sentry.io crash reporting. +library sentry_dart; + export 'src/run_zoned_guarded_integration.dart'; export 'src/hub.dart'; // useful for tests diff --git a/dart/lib/src/protocol/sentry_transaction.dart b/dart/lib/src/protocol/sentry_transaction.dart index 986169ce46..e00fa23355 100644 --- a/dart/lib/src/protocol/sentry_transaction.dart +++ b/dart/lib/src/protocol/sentry_transaction.dart @@ -17,45 +17,34 @@ class SentryTransaction extends SentryEvent { SentryTransaction( this.tracer, { - SentryId? eventId, + super.eventId, DateTime? timestamp, - String? platform, - String? serverName, - String? release, - String? dist, - String? environment, + super.platform, + super.serverName, + super.release, + super.dist, + super.environment, String? transaction, dynamic throwable, Map? tags, @Deprecated( 'Additional Data is deprecated in favor of structured [Contexts] and should be avoided when possible') Map? extra, - SentryUser? user, - Contexts? contexts, - List? breadcrumbs, - SdkVersion? sdk, - SentryRequest? request, + super.user, + super.contexts, + super.breadcrumbs, + super.sdk, + super.request, String? type, Map? measurements, SentryTransactionInfo? transactionInfo, }) : super( - eventId: eventId, timestamp: timestamp ?? tracer.endTimestamp, - platform: platform, - serverName: serverName, - release: release, - dist: dist, - environment: environment, transaction: transaction ?? tracer.name, throwable: throwable ?? tracer.throwable, tags: tags ?? tracer.tags, // ignore: deprecated_member_use_from_same_package extra: extra ?? tracer.data, - user: user, - contexts: contexts, - breadcrumbs: breadcrumbs, - sdk: sdk, - request: request, type: _type, ) { startTimestamp = tracer.startTimestamp; @@ -64,7 +53,7 @@ class SentryTransaction extends SentryEvent { spans = tracer.children; this.measurements = measurements ?? {}; - this.contexts.trace = spanContext.toTraceContext( + contexts.trace = spanContext.toTraceContext( sampled: tracer.samplingDecision?.sampled, status: tracer.status, ); diff --git a/dart/lib/src/sentry_attachment/io_sentry_attachment.dart b/dart/lib/src/sentry_attachment/io_sentry_attachment.dart index a1e2585556..ae07b51508 100644 --- a/dart/lib/src/sentry_attachment/io_sentry_attachment.dart +++ b/dart/lib/src/sentry_attachment/io_sentry_attachment.dart @@ -24,12 +24,10 @@ class IoSentryAttachment extends SentryAttachment { IoSentryAttachment.fromFile( File file, { String? filename, - String? attachmentType, - String? contentType, + super.attachmentType, + super.contentType, }) : super.fromLoader( loader: () => file.readAsBytes(), filename: filename ?? file.uri.pathSegments.last, - attachmentType: attachmentType, - contentType: contentType, ); } diff --git a/dart/lib/src/sentry_transaction_context.dart b/dart/lib/src/sentry_transaction_context.dart index 66024459f5..32ab0324b7 100644 --- a/dart/lib/src/sentry_transaction_context.dart +++ b/dart/lib/src/sentry_transaction_context.dart @@ -15,21 +15,16 @@ class SentryTransactionContext extends SentrySpanContext { SentryTransactionContext( this.name, String operation, { - String? description, + super.description, this.parentSamplingDecision, - SentryId? traceId, - SpanId? spanId, - SpanId? parentSpanId, + super.traceId, + super.spanId, + super.parentSpanId, this.transactionNameSource, this.samplingDecision, - String? origin, + super.origin, }) : super( operation: operation, - description: description, - traceId: traceId, - spanId: spanId, - parentSpanId: parentSpanId, - origin: origin, ); factory SentryTransactionContext.fromSentryTrace( diff --git a/dart/lib/src/utils/sample_rate_format.dart b/dart/lib/src/utils/sample_rate_format.dart index 4abb79edd8..e69163f30b 100644 --- a/dart/lib/src/utils/sample_rate_format.dart +++ b/dart/lib/src/utils/sample_rate_format.dart @@ -1,3 +1,4 @@ +// ignore: dangling_library_doc_comments /// Code ported & adapted from `intl` package /// https://pub.dev/packages/intl /// diff --git a/dart/pubspec.yaml b/dart/pubspec.yaml index e3207ffda2..2580a618d3 100644 --- a/dart/pubspec.yaml +++ b/dart/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: dev_dependencies: build_runner: ^2.4.2 mockito: ^5.1.0 - lints: ^2.0.0 + lints: ^3.0.0 test: ^1.21.1 yaml: ^3.1.0 # needed for version match (code and pubspec) collection: ^1.16.0