Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/dart-lang/setup-da…
Browse files Browse the repository at this point in the history
…rt-1.6.1
  • Loading branch information
buenaflor authored Jan 23, 2024
2 parents 345df45 + f770c4c commit 12fd5dd
Show file tree
Hide file tree
Showing 27 changed files with 205 additions and 43 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# TODO: exclude windows for now, because of failing tests in the new image runner
os: [ubuntu-latest, macos-latest]
sdk: [stable, beta]
exclude:
- os: windows-latest
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/flutter_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
uses: gradle/gradle-build-action@v2

- name: AVD cache
uses: actions/cache@v3
uses: actions/cache@v4
id: avd-cache
with:
path: |
Expand Down Expand Up @@ -120,7 +120,8 @@ jobs:
fail-fast: false
matrix:
sdk: ["stable", "beta"]
target: ["ios", "macos"]
# TODO: remove ios for now, will be fixed in v8
target: ["macos"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- run: ./metrics/prepare.sh

- uses: actions/cache@v3
- uses: actions/cache@v4
id: app-plain-cache
with:
path: ${{ matrix.appPlain }}
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@

### Features

- Accept `Map<String, dynamic>` in `Hint` class ([#1807](https://github.com/getsentry/sentry-dart/pull/1807))
- Please check if everything works as expected when using `Hint`
- Factory constructor `Hint.withMap(Map<String, dynamic> map)` now takes `Map<String, dynamic>` instead of `Map<String, Object>`
- Method `hint.addAll(Map<String, dynamic> keysAndValues)` now takes `Map<String, dynamic>` instead of `Map<String, Object>`
- Method `set(String key, dynamic value)` now takes value of `dynamic` instead of `Object`
- Method `hint.get(String key)` now returns `dynamic` instead of `Object?`

## 7.15.0

### Features

- Add [Spotlight](https://spotlightjs.com/about/) support ([#1786](https://github.com/getsentry/sentry-dart/pull/1786))
- Set `options.spotlight = Spotlight(enabled: true)` to enable Spotlight
- Add `ConnectivityIntegration` for web ([#1765](https://github.com/getsentry/sentry-dart/pull/1765))
Expand All @@ -12,7 +23,8 @@
- Add isar breadcrumbs ([#1800](https://github.com/getsentry/sentry-dart/pull/1800))
- Starting with Flutter 3.16, Sentry adds the [`appFlavor`](https://api.flutter.dev/flutter/services/appFlavor-constant.html) to the `flutter_context` ([#1799](https://github.com/getsentry/sentry-dart/pull/1799))
- Add beforeScreenshotCallback to SentryFlutterOptions ([#1805](https://github.com/getsentry/sentry-dart/pull/1805))

- Add support for `readTransaction` in `sqflite` ([#1819](https://github.com/getsentry/sentry-dart/pull/1819))

### Dependencies

- Bump Android SDK from v7.0.0 to v7.1.0 ([#1788](https://github.com/getsentry/sentry-dart/pull/1788))
Expand Down
18 changes: 10 additions & 8 deletions dart/lib/src/hint.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import 'sentry_attachment/sentry_attachment.dart';
/// };
/// ```
class Hint {
final Map<String, Object> _internalStorage = {};
final Map<String, dynamic> _internalStorage = {};

final List<SentryAttachment> attachments = [];

Expand All @@ -62,7 +62,7 @@ class Hint {
return hint;
}

factory Hint.withMap(Map<String, Object> map) {
factory Hint.withMap(Map<String, dynamic> map) {
final hint = Hint();
hint.addAll(map);
return hint;
Expand All @@ -80,17 +80,19 @@ class Hint {
return hint;
}

// Objects
// Key/Value Storage

void addAll(Map<String, Object> keysAndValues) {
_internalStorage.addAll(keysAndValues);
void addAll(Map<String, dynamic> keysAndValues) {
final withoutNullValues =
keysAndValues.map((key, value) => MapEntry(key, value ?? "null"));
_internalStorage.addAll(withoutNullValues);
}

void set(String key, Object value) {
_internalStorage[key] = value;
void set(String key, dynamic value) {
_internalStorage[key] = value ?? "null";
}

Object? get(String key) {
dynamic get(String key) {
return _internalStorage[key];
}

Expand Down
2 changes: 1 addition & 1 deletion dart/lib/src/version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
library version;

/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '7.14.0';
const String sdkVersion = '7.15.0';

String sdkName(bool isWeb) => isWeb ? _browserSdkName : _ioSdkName;

Expand Down
2 changes: 1 addition & 1 deletion dart/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sentry
version: 7.14.0
version: 7.15.0
description: >
A crash reporting library for Dart that sends crash reports to Sentry.io.
This library supports Dart VM and Web. For Flutter consider sentry_flutter instead.
Expand Down
17 changes: 17 additions & 0 deletions dart/test/hint_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,23 @@ void main() {
expect(sut.screenshot, attachment);
expect(sut.viewHierarchy, attachment);
});

test('Hint init with map null fallback', () {
final hint = Hint.withMap({'fixture-key': null});
expect("null", hint.get("fixture-key"));
});

test('Hint addAll with map null fallback', () {
final hint = Hint();
hint.addAll({'fixture-key': null});
expect("null", hint.get("fixture-key"));
});

test('Hint set with null value fallback', () {
final hint = Hint();
hint.set("fixture-key", null);
expect("null", hint.get("fixture-key"));
});
}

class Fixture {
Expand Down
2 changes: 1 addition & 1 deletion dio/lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '7.14.0';
const String sdkVersion = '7.15.0';

/// The package name reported to Sentry.io in the submitted events.
const String packageName = 'pub:sentry_dio';
4 changes: 2 additions & 2 deletions dio/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sentry_dio
description: An integration which adds support for performance tracing for the Dio package.
version: 7.14.0
version: 7.15.0
homepage: https://docs.sentry.io/platforms/dart/
repository: https://github.com/getsentry/sentry-dart
issue_tracker: https://github.com/getsentry/sentry-dart/issues
Expand All @@ -11,7 +11,7 @@ environment:

dependencies:
dio: ^5.0.0
sentry: 7.14.0
sentry: 7.15.0

dev_dependencies:
meta: ^1.3.0
Expand Down
2 changes: 1 addition & 1 deletion drift/lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '7.14.0';
const String sdkVersion = '7.15.0';

/// The package name reported to Sentry.io in the submitted events.
const String packageName = 'pub:sentry_drift';
4 changes: 2 additions & 2 deletions drift/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sentry_drift
description: An integration which adds support for performance tracing for the drift package.
version: 7.14.0
version: 7.15.0
homepage: https://docs.sentry.io/platforms/flutter/
repository: https://github.com/getsentry/sentry-dart
issue_tracker: https://github.com/getsentry/sentry-dart/issues
Expand All @@ -10,7 +10,7 @@ environment:
flutter: '>=3.3.0'

dependencies:
sentry: 7.14.0
sentry: 7.15.0
meta: ^1.3.0
drift: ^2.13.0

Expand Down
2 changes: 1 addition & 1 deletion file/lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '7.14.0';
const String sdkVersion = '7.15.0';

/// The package name reported to Sentry.io in the submitted events.
const String packageName = 'pub:sentry_file';
4 changes: 2 additions & 2 deletions file/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sentry_file
description: An integration which adds support for performance tracing for dart.io.File.
version: 7.14.0
version: 7.15.0
homepage: https://docs.sentry.io/platforms/dart/
repository: https://github.com/getsentry/sentry-dart
issue_tracker: https://github.com/getsentry/sentry-dart/issues
Expand All @@ -10,7 +10,7 @@ environment:
sdk: '>=2.19.0 <4.0.0'

dependencies:
sentry: 7.14.0
sentry: 7.15.0
meta: ^1.3.0

dev_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sentry_flutter_example
description: Demonstrates how to use the sentry_flutter plugin.
version: 7.14.0
version: 7.15.0

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

Expand Down
2 changes: 1 addition & 1 deletion flutter/lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '7.14.0';
const String sdkVersion = '7.15.0';

/// The default SDK name reported to Sentry.io in the submitted events.
const String sdkName = 'sentry.dart.flutter';
4 changes: 2 additions & 2 deletions flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sentry_flutter
version: 7.14.0
version: 7.15.0
description: Sentry SDK for Flutter. This package aims to support different Flutter targets by relying on the many platforms supported by Sentry with native SDKs.
homepage: https://docs.sentry.io/platforms/flutter/
repository: https://github.com/getsentry/sentry-dart
Expand All @@ -15,7 +15,7 @@ dependencies:
sdk: flutter
flutter_web_plugins:
sdk: flutter
sentry: 7.14.0
sentry: 7.15.0
package_info_plus: '>=1.0.0 <=5.0.1'
meta: ^1.3.0
ffi: ^2.0.0
Expand Down
2 changes: 1 addition & 1 deletion hive/lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '7.14.0';
const String sdkVersion = '7.15.0';

/// The package name reported to Sentry.io in the submitted events.
const String packageName = 'pub:sentry_hive';
4 changes: 2 additions & 2 deletions hive/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sentry_hive
description: An integration which adds support for performance tracing for the hive package.
version: 7.14.0
version: 7.15.0
homepage: https://docs.sentry.io/platforms/flutter/
repository: https://github.com/getsentry/sentry-dart
issue_tracker: https://github.com/getsentry/sentry-dart/issues
Expand All @@ -9,7 +9,7 @@ environment:
sdk: '>=2.17.0 <4.0.0'

dependencies:
sentry: 7.14.0
sentry: 7.15.0
hive: ^2.2.3
meta: ^1.3.0

Expand Down
2 changes: 1 addition & 1 deletion isar/lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '7.13.1';
const String sdkVersion = '7.15.0';

/// The package name reported to Sentry.io in the submitted events.
const String packageName = 'pub:sentry_isar';
4 changes: 2 additions & 2 deletions isar/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sentry_isar
description: An integration which adds support for performance tracing for the isar package.
version: 7.13.1
version: 7.15.0
homepage: https://docs.sentry.io/platforms/flutter/
repository: https://github.com/getsentry/sentry-dart
issue_tracker: https://github.com/getsentry/sentry-dart/issues
Expand All @@ -12,7 +12,7 @@ environment:
dependencies:
isar: ^3.1.0
isar_flutter_libs: ^3.1.0 # contains Isar Core
sentry: 7.14.0
sentry: 7.15.0
meta: ^1.3.0
path: ^1.8.3

Expand Down
2 changes: 1 addition & 1 deletion logging/lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '7.14.0';
const String sdkVersion = '7.15.0';

/// The package name reported to Sentry.io in the submitted events.
const String packageName = 'pub:sentry_logging';
4 changes: 2 additions & 2 deletions logging/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sentry_logging
description: An integration which adds support for recording log from the logging package.
version: 7.14.0
version: 7.15.0
homepage: https://docs.sentry.io/platforms/dart/
repository: https://github.com/getsentry/sentry-dart
issue_tracker: https://github.com/getsentry/sentry-dart/issues
Expand All @@ -11,7 +11,7 @@ environment:

dependencies:
logging: ^1.0.0
sentry: 7.14.0
sentry: 7.15.0

dev_dependencies:
lints: ^3.0.0
Expand Down
Loading

0 comments on commit 12fd5dd

Please sign in to comment.