Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"changelog": [
"@fingerprintjs/changesets-native-dependency-format",
{
"repo": "fingerprintjs/fingerprintjs-pro-react-native",
"repo": "fingerprintjs/react-native",
"androidPath": "sdk/android",
"iosPodspecPath": "sdk/RNFingerprintjsPro.podspec",
"packageName": "fingerprintjs-pro-react-native"
"iosPodspecPath": "sdk/RNFingerprint.podspec",
"packageName": "@fingerprint/react-native"
}
],
"commit": false,
Expand Down
2 changes: 1 addition & 1 deletion .changeset/new-architecture-support.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@fingerprintjs/fingerprintjs-pro-react-native': major
'@fingerprint/react-native': major
---

Dropped React Native Old Architecture support. The native module is now a TurboModule (New Architecture only) exposed via a Codegen spec.
Expand Down
2 changes: 1 addition & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"mode": "pre",
"tag": "rc",
"initialVersions": {
"@fingerprintjs/fingerprintjs-pro-react-native": "3.17.0"
"@fingerprint/react-native": "3.17.0"
},
"changesets": [
"new-architecture-support"
Expand Down
2 changes: 1 addition & 1 deletion .changeset/spm-support.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@fingerprintjs/fingerprintjs-pro-react-native': minor
'@fingerprint/react-native': minor
---

Added experimental support for [Swift Package Manager](https://swift.org/package-manager/). The library now ships with its own `Package.swift`.
Expand Down
14 changes: 7 additions & 7 deletions .changeset/v4-api-migration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@fingerprintjs/fingerprintjs-pro-react-native': major
'@fingerprint/react-native': major
---

Migrated the SDK to Fingerprint API v4 and realigned the public API with `@fingerprint/react`. This is a breaking change on every platform (web, iOS, Android).
Expand Down Expand Up @@ -50,8 +50,8 @@ Migrated the SDK to Fingerprint API v4 and realigned the public API with `@finge
**Provider**

```diff
- import { FingerprintJsProProvider } from '@fingerprintjs/fingerprintjs-pro-react-native'
+ import { FingerprintProvider } from '@fingerprintjs/fingerprintjs-pro-react-native'
- import { FingerprintJsProProvider } from '@fingerprint/react-native'
+ import { FingerprintProvider } from '@fingerprint/react-native'

- <FingerprintJsProProvider apiKey="PUBLIC_API_KEY" region="eu">
+ <FingerprintProvider apiKey="PUBLIC_API_KEY" region="eu">
Expand Down Expand Up @@ -79,8 +79,8 @@ Migrated the SDK to Fingerprint API v4 and realigned the public API with `@finge
**Imperative client**

```diff
- import { FingerprintJsProAgent } from '@fingerprintjs/fingerprintjs-pro-react-native'
+ import { start } from '@fingerprintjs/fingerprintjs-pro-react-native'
- import { FingerprintJsProAgent } from '@fingerprint/react-native'
+ import { start } from '@fingerprint/react-native'

- const client = new FingerprintJsProAgent({ apiKey: 'PUBLIC_API_KEY', region: 'eu' })
- const visitorId = await client.getVisitorId()
Expand Down Expand Up @@ -110,8 +110,8 @@ Migrated the SDK to Fingerprint API v4 and realigned the public API with `@finge
**Errors**

```diff
- import { TooManyRequestError } from '@fingerprintjs/fingerprintjs-pro-react-native'
+ import { isFingerprintError } from '@fingerprintjs/fingerprintjs-pro-react-native'
- import { TooManyRequestError } from '@fingerprint/react-native'
+ import { isFingerprintError } from '@fingerprint/react-native'

try {
await fp.get()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
REACT_NATIVE_VERSION: ${{ matrix.react-native }}

- name: Install ${{github.event.release.tag_name}} version of the package
run: pnpm add @fingerprintjs/fingerprintjs-pro-react-native@${{github.event.release.tag_name}}
run: pnpm add @fingerprint/react-native@${{github.event.release.tag_name}}
if: github.event_name == 'release'
working-directory: e2e-app

Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:
REACT_NATIVE_VERSION: ${{ matrix.react-native }}

- name: Install ${{github.event.release.tag_name}} version of the package
run: pnpm add @fingerprintjs/fingerprintjs-pro-react-native@${{github.event.release.tag_name}}
run: pnpm add @fingerprint/react-native@${{github.event.release.tag_name}}
if: github.event_name == 'release'
working-directory: e2e-app

Expand Down Expand Up @@ -410,7 +410,7 @@ jobs:
working-directory: e2e-app

- name: Install ${{github.event.release.tag_name}} version of the package
run: pnpm add @fingerprintjs/fingerprintjs-pro-react-native@${{github.event.release.tag_name}}
run: pnpm add @fingerprint/react-native@${{github.event.release.tag_name}}
if: github.event_name == 'release'
working-directory: e2e-app

Expand Down
2 changes: 1 addition & 1 deletion BareRNSPMTest/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// but it doesn't work nicely with older RN versions that we also run tests against, so keep SafeAreaView import from react-native for now
/* eslint-disable */
import { Pressable, SafeAreaView, Text, View } from 'react-native'
import { FingerprintProvider, isFingerprintError, useVisitorData } from '@fingerprintjs/fingerprintjs-pro-react-native'
import { FingerprintProvider, isFingerprintError, useVisitorData } from '@fingerprint/react-native'
import { useEffect } from 'react'
import { API_KEY } from '@env'
function InnerApp() {
Expand Down
10 changes: 5 additions & 5 deletions BareRNSPMTest/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,7 @@ PODS:
- React-utils (= 0.87.1)
- ReactNativeDependencies
- ReactNativeDependencies (0.87.1)
- RNFingerprintjsPro (1.0.4):
- RNFingerprint (1.0.4):
- Fingerprint-iOS (~> 4.0)
- hermes-engine
- RCTRequired
Expand Down Expand Up @@ -1788,7 +1788,7 @@ DEPENDENCIES:
- ReactCodegen (from `build/generated/ios/ReactCodegen`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- ReactNativeDependencies (from `../node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec`)
- "RNFingerprintjsPro (from `../node_modules/@fingerprintjs/fingerprintjs-pro-react-native`)"
- "RNFingerprint (from `../node_modules/@fingerprint/react-native`)"
- SocketRocket (from `build/rndeps-facades/SocketRocket`)
- Yoga (from `build/rncore-facades/Yoga`)

Expand Down Expand Up @@ -1966,8 +1966,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon"
ReactNativeDependencies:
:podspec: "../node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec"
RNFingerprintjsPro:
:path: "../node_modules/@fingerprintjs/fingerprintjs-pro-react-native"
RNFingerprint:
:path: "../node_modules/@fingerprint/react-native"
SocketRocket:
:path: build/rndeps-facades/SocketRocket
Yoga:
Expand Down Expand Up @@ -2059,7 +2059,7 @@ SPEC CHECKSUMS:
ReactCodegen: c5a9b8634e580167b9ca4a175749a30d27dbcf0e
ReactCommon: 749169e12aa3461a3df3656a00e48dbe0456b2d6
ReactNativeDependencies: 94c922c39e0e6150ee9ad05e2ca1946e0ef55783
RNFingerprintjsPro: fff5c717067a9ff7fea035f253f384e1683b8ec2
RNFingerprint: fff5c717067a9ff7fea035f253f384e1683b8ec2
SocketRocket: 37aec555668fb852ec12e3c0de59a86ca58f0871
Yoga: d1c536142c5ff8ec8cd856ab2a7c227a1d875c8e

Expand Down
2 changes: 1 addition & 1 deletion BareRNSPMTest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"start": "react-native start"
},
"dependencies": {
"@fingerprintjs/fingerprintjs-pro-react-native": "../sdk",
"@fingerprint/react-native": "../sdk",
"@react-native/new-app-screen": "0.87.1",
"react": "19.2.3",
"react-native": "0.87.1"
Expand Down
2 changes: 1 addition & 1 deletion BareRNSPMTest/pnpm-lock.yaml

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

38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
</a>
</p>
<p align="center">
<a href="https://fingerprintjs.github.io/fingerprintjs-pro-react-native/coverage/">
<img src="https://fingerprintjs.github.io/fingerprintjs-pro-react-native/coverage/badges.svg" alt="coverage">
<a href="https://fingerprintjs.github.io/react-native/coverage/">
<img src="https://fingerprintjs.github.io/react-native/coverage/badges.svg" alt="coverage">
</a>
<a href="https://www.npmjs.com/package/@fingerprintjs/fingerprintjs-pro-react-native">
<img src="https://img.shields.io/npm/v/@fingerprintjs/fingerprintjs-pro-react-native.svg?style=flat" alt="Current NPM version"/>
<a href="https://www.npmjs.com/package/@fingerprint/react-native">
<img src="https://img.shields.io/npm/v/@fingerprint/react-native.svg?style=flat" alt="Current NPM version"/>
</a>
<a href="https://www.npmjs.com/package/@fingerprintjs/fingerprintjs-pro-react-native">
<img src="https://img.shields.io/npm/dm/@fingerprintjs/fingerprintjs-pro-react-native.svg" alt="Monthly downloads from NPM">
<a href="https://www.npmjs.com/package/@fingerprint/react-native">
<img src="https://img.shields.io/npm/dm/@fingerprint/react-native.svg" alt="Monthly downloads from NPM">
</a>
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/:license-mit-blue.svg?style=flat"/>
</a>
<a href="https://discord.gg/39EpE2neBg">
<img src="https://img.shields.io/discord/852099967190433792?style=logo&label=Discord&logo=Discord&logoColor=white" alt="Discord server">
</a>
<a href="https://fingerprintjs.github.io/fingerprintjs-pro-react-native/">
<a href="https://fingerprintjs.github.io/react-native/">
<img src="https://img.shields.io/badge/-Documentation-green" alt="Discord server">
</a>
</p>
Expand Down Expand Up @@ -80,18 +80,18 @@ Install the package using your favorite package manager:
- [NPM](https://npmjs.org):

```shell
npm install @fingerprintjs/fingerprintjs-pro-react-native --save
npm install @fingerprint/react-native --save
```

- [Yarn](https://yarnpkg.com):

```shell
yarn add @fingerprintjs/fingerprintjs-pro-react-native
yarn add @fingerprint/react-native
```

- [PNPM](https://pnpm.js.org):
```shell
pnpm add @fingerprintjs/fingerprintjs-pro-react-native
pnpm add @fingerprint/react-native
```

## Expo setup
Expand Down Expand Up @@ -127,7 +127,7 @@ Then, use the SDK as you would with the native version.
{
"expo": {
"plugins": [
"@fingerprintjs/fingerprintjs-pro-react-native"
"@fingerprint/react-native"
]
}
}
Expand Down Expand Up @@ -191,7 +191,7 @@ Configure the SDK by wrapping your application in `FingerprintProvider`.
// src/index.js
import React from 'react';
import { AppRegistry } from 'react-native';
import { FingerprintProvider } from '@fingerprintjs/fingerprintjs-pro-react-native';
import { FingerprintProvider } from '@fingerprint/react-native';
import App from './App';
import { name as appName } from './app.json';

Expand All @@ -210,7 +210,7 @@ Use the `useVisitorData` hook in your components to perform visitor identificati
// src/App.js
import React from 'react'
import {Button, SafeAreaView, Text, View} from 'react-native'
import {useVisitorData} from '@fingerprintjs/fingerprintjs-pro-react-native'
import {useVisitorData} from '@fingerprint/react-native'

export default function App() {
const {isLoading, isFetched, error, data, getData} = useVisitorData()
Expand Down Expand Up @@ -251,7 +251,7 @@ Create a client with `start()` and call `get()`:

```javascript
import React, { useEffect } from 'react';
import { start } from '@fingerprintjs/fingerprintjs-pro-react-native';
import { start } from '@fingerprint/react-native';

// ...

Expand All @@ -272,7 +272,7 @@ useEffect(() => {
Inside the React tree you can also get the same client from context with the `useFingerprint()` hook:

```javascript
import { useFingerprint } from '@fingerprintjs/fingerprintjs-pro-react-native';
import { useFingerprint } from '@fingerprint/react-native';

const fp = useFingerprint();
const result = await fp.get({ linkedId: 'user_1234' });
Expand All @@ -298,7 +298,7 @@ Every failure is thrown as a single `FingerprintError` carrying a machine-friend
`too_many_requests`) and a resolution-oriented `message`:

```javascript
import { isFingerprintError } from '@fingerprintjs/fingerprintjs-pro-react-native';
import { isFingerprintError } from '@fingerprint/react-native';

try {
await fp.get();
Expand Down Expand Up @@ -361,7 +361,7 @@ return (

## API Reference

See the full [generated API Reference](https://fingerprintjs.github.io/fingerprintjs-pro-react-native/).
See the full [generated API Reference](https://fingerprintjs.github.io/react-native/).

## Additional Resources

Expand All @@ -371,9 +371,9 @@ See the full [generated API Reference](https://fingerprintjs.github.io/fingerpri
## Support and feedback

To report problems, ask questions or provide feedback, please
use [Issues](https://github.com/fingerprintjs/fingerprintjs-pro-react-native/issues). If you need private support,
use [Issues](https://github.com/fingerprintjs/react-native/issues). If you need private support,
please email us at `oss-support@fingerprint.com`.

## License

This project is licensed under the [MIT license](https://github.com/fingerprintjs/fingerprintjs-pro-react-native/blob/main/LICENSE).
This project is licensed under the [MIT license](https://github.com/fingerprintjs/react-native/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion e2e-app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// but it doesn't work nicely with older RN versions that we also run tests against, so keep SafeAreaView import from react-native for now
/* eslint-disable @typescript-eslint/no-deprecated */
import { Pressable, SafeAreaView, Text, View } from 'react-native'
import { FingerprintProvider, isFingerprintError, useVisitorData } from '@fingerprintjs/fingerprintjs-pro-react-native'
import { FingerprintProvider, isFingerprintError, useVisitorData } from '@fingerprint/react-native'
import { testIds } from '@/e2e/ids'
import { useEffect } from 'react'
import { testTags } from '@/e2e/tags'
Expand Down
2 changes: 1 addition & 1 deletion e2e-app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const config: ExpoConfig = {
package: 'com.fingerprint.e2eapp',
},
plugins: [
'@fingerprintjs/fingerprintjs-pro-react-native',
'@fingerprint/react-native',
[
'expo-build-properties',
{
Expand Down
2 changes: 1 addition & 1 deletion e2e-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"dependencies": {
"@expo/config": "^57.0.3",
"@expo/metro-runtime": "~57.0.3",
"@fingerprintjs/fingerprintjs-pro-react-native": "../sdk",
"@fingerprint/react-native": "../sdk",
"@fingerprint/agent": "^4.1.3",
"dotenv": "^16.4.7",
"expo": "57.0.4",
Expand Down
2 changes: 1 addition & 1 deletion e2e-app/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 e2e-app/src/config.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Region } from '@fingerprintjs/fingerprintjs-pro-react-native'
import { Region } from '@fingerprint/react-native'

export type Config = {
apiKey: string
Expand Down
2 changes: 1 addition & 1 deletion e2e-app/src/config.web.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Config } from '@/src/config.types'
import { Region } from '@fingerprintjs/fingerprintjs-pro-react-native'
import { Region } from '@fingerprint/react-native'

const search = new URLSearchParams(window.location.search)

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "fingerprintjs-pro-react-native",
"name": "fingerprint-react-native",
"version": "0.0.0",
"private": true,
"packageManager": "pnpm@11.5.1",
Expand All @@ -20,7 +20,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/fingerprintjs/fingerprintjs-pro-react-native.git"
"url": "git+https://github.com/fingerprintjs/react-native.git"
},
"author": "FingerprintJS, Inc (https://fingerprint.com)",
"license": "MIT",
Expand Down
Loading
Loading