From cacec435af06bed32f20a2959073e3f667b91c23 Mon Sep 17 00:00:00 2001 From: Ali Abdelfattah Date: Mon, 13 Jun 2022 18:24:04 +0200 Subject: [PATCH] [MOB-8891] Release/11.0.1 (#724) * Bump version to 11.0.1 * fix(android): remove unmatched 'fi' token in android upload_sourcemap.sh (#722) * [MOB-8883] Add CI job to validate shell files and increase e2e_android resources (#720) * Add CI job to validate shell files * Fix Android shell script error Remove extra fi operator * Increase e2e_android job resources * Fix Network-related Tests (#723) * Update CHANGELOG.md * Run Dependabot in Root Only (#721) * [MOB-8892] Update codecov version (#725) * Update package.json * Update config.yml * Increase CI emulator memory (#727) * [MOB-8895] Improve iOS Autolinking through leveraging the path attribute (#726) * Fix iOS Autolinking Script Path * Update CHANGELOG.md Co-authored-by: Ali Abdelfattah Co-authored-by: Matthew Koevort <35453138+matt-koevort@users.noreply.github.com> Co-authored-by: Youssef Raafat <99807625+TheBuggedYRN@users.noreply.github.com> --- .circleci/config.yml | 20 +++++++++++++++++++- .github/dependabot.yml | 7 +++++++ CHANGELOG.md | 4 +++- __tests__/networkLogger.spec.js | 4 +++- __tests__/xhrNetworkInterceptor.spec.js | 4 ++-- android/upload_sourcemap.sh | 1 - package.json | 4 ++-- react-native.config.js | 2 +- 8 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index cd1bb83fa..658397b96 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: test_module: working_directory: ~/project docker: - - image: circleci/node:8 + - image: circleci/node:10 steps: - checkout: path: ~/project @@ -89,6 +89,20 @@ jobs: working-directory: ./android test-command: ./gradlew test + validate_shell_files: + machine: + image: ubuntu-2004:current + working_directory: ~/project + steps: + - checkout: + path: ~/project + - run: + name: Validate Android Script + command: bash -n android/upload_sourcemap.sh + - run: + name: Validate iOS Script + command: bash -n ios/upload_sourcemap.sh + test_ios: macos: xcode: "12.3.0" @@ -149,6 +163,7 @@ jobs: executor: name: android/android-machine tag: "2022.03.1" + resource-class: large working_directory: ~/project/InstabugSample/android steps: - checkout: @@ -169,6 +184,7 @@ jobs: - android/start-emulator: avd-name: Nexus_6P_API_27 no-window: true + memory: 2048 post-emulator-launch-assemble-command: | rm -rf ~/.gradle/caches ./gradlew androidDependencies @@ -198,6 +214,7 @@ workflows: - test_module - test_sample - test_android + - validate_shell_files - test_ios - e2e_ios - e2e_android @@ -206,6 +223,7 @@ workflows: - test_module - test_sample - test_android + - validate_shell_files - test_ios - e2e_ios - e2e_android diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..b5efdefb5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 + +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" diff --git a/CHANGELOG.md b/CHANGELOG.md index 3caa33fdb..9a883f517 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ -## master +## 11.0.1 (2022-06-13) * Fixes an issue with network responses of type JSON not getting logged +* Fixes an issue that may cause the android build to fail +* Fixes an issue with iOS autolinking that causes the user local path to be referenced in xcode ## 11.0.0 (2022-06-07) diff --git a/__tests__/networkLogger.spec.js b/__tests__/networkLogger.spec.js index 47ace4d37..c128fe50a 100644 --- a/__tests__/networkLogger.spec.js +++ b/__tests__/networkLogger.spec.js @@ -172,7 +172,9 @@ describe('NetworkLogger Module', () => { }); it('should test that apollo handler called with catch error', async () => { - const operation = {}; + const operation = { + setContext : (callback) => callback({ headers: {} }), + }; const forward = jest.fn(); NetworkLogger.apolloLinkRequestHandler(operation, forward); diff --git a/__tests__/xhrNetworkInterceptor.spec.js b/__tests__/xhrNetworkInterceptor.spec.js index 27aa1adbe..b26f247bf 100644 --- a/__tests__/xhrNetworkInterceptor.spec.js +++ b/__tests__/xhrNetworkInterceptor.spec.js @@ -139,7 +139,7 @@ describe('Network Interceptor', () => { done(); }) FakeRequest.open(method, url); - FakeRequest.setResponseType('text') + FakeRequest.setResponseType('json') FakeRequest.send(); FakeRequest.mockResponse(requests[0], null, JSON.stringify(responseBody)); }); @@ -213,7 +213,7 @@ describe('Network Interceptor', () => { }); FakeRequest.open(method, url); FakeRequest.setRequestHeaders(headers); - FakeRequest.setResponseType('text'); + FakeRequest.setResponseType('json'); FakeRequest.send(); FakeRequest.mockResponse(requests[0], null, JSON.stringify(responseBody)); }); diff --git a/android/upload_sourcemap.sh b/android/upload_sourcemap.sh index 3ff36fe03..996f37646 100644 --- a/android/upload_sourcemap.sh +++ b/android/upload_sourcemap.sh @@ -41,7 +41,6 @@ else echo "Instabug: err: entry file not found. Make sure" "\"${ENTRY_FILE}\"" "exists in your projects root directory. Or add the environment variable INSTABUG_ENTRY_FILE with the name of your entry file" exit 0 fi - fi VERSION='{"code":"'"$INSTABUG_APP_VERSION_CODE"'","name":"'"$INSTABUG_APP_VERSION_NAME"'"}' echo "Instabug: Token found" "\""${INSTABUG_APP_TOKEN}"\"" echo "Instabug: Version Code found" "\""${INSTABUG_APP_VERSION_CODE}"\"" diff --git a/package.json b/package.json index 9101d04ca..08dc57b4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "instabug-reactnative", - "version": "11.0.0", + "version": "11.0.1", "description": "React Native plugin for integrating the Instabug SDK", "main": "index.js", "types": "index.d.ts", @@ -34,7 +34,7 @@ "devDependencies": { "babel-core": "7.0.0-bridge.0", "babel-jest": "^24.8.0", - "codecov": "~3.7.0", + "codecov": "~3.8.3", "jest": "^24.8.0", "metro-react-native-babel-preset": "0.51.1", "react": "^16.8.6", diff --git a/react-native.config.js b/react-native.config.js index 04269d343..6bac9a285 100644 --- a/react-native.config.js +++ b/react-native.config.js @@ -7,7 +7,7 @@ module.exports = { scriptPhases: [ { name: '[instabug-reactnative] Upload Sourcemap', - script: `bash "${path.resolve(__dirname, 'ios/upload_sourcemap.sh')}"`, + path: './ios/upload_sourcemap.sh', execution_position: 'after_compile', }, ],