Skip to content

Commit fb98ac2

Browse files
committed
Merge remote-tracking branch 'origin/dev' into feat/support-expo-updates
2 parents e2c613d + 5c8f2cf commit fb98ac2

26 files changed

+374
-166
lines changed

.circleci/config.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -401,22 +401,33 @@ jobs:
401401
prepare_steps:
402402
type: steps
403403
default: []
404+
api_endpoint:
405+
type: string
406+
dashboard_token_env:
407+
type: string
404408
working_directory: ~/project
405409
executor:
406410
name: node/default
407411
steps:
408412
- advanced-checkout/shallow-checkout
413+
- run: git clone [email protected]:Instabug/Escape.git
414+
- run:
415+
working_directory: Escape
416+
command: swift build -c release
417+
- run:
418+
working_directory: Escape/.build/release
419+
command: cp -f Escape /usr/local/bin/escape
409420
- steps: << parameters.prepare_steps >>
410421
- install_node_modules
411422
- run:
412423
name: Build the SDK
413424
command: yarn build
414425
- run:
415-
name: Authorize with NPM
416-
command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
417-
- run:
418-
name: Publish new enterprise version
419-
command: npm publish
426+
name: Publish Custom Package with Escape
427+
command: Escape react-native publish-custompackage
428+
environment:
429+
DASHBOARD_TOKEN: << parameters.dashboard_token_env >>
430+
DASHBOARD_API_ENDPOINT: << parameters.api_endpoint >>
420431

421432
publish:
422433
macos:
@@ -438,8 +449,11 @@ jobs:
438449
working_directory: project
439450
command: yarn build
440451
- run:
452+
name: Publish Official Package with Escape
441453
working_directory: project
442454
command: Escape react-native publish
455+
environment:
456+
DASHBOARD_API_ENDPOINT: api.instabug.com
443457
publish_new_namespace:
444458
working_directory: ~/project
445459
executor:
@@ -562,6 +576,8 @@ workflows:
562576
npm_package: '@instabug/react-native-nn'
563577
android_package: nn
564578
api_endpoint: st001009nn.instabug.com
579+
api_endpoint: st001009nn.instabug.com
580+
dashboard_token_env: ${NN_TOKEN}
565581

566582
- hold_release_injazat:
567583
requires: *release_dependencies
@@ -581,6 +597,8 @@ workflows:
581597
npm_package: '@instabug/react-native-injazat'
582598
android_package: injazat
583599
api_endpoint: st001013mec1.instabug.com
600+
api_endpoint: st001013mec1.instabug.com
601+
dashboard_token_env: ${INJAZAT_TOKEN}
584602

585603
# Dream11 tests
586604
- hold_test_dream11:
@@ -622,3 +640,5 @@ workflows:
622640
only: dream11
623641
prepare_steps:
624642
- prepare_dream11
643+
api_endpoint: st001012dream11.instabug.com
644+
dashboard_token_env: ${DREAM11_TOKEN}

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## [Unreleased](https://github.com/Instabug/Instabug-React-Native/compare/v14.3.0...dev)
3+
## [15.0.1](https://github.com/Instabug/Instabug-React-Native/compare/v14.3.0...v15.0.1)
44

55
### Added
66

@@ -14,12 +14,22 @@
1414

1515
- Add support for network spans. ([#1394](https://github.com/Instabug/Instabug-React-Native/pull/1394))
1616

17+
- Add respect to backend network body limit. ([#1397](https://github.com/Instabug/Instabug-React-Native/pull/1397))
18+
19+
### Changed
20+
21+
- Bump Instabug iOS SDK to v15.1.1 ([#1402](https://github.com/Instabug/Instabug-React-Native/pull/1402)). [See release notes](https://github.com/Instabug/Instabug-iOS/releases/tag/15.1.1).
22+
23+
- Bump Instabug Android SDK to v15.0.1 ([#1402](https://github.com/Instabug/Instabug-React-Native/pull/1402)). [See release notes](https://github.com/Instabug/Instabug-Android/releases/tag/v15.0.1).
24+
1725
### Fixed
1826

1927
- Not sending the inComplete xhrRequest. ([#1365](https://github.com/Instabug/Instabug-React-Native/pull/1365))
2028

2129
- Added more search capabilities to the find-token.sh script. e.g., searching in .env file for react config. [#1366](https://github.com/Instabug/Instabug-React-Native/pull/1366)
2230

31+
- Updated the CHANGELOG on the dashboard for the enterprise users. [#1404](https://github.com/Instabug/Instabug-React-Native/pull/1404)
32+
2333
## [14.3.0](https://github.com/Instabug/Instabug-React-Native/compare/v14.1.0...14.3.0)
2434

2535
### Added

RNInstabug.podspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Pod::Spec.new do |s|
1616
s.source_files = "ios/**/*.{h,m,mm}"
1717

1818
s.dependency 'React-Core'
19-
# use_instabug!(s)
20-
s.dependency 'Instabug'
19+
use_instabug!(s)
2120

2221
end

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ android {
5757
minSdkVersion getExtOrDefault('minSdkVersion').toInteger()
5858
targetSdkVersion getExtOrDefault('targetSdkVersion').toInteger()
5959
versionCode 1
60-
versionName "14.3.0"
60+
versionName "15.0.1"
6161
multiDexEnabled true
6262
ndk {
6363
abiFilters "armeabi-v7a", "x86"

android/src/main/java/com/instabug/reactlibrary/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class Constants {
1313
final static String IBG_ON_FEATURES_UPDATED_CALLBACK = "IBGOnFeatureUpdatedCallback";
1414
final static String IBG_NETWORK_LOGGER_HANDLER = "IBGNetworkLoggerHandler";
1515

16-
final static String IBG_ON_NEW_W3C_FLAGS_UPDATE_RECEIVED_CALLBACK = "IBGOnNewW3CFlagsUpdateReceivedCallback";
16+
final static String IBG_ON_FEATURE_FLAGS_UPDATE_RECEIVED_CALLBACK = "IBGOnNewFeatureFlagsUpdateReceivedCallback";
1717

1818
final static String IBG_SESSION_REPLAY_ON_SYNC_CALLBACK_INVOCATION = "IBGSessionReplayOnSyncCallback";
1919

android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,10 +1186,10 @@ public void run() {
11861186
}
11871187

11881188
/**
1189-
* Register a listener for W3C flags value change
1189+
* Register a listener for feature flags value change
11901190
*/
11911191
@ReactMethod
1192-
public void registerW3CFlagsChangeListener() {
1192+
public void registerFeatureFlagsChangeListener() {
11931193

11941194
MainThreadHandler.runOnMainThread(new Runnable() {
11951195
@Override
@@ -1202,8 +1202,9 @@ public void invoke(@NonNull CoreFeaturesState featuresState) {
12021202
params.putBoolean("isW3ExternalTraceIDEnabled", featuresState.isW3CExternalTraceIdEnabled());
12031203
params.putBoolean("isW3ExternalGeneratedHeaderEnabled", featuresState.isAttachingGeneratedHeaderEnabled());
12041204
params.putBoolean("isW3CaughtHeaderEnabled", featuresState.isAttachingCapturedHeaderEnabled());
1205+
params.putInt("networkBodyLimit",featuresState.getNetworkLogCharLimit());
12051206

1206-
sendEvent(Constants.IBG_ON_NEW_W3C_FLAGS_UPDATE_RECEIVED_CALLBACK, params);
1207+
sendEvent(Constants.IBG_ON_FEATURE_FLAGS_UPDATE_RECEIVED_CALLBACK, params);
12071208
}
12081209
});
12091210
} catch (Exception e) {
@@ -1333,7 +1334,7 @@ public void run() {
13331334
}
13341335
});
13351336
}
1336-
/**
1337+
13371338
/**
13381339
* Sets the auto mask screenshots types.
13391340
*
@@ -1358,4 +1359,23 @@ public void run() {
13581359

13591360
});
13601361
}
1362+
1363+
/**
1364+
* Get network body size limit
1365+
*/
1366+
@ReactMethod
1367+
public void getNetworkBodyMaxSize(Promise promise) {
1368+
1369+
MainThreadHandler.runOnMainThread(new Runnable() {
1370+
@Override
1371+
public void run() {
1372+
try {
1373+
promise.resolve(InternalCore.INSTANCE.get_networkLogCharLimit());
1374+
} catch (Exception e) {
1375+
e.printStackTrace();
1376+
promise.resolve(false);
1377+
}
1378+
}
1379+
});
1380+
}
13611381
}

android/src/test/java/com/instabug/reactlibrary/RNInstabugReactnativeModuleTest.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,9 +702,22 @@ public void testEnableAutoMasking(){
702702
String maskTextInputs = "textInputs";
703703
String maskMedia = "media";
704704
String maskNone = "none";
705-
705+
706706
rnModule.enableAutoMasking(JavaOnlyArray.of(maskLabel, maskMedia, maskTextInputs,maskNone));
707-
707+
708708
mockInstabug.verify(() -> Instabug.setAutoMaskScreenshotsTypes(MaskingType.LABELS,MaskingType.MEDIA,MaskingType.TEXT_INPUTS,MaskingType.MASK_NOTHING));
709709
}
710+
711+
@Test
712+
public void testGetNetworkBodyMaxSize_resolvesPromiseWithExpectedValue() {
713+
Promise promise = mock(Promise.class);
714+
InternalCore internalAPM = mock(InternalCore.class);
715+
int expected = 10240;
716+
when(internalAPM.get_networkLogCharLimit()).thenReturn(expected);
717+
718+
rnModule.getNetworkBodyMaxSize(promise);
719+
720+
verify(promise).resolve(expected);
721+
}
722+
710723
}

examples/default/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ buildscript {
2424
classpath("com.android.tools.build:gradle:8.1.0")
2525
classpath("com.facebook.react:react-native-gradle-plugin")
2626
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
27-
classpath("com.instabug.library:instabug-plugin:14.3.1.6745207-SNAPSHOT")
27+
classpath("com.instabug.library:instabug-plugin:15.0.1")
2828
}
2929
}
3030

examples/default/ios/InstabugTests/InstabugSampleTests.m

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,4 +656,23 @@ - (void)testSetNetworkLogBodyEnabled {
656656
OCMVerify([mock setLogBodyEnabled:isEnabled]);
657657
}
658658

659+
- (void)testGetNetworkBodyMaxSize {
660+
id mock = OCMClassMock([IBGNetworkLogger class]);
661+
double expectedValue = 10240.0;
662+
663+
OCMStub([mock getNetworkBodyMaxSize]).andReturn(expectedValue);
664+
665+
XCTestExpectation *expectation = [self expectationWithDescription:@"Call resolve block"];
666+
RCTPromiseResolveBlock resolve = ^(NSNumber *result) {
667+
XCTAssertEqual(result.doubleValue, expectedValue);
668+
[expectation fulfill];
669+
};
670+
671+
[self.instabugBridge getNetworkBodyMaxSize:resolve :nil];
672+
[self waitForExpectationsWithTimeout:1.0 handler:nil];
673+
674+
OCMVerify(ClassMethod([mock getNetworkBodyMaxSize]));
675+
}
676+
677+
659678
@end

examples/default/ios/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ target 'InstabugExample' do
1515
config = use_native_modules!
1616
rn_maps_path = '../node_modules/react-native-maps'
1717
pod 'react-native-google-maps', :path => rn_maps_path
18+
1819
# add this line
19-
pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/feature-expose_network_limit-expose_body_limit/15.0.1/Instabug.podspec'
20-
# Flags change depending on the env values.
20+
pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/feature-support_expo_updates-remove_caching/15.1.1/Instabug.podspec' # Flags change depending on the env values.
2121
flags = get_default_flags()
2222

2323
use_react_native!(

0 commit comments

Comments
 (0)