Skip to content

Commit fb97ea4

Browse files
Merge pull request #545 from Instabug/refactor/monorepo-14.1.0-changes
refactor: 14.1.0 changes
2 parents 49ea245 + b9984ba commit fb97ea4

File tree

32 files changed

+290
-277
lines changed

32 files changed

+290
-277
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
PODS:
2+
- Flutter (1.0.0)
3+
- Instabug (14.0.0)
4+
- instabug_flutter (14.0.0):
5+
- Flutter
6+
- Instabug (= 14.0.0)
7+
8+
DEPENDENCIES:
9+
- Flutter (from `Flutter`)
10+
- instabug_flutter (from `.symlinks/plugins/instabug_flutter/ios`)
11+
12+
SPEC REPOS:
13+
trunk:
14+
- Instabug
15+
16+
EXTERNAL SOURCES:
17+
Flutter:
18+
:path: Flutter
19+
instabug_flutter:
20+
:path: ".symlinks/plugins/instabug_flutter/ios"
21+
22+
SPEC CHECKSUMS:
23+
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
24+
Instabug: a0beffc01658773e2fac549845782f8937707dc4
25+
instabug_flutter: ff8ab5ff34a476b1d2d887478ec190cda962b973
26+
27+
PODFILE CHECKSUM: eb179eda02c4d9ce45db6b1912a419962f739320
28+
29+
COCOAPODS: 1.14.3

packages/instabug_dio_interceptor/lib/instabug_dio_interceptor.dart

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,36 @@ class InstabugDioInterceptor extends Interceptor {
77

88
@override
99
Future<void> onRequest(
10-
RequestOptions options, RequestInterceptorHandler handler,) async {
10+
RequestOptions options,
11+
RequestInterceptorHandler handler,
12+
) async {
1113
final headers = options.headers;
1214
final startTime = DateTime.now();
1315
// ignore: invalid_use_of_internal_member
1416
final w3Header = await _networklogger.getW3CHeader(
15-
headers, startTime.millisecondsSinceEpoch,);
17+
headers,
18+
startTime.millisecondsSinceEpoch,
19+
);
1620
if (w3Header?.isW3cHeaderFound == false &&
1721
w3Header?.w3CGeneratedHeader != null) {
1822
headers['traceparent'] = w3Header?.w3CGeneratedHeader;
1923
}
2024
options.headers = headers;
2125
final data = NetworkData(
22-
startTime: startTime,
23-
url: options.uri.toString(),
24-
w3cHeader: w3Header,
25-
method: options.method,);
26+
startTime: startTime,
27+
url: options.uri.toString(),
28+
w3cHeader: w3Header,
29+
method: options.method,
30+
);
2631
_requests[options.hashCode] = data;
2732
handler.next(options);
2833
}
2934

3035
@override
3136
void onResponse(
32-
Response<dynamic> response, ResponseInterceptorHandler handler,) {
37+
Response<dynamic> response,
38+
ResponseInterceptorHandler handler,
39+
) {
3340
final data = _map(response);
3441
_networklogger.networkLog(data);
3542
handler.next(response);
@@ -77,7 +84,8 @@ class InstabugDioInterceptor extends Interceptor {
7784
var responseBodySize = 0;
7885
if (responseHeaders.containsKey('content-length')) {
7986
// ignore: avoid_dynamic_calls
80-
responseBodySize = int.parse((responseHeaders['content-length'][0]) ?? '0');
87+
responseBodySize =
88+
int.parse((responseHeaders['content-length'][0]) ?? '0');
8189
} else if (response.data != null) {
8290
responseBodySize = response.data.toString().length;
8391
}

packages/instabug_dio_interceptor/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ description:
44
with Dio Package and sends them to the report that will be sent to the dashboard.
55
version: 2.3.0
66
homepage: https://github.com/Instabug/Instabug-Flutter#readme
7+
repository: https://github.com/Instabug/Instabug-Flutter/tree/refactor/monorepo/packages/instabug_dio_interceptor
78

89
environment:
910
sdk: '>=2.12.0 <3.0.0'
@@ -12,7 +13,7 @@ dependencies:
1213
dio: '>=4.0.0 <6.0.0'
1314
flutter:
1415
sdk: flutter
15-
instabug_flutter: '>=11.0.0 <14.0.0'
16+
instabug_flutter: '>=14.0.0 <15.0.0'
1617

1718
dev_dependencies:
1819
build_runner: ^2.0.3

packages/instabug_dio_interceptor/test/instabug_dio_interceptor_test.dart

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,18 @@ class MyInterceptor extends InstabugDioInterceptor {
1717

1818
@override
1919
Future<void> onRequest(
20-
RequestOptions options, RequestInterceptorHandler handler,) async {
20+
RequestOptions options,
21+
RequestInterceptorHandler handler,
22+
) async {
2123
requestCount++;
2224
super.onRequest(options, handler);
2325
}
2426

2527
@override
2628
void onResponse(
27-
Response<dynamic> response, ResponseInterceptorHandler handler,) {
29+
Response<dynamic> response,
30+
ResponseInterceptorHandler handler,
31+
) {
2832
resposneCount++;
2933
super.onResponse(response, handler);
3034
}
@@ -53,11 +57,13 @@ void main() {
5357
setUpAll(() {
5458
Instabug.$setHostApi(mHost);
5559
NetworkLogger.$setHostApi(mHost);
56-
when(mHost.isW3CFeatureFlagsEnabled()).thenAnswer((_)=>Future<Map<String,bool>>.value(<String, bool>{
57-
'isW3cCaughtHeaderEnabled': true,
58-
'isW3cExternalGeneratedHeaderEnabled': true,
59-
'isW3cExternalTraceIDEnabled': true,
60-
}),);
60+
when(mHost.isW3CFeatureFlagsEnabled()).thenAnswer(
61+
(_) => Future<Map<String, bool>>.value(<String, bool>{
62+
'isW3cCaughtHeaderEnabled': true,
63+
'isW3cExternalGeneratedHeaderEnabled': true,
64+
'isW3cExternalTraceIDEnabled': true,
65+
}),
66+
);
6167
});
6268

6369
setUp(() {

packages/instabug_dio_interceptor/test/mock_adapter.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ class MockAdapter implements HttpClientAdapter {
1111
final IOHttpClientAdapter _adapter = IOHttpClientAdapter();
1212

1313
@override
14-
Future<ResponseBody> fetch(RequestOptions options,
15-
Stream<Uint8List>? requestStream, Future<dynamic>? cancelFuture,) async {
14+
Future<ResponseBody> fetch(
15+
RequestOptions options,
16+
Stream<Uint8List>? requestStream,
17+
Future<dynamic>? cancelFuture,
18+
) async {
1619
final uri = options.uri;
1720

1821
if (uri.host == mockHost) {

packages/instabug_flutter/CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
# Changelog
2+
## [Unreleased](https://github.com/Instabug/Instabug-Flutter/compare/v14.1.0...dev)
23

3-
## [14.0.0](https://github.com/Instabug/Instabug-Flutter/compare/v13.4.0...v14.0.0) (November 11, 2024)
4+
### Fixed
5+
6+
- Fixed an issue with `SetReproStepsConfig` on Android platform ([#543](https://github.com/Instabug/Instabug-Flutter/pull/543)).
7+
8+
## [14.1.0](https://github.com/Instabug/Instabug-Flutter/compare/v14.0.0...v14.1.0) (December 22, 2024)
9+
10+
### Changed
11+
12+
- Bump Instabug Android SDK to v14.1.0 ([#539](https://github.com/Instabug/Instabug-Flutter/pull/539)). [See release notes](https://github.com/Instabug/Instabug-Android/releases/tag/v14.1.0).
13+
- Bump Instabug iOS SDK to v14.1.0 ([#539](https://github.com/Instabug/Instabug-Flutter/pull/539)). [See release notes](https://github.com/Instabug/Instabug-iOS/releases/tag/14.1.0),
14+
15+
## [14.0.0](https://github.com/Instabug/Instabug-Flutter/compare/v13.4.0...v14.0.0) (November 18, 2024)
416

517
### Added
618

packages/instabug_flutter/android/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group 'com.instabug.flutter'
2-
version '14.0.0'
2+
version '14.1.0'
33

44
buildscript {
55
repositories {
@@ -44,8 +44,7 @@ android {
4444
}
4545

4646
dependencies {
47-
api 'com.instabug.library:instabug:13.4.1.6295791-SNAPSHOT'
48-
47+
api 'com.instabug.library:instabug:14.1.0'
4948
testImplementation 'junit:junit:4.13.2'
5049
testImplementation "org.mockito:mockito-inline:3.12.1"
5150
testImplementation "io.mockk:mockk:1.13.13"

packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/InstabugApi.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import com.instabug.flutter.util.ArgsRegistry;
1414
import com.instabug.flutter.util.Reflection;
1515
import com.instabug.flutter.util.ThreadManager;
16+
import com.instabug.library.ReproMode;
1617
import com.instabug.library.internal.crossplatform.CoreFeature;
1718
import com.instabug.library.internal.crossplatform.CoreFeaturesState;
1819
import com.instabug.library.internal.crossplatform.FeaturesStateListener;
@@ -337,7 +338,7 @@ public void setReproStepsConfig(@Nullable String bugMode, @Nullable String crash
337338

338339
if (crashMode != null) {
339340
final Integer resolvedCrashMode = ArgsRegistry.reproModes.get(crashMode);
340-
builder.setIssueMode(IssueType.Crash, resolvedCrashMode);
341+
builder.setIssueMode(IssueType.AllCrashes, resolvedCrashMode);
341342
}
342343

343344
if (sessionReplayMode != null) {

packages/instabug_flutter/android/src/test/java/com/instabug/flutter/InstabugApiTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ public void testSetReproStepsConfig() {
463463
ReproConfigurations.Builder builder = mReproConfigurationsBuilder.constructed().get(0);
464464

465465
verify(builder).setIssueMode(IssueType.Bug, ReproMode.EnableWithScreenshots);
466-
verify(builder).setIssueMode(IssueType.Crash, ReproMode.Disable);
466+
verify(builder).setIssueMode(IssueType.AllCrashes, ReproMode.Disable);
467467
verify(builder).setIssueMode(IssueType.SessionReplay, ReproMode.Disable);
468468
verify(builder).build();
469469

packages/instabug_flutter/example/ios/InstabugTests/InstabugApiTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ - (void)testSetReproStepsConfig {
325325
[self.api setReproStepsConfigBugMode:bugMode crashMode:crashMode sessionReplayMode:sessionReplayMode error:&error];
326326

327327
OCMVerify([self.mInstabug setReproStepsFor:IBGIssueTypeBug withMode:IBGUserStepsModeEnable]);
328-
OCMVerify([self.mInstabug setReproStepsFor:IBGIssueTypeCrash withMode:IBGUserStepsModeDisable]);
328+
OCMVerify([self.mInstabug setReproStepsFor:IBGIssueTypeAllCrashes withMode:IBGUserStepsModeDisable]);
329329
OCMVerify([self.mInstabug setReproStepsFor:IBGIssueTypeSessionReplay withMode:IBGUserStepsModeDisable]);
330330
}
331331

packages/instabug_flutter/example/ios/Podfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ flutter_ios_podfile_setup
2929
target 'Runner' do
3030
use_frameworks!
3131
use_modular_headers!
32-
pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/feature-flutter-private-views-base/14.0.0/Instabug.podspec'
3332
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
3433
end
3534

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
PODS:
22
- Flutter (1.0.0)
3-
- Instabug (14.0.0)
3+
- Instabug (14.1.0)
44
- instabug_flutter (14.0.0):
55
- Flutter
6-
- Instabug (= 14.0.0)
6+
- Instabug (= 14.1.0)
77
- instabug_private_views (0.0.1):
88
- Flutter
99
- instabug_flutter
@@ -14,21 +14,19 @@ PODS:
1414

1515
DEPENDENCIES:
1616
- Flutter (from `Flutter`)
17-
- Instabug (from `https://ios-releases.instabug.com/custom/feature-flutter-private-views-base/14.0.0/Instabug.podspec`)
1817
- instabug_flutter (from `.symlinks/plugins/instabug_flutter/ios`)
1918
- instabug_private_views (from `.symlinks/plugins/instabug_private_views/ios`)
2019
- OCMock (= 3.6)
2120
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
2221

2322
SPEC REPOS:
2423
trunk:
24+
- Instabug
2525
- OCMock
2626

2727
EXTERNAL SOURCES:
2828
Flutter:
2929
:path: Flutter
30-
Instabug:
31-
:podspec: https://ios-releases.instabug.com/custom/feature-flutter-private-views-base/14.0.0/Instabug.podspec
3230
instabug_flutter:
3331
:path: ".symlinks/plugins/instabug_flutter/ios"
3432
instabug_private_views:
@@ -38,12 +36,12 @@ EXTERNAL SOURCES:
3836

3937
SPEC CHECKSUMS:
4038
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
41-
Instabug: 9d2b06afbadfbd4630bc0116dc27d84360ed70b0
42-
instabug_flutter: ff8ab5ff34a476b1d2d887478ec190cda962b973
39+
Instabug: 8cbca8974168c815658133e2813f5ac3a36f8e20
40+
instabug_flutter: a24751dfaedd29475da2af062d3e19d697438f72
4341
instabug_private_views: df53ff3f1cc842cb686d43e077099d3b36426a7f
4442
OCMock: 5ea90566be239f179ba766fd9fbae5885040b992
4543
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
4644

47-
PODFILE CHECKSUM: 32bd1b5b0a93d31b74cc581a86b5fa93c1cc923f
45+
PODFILE CHECKSUM: bb7a3c60be3b970b608fa878e26d5fadfbeb1157
4846

4947
COCOAPODS: 1.14.3

packages/instabug_flutter/example/lib/main.dart

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ import 'package:instabug_flutter_example/src/screens/private_view_page.dart';
99
import 'package:instabug_http_client/instabug_http_client.dart';
1010
import 'package:instabug_flutter_example/src/app_routes.dart';
1111
import 'package:instabug_flutter_example/src/widget/nested_view.dart';
12-
import 'package:instabug_private_views/instabug_private_view.dart';
1312

14-
import 'src/native/instabug_flutter_example_method_channel.dart';
15-
import 'src/widget/instabug_button.dart';
16-
import 'src/widget/instabug_clipboard_input.dart';
17-
import 'src/widget/instabug_text_field.dart';
13+
import 'package:instabug_flutter_example/src/native/instabug_flutter_example_method_channel.dart';
14+
import 'package:instabug_flutter_example/src/widget/instabug_button.dart';
15+
import 'package:instabug_flutter_example/src/widget/instabug_clipboard_input.dart';
16+
import 'package:instabug_flutter_example/src/widget/instabug_text_field.dart';
1817
import 'package:instabug_flutter/src/utils/screen_loading/screen_loading_manager.dart';
1918

20-
import 'src/widget/section_title.dart';
19+
import 'package:instabug_flutter_example/src/widget/section_title.dart';
2120

2221
part 'src/screens/crashes_page.dart';
2322

@@ -58,7 +57,6 @@ void main() {
5857
Zone.current.handleUncaughtError(details.exception, details.stack!);
5958
};
6059

61-
enableInstabugMaskingPrivateViews();
6260

6361
runApp(const MyApp());
6462
},

packages/instabug_flutter/example/lib/src/components/non_fatal_crashes_content.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class _NonFatalCrashesContentState extends State<NonFatalCrashesContent> {
161161
],
162162
),
163163
),
164-
SizedBox(
164+
const SizedBox(
165165
height: 8,
166166
),
167167
InstabugButton(
@@ -190,7 +190,7 @@ class _NonFatalCrashesContentState extends State<NonFatalCrashesContent> {
190190
fingerprint: crashfingerPrintController.text,
191191
level: crashType);
192192
ScaffoldMessenger.of(context)
193-
.showSnackBar(SnackBar(content: Text("Crash sent")));
193+
.showSnackBar(const SnackBar(content: Text("Crash sent")));
194194
crashNameController.text = '';
195195
crashfingerPrintController.text = '';
196196
crashUserAttributeValueController.text = '';

0 commit comments

Comments
 (0)