Skip to content

Commit

Permalink
Release version 8.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jerielng committed Nov 14, 2023
1 parent 4b395a9 commit 99eaaaa
Show file tree
Hide file tree
Showing 16 changed files with 657 additions and 174 deletions.
5 changes: 2 additions & 3 deletions BrazeProject/BrazeProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ export const BrazeProject = (): ReactElement => {
Braze.logInAppMessageImpression(event.inAppMessage);
Braze.logInAppMessageButtonClicked(event.inAppMessage, 0);
}

showToast('inAppMessage received in the React layer');
console.log(event.inAppMessage);
},
Expand Down Expand Up @@ -233,8 +232,8 @@ export const BrazeProject = (): ReactElement => {
const pushEventSubscription = Braze.addListener(
Braze.Events.PUSH_NOTIFICATION_EVENT,
function (data) {
console.log(`Push Notification event of type ${data.push_event_type} seen.
Title ${data.title}\n and deeplink ${data.deeplink}`);
console.log(`Push Notification event of type ${data.payload_type} seen.
Title ${data.title}\n and deeplink ${data.url}`);
console.log(JSON.stringify(data, undefined, 2));
},
);
Expand Down
26 changes: 13 additions & 13 deletions BrazeProject/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
PODS:
- boost (1.76.0)
- braze-react-native-sdk (8.0.0):
- BrazeKit (~> 7.0.0)
- BrazeLocation (~> 7.0.0)
- BrazeUI (~> 7.0.0)
- braze-react-native-sdk (8.1.0):
- BrazeKit (~> 7.1.0)
- BrazeLocation (~> 7.1.0)
- BrazeUI (~> 7.1.0)
- RCT-Folly
- RCTRequired
- RCTTypeSafety
- React-Codegen
- React-Core
- ReactCommon/turbomodule/core
- BrazeKit (7.0.0)
- BrazeLocation (7.0.0):
- BrazeKit (= 7.0.0)
- BrazeUI (7.0.0):
- BrazeKit (= 7.0.0)
- BrazeKit (7.1.0)
- BrazeLocation (7.1.0):
- BrazeKit (= 7.1.0)
- BrazeUI (7.1.0):
- BrazeKit (= 7.1.0)
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- FBLazyVector (0.72.3)
Expand Down Expand Up @@ -1259,10 +1259,10 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
boost: 57d2868c099736d80fcd648bf211b4431e51a558
braze-react-native-sdk: 3c1e873239b8c3fcccd0be76a6f0dc56c90b404c
BrazeKit: 0adaa8a4f92f55212ec5522bebca92e10a341c8b
BrazeLocation: 74faf6957b412d93ef4ee9b95e5868bcd55dcc24
BrazeUI: 305d8386fee0ecf95d62d514154fe71ad16c55d5
braze-react-native-sdk: 20308f3e6e40689470020adf8af926d34f129735
BrazeKit: f7611b79435d27b844ddae26dc193fa79bb04b1c
BrazeLocation: 99f8b63de17a80332a3d37802fc2a4a9ef84d1df
BrazeUI: 1bcc4e4df90f1ed178f68f36115c10dd02f1b382
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
FBLazyVector: 4cce221dd782d3ff7c4172167bba09d58af67ccb
Expand Down
100 changes: 84 additions & 16 deletions BrazeProject/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
dependencies:
"@babel/highlight" "^7.22.5"

"@babel/code-frame@^7.22.13":
version "7.22.13"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e"
integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==
dependencies:
"@babel/highlight" "^7.22.13"
chalk "^2.4.2"

"@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.5", "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9":
version "7.22.9"
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730"
Expand Down Expand Up @@ -57,7 +65,7 @@
eslint-visitor-keys "^2.1.0"
semver "^6.3.1"

"@babel/generator@^7.20.0", "@babel/generator@^7.22.7", "@babel/generator@^7.22.9", "@babel/generator@^7.7.2":
"@babel/generator@^7.20.0", "@babel/generator@^7.22.9", "@babel/generator@^7.7.2":
version "7.22.9"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d"
integrity sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==
Expand All @@ -67,6 +75,16 @@
"@jridgewell/trace-mapping" "^0.3.17"
jsesc "^2.5.1"

"@babel/generator@^7.23.0":
version "7.23.0"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420"
integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==
dependencies:
"@babel/types" "^7.23.0"
"@jridgewell/gen-mapping" "^0.3.2"
"@jridgewell/trace-mapping" "^0.3.17"
jsesc "^2.5.1"

"@babel/helper-annotate-as-pure@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882"
Expand Down Expand Up @@ -132,6 +150,11 @@
resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz#f06dd41b7c1f44e1f8da6c4055b41ab3a09a7e98"
integrity sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==

"@babel/helper-environment-visitor@^7.22.20":
version "7.22.20"
resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167"
integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==

"@babel/helper-function-name@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz#ede300828905bb15e582c037162f99d5183af1be"
Expand All @@ -140,6 +163,14 @@
"@babel/template" "^7.22.5"
"@babel/types" "^7.22.5"

"@babel/helper-function-name@^7.23.0":
version "7.23.0"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759"
integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==
dependencies:
"@babel/template" "^7.22.15"
"@babel/types" "^7.23.0"

"@babel/helper-hoist-variables@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb"
Expand Down Expand Up @@ -228,6 +259,11 @@
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f"
integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==

"@babel/helper-validator-identifier@^7.22.20":
version "7.22.20"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0"
integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==

"@babel/helper-validator-identifier@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193"
Expand Down Expand Up @@ -256,6 +292,15 @@
"@babel/traverse" "^7.22.6"
"@babel/types" "^7.22.5"

"@babel/highlight@^7.22.13":
version "7.22.20"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54"
integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==
dependencies:
"@babel/helper-validator-identifier" "^7.22.20"
chalk "^2.4.2"
js-tokens "^4.0.0"

"@babel/highlight@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031"
Expand All @@ -270,6 +315,11 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.7.tgz#df8cf085ce92ddbdbf668a7f186ce848c9036cae"
integrity sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==

"@babel/parser@^7.22.15", "@babel/parser@^7.23.0":
version "7.23.0"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719"
integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==

"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.5.tgz#87245a21cd69a73b0b81bcda98d443d6df08f05e"
Expand Down Expand Up @@ -1130,19 +1180,28 @@
"@babel/parser" "^7.22.5"
"@babel/types" "^7.22.5"

"@babel/traverse@^7.20.0", "@babel/traverse@^7.22.6", "@babel/traverse@^7.22.8", "@babel/traverse@^7.7.4":
version "7.22.8"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.8.tgz#4d4451d31bc34efeae01eac222b514a77aa4000e"
integrity sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==
"@babel/template@^7.22.15":
version "7.22.15"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38"
integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==
dependencies:
"@babel/code-frame" "^7.22.5"
"@babel/generator" "^7.22.7"
"@babel/helper-environment-visitor" "^7.22.5"
"@babel/helper-function-name" "^7.22.5"
"@babel/code-frame" "^7.22.13"
"@babel/parser" "^7.22.15"
"@babel/types" "^7.22.15"

"@babel/traverse@^7.20.0", "@babel/traverse@^7.22.6", "@babel/traverse@^7.22.8", "@babel/traverse@^7.7.4":
version "7.23.2"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8"
integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==
dependencies:
"@babel/code-frame" "^7.22.13"
"@babel/generator" "^7.23.0"
"@babel/helper-environment-visitor" "^7.22.20"
"@babel/helper-function-name" "^7.23.0"
"@babel/helper-hoist-variables" "^7.22.5"
"@babel/helper-split-export-declaration" "^7.22.6"
"@babel/parser" "^7.22.7"
"@babel/types" "^7.22.5"
"@babel/parser" "^7.23.0"
"@babel/types" "^7.23.0"
debug "^4.1.0"
globals "^11.1.0"

Expand All @@ -1155,13 +1214,22 @@
"@babel/helper-validator-identifier" "^7.22.5"
to-fast-properties "^2.0.0"

"@babel/types@^7.22.15", "@babel/types@^7.23.0":
version "7.23.0"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb"
integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==
dependencies:
"@babel/helper-string-parser" "^7.22.5"
"@babel/helper-validator-identifier" "^7.22.20"
to-fast-properties "^2.0.0"

"@bcoe/v8-coverage@^0.2.3":
version "0.2.3"
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@braze/react-native-sdk@../":
version "6.0.0"
version "8.0.1"

"@eslint-community/eslint-utils@^4.2.0":
version "4.4.0"
Expand Down Expand Up @@ -2569,7 +2637,7 @@ caniuse-lite@^1.0.30001503:
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001515.tgz#418aefeed9d024cd3129bfae0ccc782d4cb8f12b"
integrity sha512-eEFDwUOZbE24sb+Ecsx3+OvNETqjWIdabMy52oOkIgcUtAsQifjUG9q4U9dgTHJM2mfk4uEPxc0+xuFdJ629QA==

chalk@^2.0.0:
chalk@^2.0.0, chalk@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
Expand Down Expand Up @@ -5815,9 +5883,9 @@ range-parser@~1.2.1:
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==

react-devtools-core@^4.27.2:
version "4.28.0"
resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.28.0.tgz#3fa18709b24414adddadac33b6b9cea96db60f2f"
integrity sha512-E3C3X1skWBdBzwpOUbmXG8SgH6BtsluSMe+s6rRcujNKG1DGi8uIfhdhszkgDpAsMoE55hwqRUzeXCmETDBpTg==
version "4.28.4"
resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.28.4.tgz#fb8183eada77093f4c2f9830e664bf22255abe27"
integrity sha512-IUZKLv3CimeM07G3vX4H4loxVpByrzq3HvfTX7v9migalwvLs9ZY5D3S3pKR33U+GguYfBBdMMZyToFhsSE/iQ==
dependencies:
shell-quote "^1.6.1"
ws "^7"
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## 8.1.0

#### Added
- Push notification objects are now accessible in the JavaScript layer via new fields on the `PushNotificationEvent` interface.
- Deprecates the following fields from the `PushNotificationEvent` interface in favor of the new names that can be used on both iOS and Android:
- `push_event_type` -> Use `payload_type` instead.
- `deeplink` -> Use `url` instead.
- `content_text` -> Use `body` instead.
- `raw_android_push_data` -> Use the `android` object instead.
- `kvp_data` -> Use `braze_properties` instead.
- Adds iOS support for the listener event `Braze.Events.PUSH_NOTIFICATION_EVENT`.
- On iOS, only `"push_opened"` events are supported, indicating the user interacted with the received notification.
- The iOS event does not support the deprecated legacy fields mentioned above.
- Adds methods to manually perform the action of an In-App Message or Content Card when using a custom UI.
- `Braze.performInAppMessageButtonAction(inAppMessage, buttonId)`
- `Braze.performInAppMessageAction(inAppMessage)`
- `Braze.processContentCardClickAction(id)`
- Updates the native iOS bridge [from Braze Swift SDK 7.0.0 to 7.1.0](https://github.com/braze-inc/braze-swift-sdk/compare/7.0.0...7.1.0#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed).

#### Fixed
- Fixes the `setLastKnownLocation` method to sanitize null inputs before calling the native layer.
- This previously caused an issue when calling this method on the legacy React Native architecture.
- Updates the native Android bridge [from Braze Android SDK 29.0.0 to 29.0.1](https://github.com/braze-inc/braze-android-sdk/compare/v29.0.0...v29.0.1#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed).

## 8.0.0

##### Breaking
Expand Down
8 changes: 4 additions & 4 deletions __tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ test('it calls BrazeReactBridge.setLastKnownLocation with 3 null', () => {
const horizontalAccuracy = null;
const verticalAccuracy = null;
Braze.setLastKnownLocation(latitude, longitude, altitude, horizontalAccuracy, verticalAccuracy);
expect(NativeBrazeReactModule.setLastKnownLocation).toBeCalledWith(latitude, longitude, altitude, horizontalAccuracy, verticalAccuracy);
expect(NativeBrazeReactModule.setLastKnownLocation).toBeCalledWith(latitude, longitude, 0, -1, -1);
});

test('it calls BrazeReactBridge.setLastKnownLocation with 2 null', () => {
Expand All @@ -219,7 +219,7 @@ test('it calls BrazeReactBridge.setLastKnownLocation with 2 null', () => {
const horizontalAccuracy = 25.0;
const verticalAccuracy = null;
Braze.setLastKnownLocation(latitude, longitude, altitude, horizontalAccuracy, verticalAccuracy);
expect(NativeBrazeReactModule.setLastKnownLocation).toBeCalledWith(latitude, longitude, altitude, horizontalAccuracy, verticalAccuracy);
expect(NativeBrazeReactModule.setLastKnownLocation).toBeCalledWith(latitude, longitude, 0, horizontalAccuracy, -1);
});

test('it calls BrazeReactBridge.setLastKnownLocation with 1 null', () => {
Expand All @@ -229,7 +229,7 @@ test('it calls BrazeReactBridge.setLastKnownLocation with 1 null', () => {
const horizontalAccuracy = 25.0;
const verticalAccuracy = null;
Braze.setLastKnownLocation(latitude, longitude, altitude, horizontalAccuracy, verticalAccuracy);
expect(NativeBrazeReactModule.setLastKnownLocation).toBeCalledWith(latitude, longitude, altitude, horizontalAccuracy, verticalAccuracy);
expect(NativeBrazeReactModule.setLastKnownLocation).toBeCalledWith(latitude, longitude, altitude, horizontalAccuracy, -1);
});

test('it calls BrazeReactBridge.requestContentCardsRefresh', () => {
Expand Down Expand Up @@ -669,4 +669,4 @@ test('it calls BrazeReactBridge.getFeatureFlagStringProperty', () => {
test('it calls BrazeReactBridge.getFeatureFlagNumberProperty', () => {
Braze.getFeatureFlagNumberProperty('id', 'key');
expect(NativeBrazeReactModule.getFeatureFlagNumberProperty).toBeCalled();
});
});
2 changes: 2 additions & 0 deletions __tests__/jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jest.mock('react-native/Libraries/TurboModule/TurboModuleRegistry', () => {
logContentCardClicked: jest.fn(),
logContentCardDismissed: jest.fn(),
logContentCardImpression: jest.fn(),
processContentCardClickAction: jest.fn(),
requestFeedRefresh: jest.fn(),
requestImmediateDataFlush: jest.fn(),
enableSDK: jest.fn(),
Expand Down Expand Up @@ -80,6 +81,7 @@ jest.mock('react-native/Libraries/TurboModule/TurboModuleRegistry', () => {
logInAppMessageClicked: jest.fn(),
logInAppMessageImpression: jest.fn(),
logInAppMessageButtonClicked: jest.fn(),
performInAppMessageAction: jest.fn(),
setLastKnownLocation: jest.fn(),
requestPushPermission: jest.fn(),
getFeatureFlag: jest.fn(),
Expand Down
Loading

0 comments on commit 99eaaaa

Please sign in to comment.