Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7a9ea7d
setup sentry hive library
denrase Oct 10, 2023
2fa0411
Add SentryBox with first test
denrase Oct 10, 2023
071dd1e
test added spans
denrase Oct 10, 2023
bee44de
Merge branch 'main' into feat/hive
denrase Oct 16, 2023
5881d84
Add sentry hive impl
denrase Oct 16, 2023
296e25e
introduce base box to avoid duplication
denrase Oct 16, 2023
6ea6914
implement lazy box test
denrase Oct 17, 2023
e35a82d
expose sentry hive and updata documentation
denrase Oct 17, 2023
22bed30
add hive to flutter example app
denrase Oct 17, 2023
e5c2b9b
test throwing in base_box, cleanup
denrase Oct 23, 2023
7a41832
test lazy box error cases
denrase Oct 23, 2023
ee12365
test sentry hive impl failures
denrase Oct 23, 2023
f72c0a8
run fix & format
denrase Oct 23, 2023
8fa3182
fix test failure race condition
denrase Oct 23, 2023
08cfc16
add hive workflow, update other workflows
denrase Oct 23, 2023
69d6404
Merge branch 'main' into feat/hive
denrase Oct 23, 2023
f5dd006
add changelog entry
denrase Oct 23, 2023
9237bee
remove path+provider from dev_dependencies
denrase Oct 23, 2023
887adb0
add coverage dev dependency
denrase Oct 23, 2023
ea89cf6
fix deprecation warnings
denrase Oct 23, 2023
8c7e7cc
Merge branch 'main' into feat/hive
denrase Oct 30, 2023
5f7c196
fix changelog
denrase Oct 30, 2023
2ca2783
move span wrapping on own class to avoid duplication
denrase Oct 30, 2023
380c8a2
add sentry box collection
denrase Oct 30, 2023
71d3f8e
test added spans, fix imports
denrase Oct 31, 2023
d286b62
test throwing code
denrase Oct 31, 2023
1f9c37f
Merge branch 'main' into feat/hive
denrase Oct 31, 2023
9e02a29
fix changelog
denrase Oct 31, 2023
e888f6f
Merge branch 'main' into feat/hive
denrase Nov 6, 2023
22a1637
change dbSystem value
denrase Nov 6, 2023
d959c80
Merge branch 'main' into feat/hive
denrase Nov 6, 2023
158f93f
change db system
denrase Nov 6, 2023
aeed961
Merge branch 'main' into feat/hive
denrase Nov 13, 2023
f99d255
remove unneccessary async & await
denrase Nov 13, 2023
da8309f
Merge branch 'main' into feat/hive
buenaflor Nov 15, 2023
7119d74
Fix analyze
buenaflor Nov 15, 2023
34ea841
Formatting
buenaflor Nov 15, 2023
2db8de9
Add changelog symlink
buenaflor Nov 15, 2023
fccc34c
Ignore hive coverage
buenaflor Nov 15, 2023
19ebd4b
Create symlink for dartdoc_options
buenaflor Nov 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
setup sentry hive library
  • Loading branch information
denrase committed Oct 10, 2023
commit 7a9ea7d8f8132237ee19b7e11b22f7d47cb628fd
14 changes: 14 additions & 0 deletions hive/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Omit committing pubspec.lock for library packages; see
# https://dart.dev/guides/libraries/private-files#pubspeclock.
pubspec.lock

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
21 changes: 21 additions & 0 deletions hive/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Sentry

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 9 additions & 0 deletions hive/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<p align="center">
<a href="https://sentry.io" target="_blank" align="center">
<img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
</a>
<br />
</p>

Sentry integration for `hive` package
===========
33 changes: 33 additions & 0 deletions hive/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
include: package:lints/recommended.yaml

analyzer:
language:
strict-casts: true
strict-inference: true
strict-raw-types: true
errors:
# treat missing required parameters as a warning (not a hint)
missing_required_param: error
# treat missing returns as a warning (not a hint)
missing_return: error
# allow having TODOs in the code
todo: ignore
# allow self-reference to deprecated members (we do this because otherwise we have
# to annotate every member in every test, assert, etc, when we deprecate something)
deprecated_member_use_from_same_package: warning
# ignore sentry/path on pubspec as we change it on deployment
invalid_dependency: ignore
unnecessary_import: ignore
exclude:
- example/**

linter:
rules:
- prefer_final_locals
- public_member_api_docs
- prefer_single_quotes
- prefer_relative_imports
- unnecessary_brace_in_string_interps
- implementation_imports
- require_trailing_commas
- unawaited_futures
3 changes: 3 additions & 0 deletions hive/dartdoc_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dartdoc:
errors:
- unresolved-doc-reference
6 changes: 6 additions & 0 deletions hive/example/hive_example.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import 'package:hive/sentry_hive.dart';

void main() {
var awesome = Awesome();
print('awesome: ${awesome.isAwesome}');
}
4 changes: 4 additions & 0 deletions hive/lib/sentry_hive.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
library;

export 'src/sentry_hive.dart';
export 'src/sentry_box.dart';
Empty file added hive/lib/src/sentry_box.dart
Empty file.
6 changes: 6 additions & 0 deletions hive/lib/src/sentry_hive.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// TODO: Put public facing types in this file.

/// Checks if you are awesome. Spoiler: you are.
class Awesome {
bool get isAwesome => true;
}
18 changes: 18 additions & 0 deletions hive/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: sentry_hive
description: An integration which adds support for performance tracing for the hive package.
version: 7.10.1
homepage: https://docs.sentry.io/platforms/flutter/
repository: https://github.com/getsentry/sentry-dart
issue_tracker: https://github.com/getsentry/sentry-dart/issues

environment:
sdk: '>=2.17.0 <4.0.0'

dependencies:
sentry: 7.10.1
hive: ^2.2.3

dev_dependencies:
lints: ^2.0.0
test: ^1.21.0
yaml: ^3.1.0 # needed for version match (code and pubspec)
3 changes: 3 additions & 0 deletions hive/pubspec_overrides.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependency_overrides:
sentry:
path: ../dart
16 changes: 16 additions & 0 deletions hive/test/sentry_hive_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import 'package:hive/sentry_hive.dart';
import 'package:test/test.dart';

void main() {
group('A group of tests', () {
final awesome = Awesome();

setUp(() {
// Additional setup goes here.
});

test('First Test', () {
expect(awesome.isAwesome, isTrue);
});
});
}