Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
fb09b38
setup
denrase Nov 14, 2023
8cefb7e
introduce wrappers for isar and isar_collection, wrap all async methods
denrase Nov 14, 2023
cc31e4b
Merge branch 'main' into feat/isar
denrase Nov 20, 2023
2420ec9
correctly setup tests
denrase Nov 20, 2023
d780a41
test isar & isar collection
denrase Nov 21, 2023
452015f
test throwing isar collection methods
denrase Nov 21, 2023
4ba63b6
add workflow for tests
denrase Nov 21, 2023
988ca81
also bump isar version
denrase Nov 21, 2023
2385a2e
add commented oout entry to craft.yml
denrase Nov 21, 2023
7910e51
Update example app
denrase Nov 21, 2023
5ee8639
Update examples
denrase Nov 21, 2023
b390fae
Add changelog entry
denrase Nov 21, 2023
fe19113
run format
denrase Nov 21, 2023
0b81c7f
Merge branch 'main' into feat/isar
denrase Nov 27, 2023
1caeb4a
fix readme
denrase Nov 27, 2023
9bf5a6d
remove separate isar import
denrase Nov 27, 2023
30e6254
add back isar dependency (used in tests)
denrase Nov 27, 2023
7961474
add generated person.g
denrase Nov 27, 2023
770a4e3
update workflows
denrase Nov 27, 2023
a47a830
add coverage to gitignore
denrase Nov 27, 2023
61cf436
ignore warning in generated mock code
denrase Nov 27, 2023
ead1481
change min coverage to 55
denrase Nov 27, 2023
30fdfa4
Add workaround for issue where UserSchema leads to compile issue on web
denrase Nov 27, 2023
2d4e12e
Merge branch 'main' into feat/isar
denrase Dec 4, 2023
23abf7e
fix changelog
denrase Dec 4, 2023
a4b42fa
update readme files
denrase Dec 5, 2023
34920d4
Merge branch 'main' into feat/isar
denrase Dec 5, 2023
65b6531
Merge branch 'main' into feat/isar
denrase Dec 18, 2023
20e3f8c
fix changelog
denrase Dec 18, 2023
525d3f8
Merge branch 'main' into feat/isar
denrase Dec 19, 2023
cbbaae8
fix changelog
denrase Dec 19, 2023
20d53f5
remove isar generator because of test failure on macOS (missing isar …
denrase Dec 19, 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
  • Loading branch information
denrase committed Nov 14, 2023
commit fb09b382fdc8aa17ab3d75d97909a768e3f747eb
14 changes: 14 additions & 0 deletions isar/.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/
10 changes: 10 additions & 0 deletions isar/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: "2f708eb8396e362e280fac22cf171c2cb467343c"
channel: "stable"

project_type: package
1 change: 1 addition & 0 deletions isar/CHANGELOG.md
21 changes: 21 additions & 0 deletions isar/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.
52 changes: 52 additions & 0 deletions isar/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<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 `isar` package
===========

| package | build | pub | likes | popularity | pub points |
| ------- | ------- | ------- | ------- | ------- | ------- |
| sentry_isar | [![build](https://github.com/getsentry/sentry-dart/workflows/sentry-isar/badge.svg?branch=main)](https://github.com/getsentry/sentry-dart/actions?query=workflow%3Asentry-isar) | [![pub package](https://img.shields.io/pub/v/sentry_isar.svg)](https://pub.dev/packages/sentry_isar) | [![likes](https://img.shields.io/pub/likes/sentry_isar)](https://pub.dev/packages/sentry_isar/score) | [![popularity](https://img.shields.io/pub/popularity/sentry_isar)](https://pub.dev/packages/sentry_isar/score) | [![pub points](https://img.shields.io/pub/points/sentry_isar)](https://pub.dev/packages/sentry_isar/score)

Integration for the [`isar`](https://pub.dev/packages/isar) package.

#### Usage

- Sign up for a Sentry.io account and get a DSN at https://sentry.io.

- Follow the installing instructions on [pub.dev](https://pub.dev/packages/sentry/install).

- Initialize the Sentry SDK using the DSN issued by Sentry.io.

- Call...

```dart
import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:sentry_isar/sentry_isar.dart';

Future<void> main() async {
await SentryFlutter.init(
(options) {
options.dsn = 'https://[email protected]/add-your-dsn-here';
options.tracesSampleRate = 1.0;
},
// Init your App.
appRunner: () => runApp(MyApp()),
);
}

// TODO: Example

```

#### Resources

* [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dart/)
* [![Forum](https://img.shields.io/badge/forum-sentry-green.svg)](https://forum.sentry.io/c/sdks)
* [![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/Ww9hbqr)
* [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-sentry-green.svg)](https://stackoverflow.com/questions/tagged/sentry)
* [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry)
33 changes: 33 additions & 0 deletions isar/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
1 change: 1 addition & 0 deletions isar/dartdoc_options.yaml
7 changes: 7 additions & 0 deletions isar/lib/sentry_isar.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
library sentry_isar;

/// A Calculator.
class SentryIsar {
/// Returns [value] plus 1.
int addOne(int value) => value + 1;
}
27 changes: 27 additions & 0 deletions isar/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: sentry_isar
description: An integration which adds support for performance tracing for the isar package.
version: 7.12.0
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'
flutter: '>=3.3.0'

dependencies:
isar: 3.1.0
isar_flutter_libs: 3.1.0 # contains Isar Core
sentry: 7.12.0
meta: ^1.3.0
path: ^1.8.3

dev_dependencies:
isar_generator: 3.1.0
build_runner: ^2.4.2
lints: ^3.0.0
flutter_test:
sdk: flutter
coverage: ^1.3.0
mockito: ^5.1.0
yaml: ^3.1.0 # needed for version match (code and pubspec)
3 changes: 3 additions & 0 deletions isar/pubspec_overrides.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependency_overrides:
sentry:
path: ../dart
11 changes: 11 additions & 0 deletions isar/test/sentry_isar_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:sentry_isar/sentry_isar.dart';

void main() {
test('adds one to input values', () {
final calculator = SentryIsar();
expect(calculator.addOne(2), 3);
expect(calculator.addOne(-7), -6);
expect(calculator.addOne(0), 1);
});
}