Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/clear-flowers-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'posthog-react-native': patch
---

fix: React Native on web should report hardware type as Desktop or Mobile, not Web
1 change: 1 addition & 0 deletions examples/example-expo-53/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Or...
```bash
npx expo run:ios
npx expo run:android
npx expo start --web
```

If your RN SDK changes are not picked up:
Expand Down
10 changes: 5 additions & 5 deletions examples/example-expo-53/pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion packages/browser/src/__tests__/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { expect } from '@jest/globals'

import { _base64Encode } from '../utils/encode-utils'
import { getPersonPropertiesHash, propertyComparisons } from '../utils/property-utils'
import { detectDeviceType } from '../utils/user-agent-utils'
import { detectDeviceType } from '@posthog/core'
import { getEventProperties } from '../utils/event-utils'

function userAgentFor(botString: string) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import uaParserDeviceTestCases from './device.test.json'
import { isUndefined } from '@posthog/core'
import uaParserOSTestCases from './os-test.json'
import { detectBrowser, detectBrowserVersion, detectDeviceType, detectOS } from '../../utils/user-agent-utils'
import { detectBrowser, detectBrowserVersion, detectDeviceType, detectOS } from '@posthog/core'

describe('user-agent-utils', () => {
describe('user agent', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
} from '../../utils/survey-utils'
import { isArray, isNullish } from '@posthog/core'

import { detectDeviceType } from '../../utils/user-agent-utils'
import { detectDeviceType } from '@posthog/core'
import { propertyComparisons } from '../../utils/property-utils'
import { PropertyMatchType } from '../../types'
import { prepareStylesheet } from '../utils/stylesheet-loader'
Expand Down
2 changes: 1 addition & 1 deletion packages/browser/src/utils/event-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Properties } from '../types'
import Config from '../config'
import { each, extend, extendArray, stripEmptyProperties } from './index'
import { document, location, userAgent, window } from './globals'
import { detectBrowser, detectBrowserVersion, detectDevice, detectDeviceType, detectOS } from './user-agent-utils'
import { detectBrowser, detectBrowserVersion, detectDevice, detectDeviceType, detectOS } from '@posthog/core'
import { cookieStore } from '../storage'

const URL_REGEX_PREFIX = 'https?://(.*)'
Expand Down
Loading
Loading