Skip to content

Commit

Permalink
Merge pull request #385 from rudderlabs/release/2.31.0
Browse files Browse the repository at this point in the history
chore(release): pulling release/2.31.0 into master
  • Loading branch information
1abhishekpandey authored Oct 29, 2024
2 parents 71fa629 + f69234c commit e538d40
Show file tree
Hide file tree
Showing 23 changed files with 87 additions and 36 deletions.
7 changes: 7 additions & 0 deletions apps/example/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [0.12.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/example-0.11.1...example-0.12.0) (2024-10-29)


### Features

* add gzip configuration support ([#382](https://github.com/rudderlabs/rudder-sdk-react-native/issues/382)) ([abf983b](https://github.com/rudderlabs/rudder-sdk-react-native/commit/abf983b8d50d28810a9a741cf9e3344df878fc0c))

## [0.11.1](https://github.com/rudderlabs/rudder-sdk-react-native/compare/example-0.11.0...example-0.11.1) (2024-09-30)


Expand Down
10 changes: 8 additions & 2 deletions apps/example/ios/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,10 @@
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down Expand Up @@ -886,7 +889,10 @@
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down
8 changes: 4 additions & 4 deletions apps/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ PODS:
- React-utils (= 0.74.1)
- RNCAsyncStorage (1.23.1):
- React-Core
- RNRudderSdk (1.14.0):
- RNRudderSdk (1.14.1):
- React
- Rudder (< 2.0.0, >= 1.26.3)
- RNSVG (15.3.0):
Expand Down Expand Up @@ -1346,7 +1346,7 @@ PODS:
- React
- RNRudderSdk
- Rudder-CleverTap (~> 1.1.2)
- rudder-integration-facebook-react-native (1.0.0):
- rudder-integration-facebook-react-native (1.0.1):
- React
- RNRudderSdk
- Rudder-Facebook (< 3.0.0, >= 2.2.1)
Expand Down Expand Up @@ -1719,7 +1719,7 @@ SPEC CHECKSUMS:
React-utils: 3285151c9d1e3a28a9586571fc81d521678c196d
ReactCommon: f42444e384d82ab89184aed5d6f3142748b54768
RNCAsyncStorage: 826b603ae9c0f88b5ac4e956801f755109fa4d5c
RNRudderSdk: 9e243c47f3040a49c559f3b01186fe48e5158c01
RNRudderSdk: b31488f3452592107ff3835120a13df4d00e394c
RNSVG: a48668fd382115bc89761ce291a81c4ca5f2fd2e
RSCrashReporter: 6b8376ac729b0289ebe0908553e5f56d8171f313
Rudder: 3cfcd9e6c5359cd6d49f411101ed9b894e3b64bd
Expand All @@ -1735,7 +1735,7 @@ SPEC CHECKSUMS:
rudder-integration-appsflyer-react-native: 393473fd43ee3c792484a36014fcfeae1169abe5
rudder-integration-braze-react-native: 237e030490811fa7eb3192e2800feb6e6d141bca
rudder-integration-clevertap-react-native: 3c640ce986bd66996a2e53ff415159dfca0f5c4d
rudder-integration-facebook-react-native: 0d3a8e6279b81c39495a81d7badf4c4c8815bd8f
rudder-integration-facebook-react-native: 501ddd3441b7e0ede4848b76e184797c10ef8be3
rudder-integration-firebase-react-native: 49cdc474a8273432a8b363e966b27dda1a696dea
rudder-integration-moengage-react-native: a88e92d14c27edfb1d7c3d27cf2498e4d82cd36d
rudder-integration-singular-react-native: 52137a0c399ad1329b53bfe9e8af0a78e11168a3
Expand Down
2 changes: 1 addition & 1 deletion apps/example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "example",
"version": "0.11.1",
"version": "0.12.0",
"private": true,
"dependencies": {
"@react-native/metro-config": "*",
Expand Down
1 change: 1 addition & 0 deletions apps/example/src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const initRudderReactNativeSDK = async () => {
trackAppLifecycleEvents: true,
autoSessionTracking: true,
dbEncryption: dbEncryption,
enableGzip: true,
withFactories: [
appsflyer,
amplitude,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [1.3.1](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-plugin-db-encryption-react-native@1.3.0...rudder-plugin-db-encryption-react-native@1.3.1) (2024-10-29)


### Bug Fixes

* add dummy commit to trigger changelog generation ([#384](https://github.com/rudderlabs/rudder-sdk-react-native/issues/384)) ([f9327c2](https://github.com/rudderlabs/rudder-sdk-react-native/commit/f9327c2e4f7fe23729a2cb0c3c67097c16ff8d73))

## [1.3.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-plugin-db-encryption-react-native@1.2.0...rudder-plugin-db-encryption-react-native@1.3.0) (2024-08-19)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## [1.3.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-plugin-db-encryption-react-native@1.2.0...rudder-plugin-db-encryption-react-native@1.3.0) (2024-08-19)
## [1.3.1](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-plugin-db-encryption-react-native@1.3.0...rudder-plugin-db-encryption-react-native@1.3.1) (2024-10-29)

### Features
### Bug Fixes

- use the sqlcipher-android library in db encryption android plugin ([#363](https://github.com/rudderlabs/rudder-sdk-react-native/issues/363)) ([31c049c](https://github.com/rudderlabs/rudder-sdk-react-native/commit/31c049cfa1e1bb77884600d0248c58b00d78fbed))
- add dummy commit to trigger changelog generation ([#384](https://github.com/rudderlabs/rudder-sdk-react-native/issues/384)) ([f9327c2](https://github.com/rudderlabs/rudder-sdk-react-native/commit/f9327c2e4f7fe23729a2cb0c3c67097c16ff8d73))
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@rudderstack/rudder-plugin-db-encryption-react-native",
"title": "Rudder Plugin DBEncryption React Native",
"version": "1.3.0",
"version": "1.3.1",
"description": "Rudder React Native DBEncryption Plugin support for Android and iOS",
"keywords": [
"react-native",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "rudder-plugin-db-encryption-react-native@1.3.0",
"tag": "rudder-plugin-db-encryption-react-native@1.3.1",
"notesFile": "./libs/plugins/rudder-plugin-db-encryption-react-native/CHANGELOG_LATEST.md"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class DBEncryption implements IDBEncryption {
this.enable = enable;
}

// Add the encryption plugin.
// Add the encryption plugin
async addDBEncryptionPlugin(key: string, enable: boolean): Promise<void> {
await bridge.setup(key, enable);
}
Expand Down
7 changes: 7 additions & 0 deletions libs/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [1.15.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-sdk-react-native@1.14.1...rudder-sdk-react-native@1.15.0) (2024-10-29)


### Features

* add gzip configuration support ([#382](https://github.com/rudderlabs/rudder-sdk-react-native/issues/382)) ([abf983b](https://github.com/rudderlabs/rudder-sdk-react-native/commit/abf983b8d50d28810a9a741cf9e3344df878fc0c))

## [1.14.1](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-sdk-react-native@1.14.0...rudder-sdk-react-native@1.14.1) (2024-09-30)


Expand Down
6 changes: 3 additions & 3 deletions libs/sdk/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## [1.14.1](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-sdk-react-native@1.14.0...rudder-sdk-react-native@1.14.1) (2024-09-30)
## [1.15.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-sdk-react-native@1.14.1...rudder-sdk-react-native@1.15.0) (2024-10-29)

### Bug Fixes
### Features

- alias api ([#377](https://github.com/rudderlabs/rudder-sdk-react-native/issues/377)) ([b9168cf](https://github.com/rudderlabs/rudder-sdk-react-native/commit/b9168cfe1bcdfdf696b0f7c534f0841b15050a19))
- add gzip configuration support ([#382](https://github.com/rudderlabs/rudder-sdk-react-native/issues/382)) ([abf983b](https://github.com/rudderlabs/rudder-sdk-react-native/commit/abf983b8d50d28810a9a741cf9e3344df878fc0c))
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ private RudderConfig.Builder buildConfig() {
if (config.hasKey("collectDeviceId")) {
configBuilder.withCollectDeviceId(config.getBoolean("collectDeviceId"));
}
if(config.hasKey("enableGzip")) {
configBuilder.withGzip(config.getBoolean("enableGzip"));
}
return configBuilder;
}

Expand Down
3 changes: 3 additions & 0 deletions libs/sdk/ios/RNParamsConfigurator.m
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ -(RSConfigBuilder*)buildConfig {
if ([config objectForKey:@"collectDeviceId"]) {
[configBuilder withCollectDeviceId:[config[@"collectDeviceId"] boolValue]];
}
if ([config objectForKey:@"enableGzip"]) {
[configBuilder withGzip:[config[@"enableGzip"] boolValue]];
}
return configBuilder;
}

Expand Down
2 changes: 1 addition & 1 deletion libs/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/rudder-sdk-react-native",
"version": "1.14.1",
"version": "1.15.0",
"description": "Rudder React Native SDK",
"keywords": [
"react-native",
Expand Down
2 changes: 1 addition & 1 deletion libs/sdk/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "rudder-sdk-react-native@1.14.1",
"tag": "rudder-sdk-react-native@1.15.0",
"notesFile": "./libs/sdk/CHANGELOG_LATEST.md"
}
},
Expand Down
3 changes: 2 additions & 1 deletion libs/sdk/src/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ export const AUTO_COLLECT_ADVERT_ID = false;
export const TRACK_LIFECYCLE_EVENTS = true;
export const RECORD_SCREEN_VIEWS = false;
export const LOG_LEVEL = RUDDER_LOG_LEVEL.ERROR;
export const SDK_VERSION = '1.14.1';
export const SDK_VERSION = '1.15.0';
export const AUTO_SESSION_TRACKING = true;
export const SESSION_TIMEOUT = 300000;
export const ENABLE_BACKGROUND_MODE = false;
export const COLLECT_DEVICE_ID = true;
export const ENABLE_GZIP = true;
1 change: 1 addition & 0 deletions libs/sdk/src/NativeBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface Configuration {
sessionTimeout?: number;
enableBackgroundMode?: boolean;
collectDeviceId?: boolean;
enableGzip?: boolean;
dbEncryption?: IDBEncryption;
// eslint-disable-next-line @typescript-eslint/ban-types
withFactories?: Array<Record<string, unknown> | Function>;
Expand Down
11 changes: 10 additions & 1 deletion libs/sdk/src/RudderClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import AsyncLock from 'async-lock';
import { configure } from './RudderConfiguration';
import bridge, { Configuration } from './NativeBridge';
import { logInit, logDebug, logError, logWarn } from './Logger';
import { SDK_VERSION } from './Constants';
import { SDK_VERSION, ENABLE_GZIP } from './Constants';
import IRudderContext from './IRudderContext';
import { filterNaN } from './FilterNaN';

Expand Down Expand Up @@ -78,6 +78,15 @@ function validateConfiguration(configuration: Configuration) {
logWarn("setup : 'collectDeviceId' must be a boolean. Falling back to the default value");
delete configuration.collectDeviceId;
}
if (
typeof configuration.enableGzip !== 'undefined' &&
typeof configuration.enableGzip != 'boolean'
) {
logWarn(
`setup : 'enableGzip' must be a boolean. Falling back to the default value ${ENABLE_GZIP}`,
);
delete configuration.enableGzip;
}
}

// setup the RudderSDK with writeKey and Config
Expand Down
3 changes: 3 additions & 0 deletions libs/sdk/src/RudderConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
SESSION_TIMEOUT,
ENABLE_BACKGROUND_MODE,
COLLECT_DEVICE_ID,
ENABLE_GZIP,
} from './Constants';

export const configure = async (
Expand All @@ -33,6 +34,7 @@ export const configure = async (
trackAppLifecycleEvents = TRACK_LIFECYCLE_EVENTS,
recordScreenViews = RECORD_SCREEN_VIEWS,
collectDeviceId = COLLECT_DEVICE_ID,
enableGzip = ENABLE_GZIP,
dbEncryption,
withFactories = [],
}: Configuration,
Expand Down Expand Up @@ -68,6 +70,7 @@ export const configure = async (
enableBackgroundMode,
recordScreenViews,
collectDeviceId,
enableGzip,
};

return config;
Expand Down
31 changes: 17 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/rudder-sdk-react-native-monorepo",
"version": "2.30.0",
"version": "2.31.0",
"description": "Rudder React Native SDK monorepo",
"keywords": [
"react-native",
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sonar.qualitygate.wait=false
sonar.projectKey=rudderlabs_rudder-sdk-react-native
sonar.organization=rudderlabs
sonar.projectName=rudder-react-native
sonar.projectVersion=2.30.0
sonar.projectVersion=2.31.0

# Meta-data for the project
sonar.links.scm=https://github.com/rudderlabs/rudder-sdk-react-native
Expand Down

0 comments on commit e538d40

Please sign in to comment.