Skip to content

Commit

Permalink
Merge branch 'master' of ssh://github.com/segmentio/analytics-react-n…
Browse files Browse the repository at this point in the history
…ative
  • Loading branch information
Harsh Vardhan committed Jun 27, 2024
2 parents 4067539 + 2810da3 commit 30aa3dc
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = AnalyticsReactNativeExample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -513,6 +514,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = AnalyticsReactNativeExample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
10 changes: 5 additions & 5 deletions examples/AnalyticsReactNativeExample/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,11 @@ PODS:
- RNScreens (3.27.0):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- segment-analytics-react-native (2.18.0):
- segment-analytics-react-native (2.19.2):
- React-Core
- sovran-react-native
- SocketRocket (0.6.1)
- sovran-react-native (1.1.0):
- sovran-react-native (1.1.1):
- React-Core
- Yoga (1.14.0)
- YogaKit (1.18.1):
Expand Down Expand Up @@ -752,12 +752,12 @@ SPEC CHECKSUMS:
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
RNGestureHandler: 32a01c29ecc9bb0b5bf7bc0a33547f61b4dc2741
RNScreens: 3c2d122f5e08c192e254c510b212306da97d2581
segment-analytics-react-native: abcd50e51633527c8b116a8b14780e8e4e5ad9d1
segment-analytics-react-native: 962494a9edbe3f6c5829e3b471484c85c304601c
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
sovran-react-native: 26dc5e42e618e311bb93d6e825e80af1934b8887
sovran-react-native: e6a9c963a8a6b9ebc3563394c39c30f33ab1453f
Yoga: eddf2bbe4a896454c248a8f23b4355891eb720a6
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 329f06ebb76294acf15c298d0af45530e2797740

COCOAPODS: 1.14.3
COCOAPODS: 1.15.2
10 changes: 5 additions & 5 deletions examples/E2E/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,11 @@ PODS:
- RNScreens (3.27.0):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- segment-analytics-react-native (2.18.0):
- segment-analytics-react-native (2.19.2):
- React-Core
- sovran-react-native
- SocketRocket (0.6.1)
- sovran-react-native (1.1.0):
- sovran-react-native (1.1.1):
- React-Core
- Yoga (1.14.0)
- YogaKit (1.18.1):
Expand Down Expand Up @@ -752,12 +752,12 @@ SPEC CHECKSUMS:
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
RNGestureHandler: 32a01c29ecc9bb0b5bf7bc0a33547f61b4dc2741
RNScreens: 3c2d122f5e08c192e254c510b212306da97d2581
segment-analytics-react-native: abcd50e51633527c8b116a8b14780e8e4e5ad9d1
segment-analytics-react-native: 962494a9edbe3f6c5829e3b471484c85c304601c
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
sovran-react-native: 26dc5e42e618e311bb93d6e825e80af1934b8887
sovran-react-native: e6a9c963a8a6b9ebc3563394c39c30f33ab1453f
Yoga: eddf2bbe4a896454c248a8f23b4355891eb720a6
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 9d352ca8db1e31a063d2585ed47fdadabf87fe90

COCOAPODS: 1.14.3
COCOAPODS: 1.15.2
6 changes: 2 additions & 4 deletions packages/core/src/__tests__/analytics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ describe('SegmentClient', () => {
describe('#reset', () => {
it('resets all userInfo except anonymousId', async () => {
client = new SegmentClient(clientArgs);
const setUserInfo = jest.spyOn(store.userInfo, 'set');

const setUserInfo = jest.spyOn(client.userInfo, 'set');
await client.reset(false);

expect(setUserInfo).toHaveBeenCalledWith({
Expand All @@ -141,8 +140,7 @@ describe('SegmentClient', () => {

it('resets user data, identity, traits', async () => {
client = new SegmentClient(clientArgs);
const setUserInfo = jest.spyOn(store.userInfo, 'set');

const setUserInfo = jest.spyOn(client.userInfo, 'set');
await client.reset();

expect(setUserInfo).toHaveBeenCalledWith({
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ export class SegmentClient {
async alias(newUserId: string) {
// We don't use a concurrency safe version of get here as we don't want to lock the values yet,
// we will update the values correctly when InjectUserInfo processes the change
const { anonymousId, userId: previousUserId } = this.userInfo.get();
const { anonymousId, userId: previousUserId } = this.store.userInfo.get();

const event = createAliasEvent({
anonymousId,
Expand Down Expand Up @@ -695,10 +695,10 @@ export class SegmentClient {

async reset(resetAnonymousId = true) {
try {
const { anonymousId: currentId } = await this.userInfo.get(true);
const { anonymousId: currentId } = await this.store.userInfo.get(true);
const anonymousId = resetAnonymousId === true ? getUUID() : currentId;

await this.userInfo.set({
await this.store.userInfo.set({
anonymousId,
userId: undefined,
traits: undefined,
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/plugin-appsflyer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@segment/analytics-react-native-plugin-appsflyer",
"version": "0.6.0",
"version": "0.7.0",
"description": "The hassle-free way to add Segment analytics to your React-Native app.",
"main": "lib/commonjs/index",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/plugin-branch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@segment/analytics-react-native-plugin-branch",
"version": "1.1.1",
"version": "1.1.2",
"description": "The hassle-free way to add Segment analytics to your React-Native app.",
"main": "lib/commonjs/index",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/plugin-braze/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@segment/analytics-react-native-plugin-braze",
"version": "0.6.1",
"version": "0.7.0",
"description": "The hassle-free way to add Segment analytics to your React-Native app.",
"main": "lib/commonjs/index",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/plugin-facebook-app-events/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@segment/analytics-react-native-plugin-facebook-app-events",
"version": "0.6.1",
"version": "0.7.0",
"description": "The hassle-free way to add Segment analytics to your React-Native app.",
"main": "lib/commonjs/index",
"scripts": {
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6246,11 +6246,11 @@ __metadata:
linkType: hard

"braces@npm:^3.0.2":
version: 3.0.2
resolution: "braces@npm:3.0.2"
version: 3.0.3
resolution: "braces@npm:3.0.3"
dependencies:
fill-range: "npm:^7.0.1"
checksum: 10c0/321b4d675791479293264019156ca322163f02dc06e3c4cab33bb15cd43d80b51efef69b0930cfde3acd63d126ebca24cd0544fa6f261e093a0fb41ab9dda381
fill-range: "npm:^7.1.1"
checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04
languageName: node
linkType: hard

Expand Down Expand Up @@ -8181,12 +8181,12 @@ __metadata:
languageName: node
linkType: hard

"fill-range@npm:^7.0.1":
version: 7.0.1
resolution: "fill-range@npm:7.0.1"
"fill-range@npm:^7.1.1":
version: 7.1.1
resolution: "fill-range@npm:7.1.1"
dependencies:
to-regex-range: "npm:^5.0.1"
checksum: 10c0/7cdad7d426ffbaadf45aeb5d15ec675bbd77f7597ad5399e3d2766987ed20bda24d5fac64b3ee79d93276f5865608bb22344a26b9b1ae6c4d00bd94bf611623f
checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018
languageName: node
linkType: hard

Expand Down

0 comments on commit 30aa3dc

Please sign in to comment.