Skip to content

Conversation

@TheUnderScorer
Copy link
Contributor

@TheUnderScorer TheUnderScorer commented Jan 27, 2026

This PR adds official support to Agent V4.

Overview of changes

  • Migrated from Rollup and Jest to Vite + Vitest for improved DX.
  • Updated readme and contribution guide to reflect API changes and link to new docs.
  • Added usePromiseStore to avoid duplicate requests. This functionality was previously provided by the SPA library, but we plan to depreciate it.

@TheUnderScorer TheUnderScorer self-assigned this Jan 27, 2026
@TheUnderScorer TheUnderScorer changed the base branch from main to test January 27, 2026 12:07
@TheUnderScorer TheUnderScorer force-pushed the feature/INTER-1708-agent-v4 branch from 8ffef84 to 437d58a Compare January 27, 2026 12:08
@TheUnderScorer TheUnderScorer force-pushed the feature/INTER-1708-agent-v4 branch from 437d58a to 3f4afaf Compare January 27, 2026 12:10
@github-actions
Copy link

github-actions bot commented Jan 27, 2026

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 84% 105/125
🟡 Branches 69.49% 41/59
🟢 Functions 82.05% 32/39
🟢 Lines 83.61% 102/122

Test suite run success

21 tests passing in 15 suites.

Report generated by 🧪jest coverage report action from 64c0c9c

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🟢 All files 84 69.49 82.05 83.6
🟢  src 88.7 75.86 83.33 88.33
🟢   detect-env.ts 90 83.33 100 90 15,85
🟢   env.ts 100 100 100 100
🟢   env.types.ts 85.71 40 50 83.33 14
🟡   ...nt-context.ts 75 100 0 75 8
🟡   get-env.ts 60 0 100 60 8-9
🟢   ssr.ts 100 100 100 100
🟢   ...sitor-data.ts 95.65 100 80 95.65 100
🟢  src/components 97.05 81.25 100 96.96
🟢   ...-provider.tsx 96.42 78.57 100 96.29 80
🟢   ...vironment.tsx 100 100 100 100
🟡  src/utils 58.62 42.85 63.63 58.62
🟡   ...-is-truthy.ts 50 50 100 50 3
🟡   to-error.ts 66.66 50 100 66.66 6
🟢   use-const.ts 100 50 100 100 4
🟢   ...mise-store.ts 92.3 75 100 92.3 7
🔴   wait-until.ts 0 0 0 0 8-19

@TheUnderScorer TheUnderScorer marked this pull request as ready for review January 27, 2026 13:32
@ilfa ilfa requested a review from Copilot January 27, 2026 14:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the FingerprintJS Pro React SDK to Agent V4, transitioning the build tooling from Rollup and Jest to Vite and Vitest for improved developer experience.

Changes:

  • Migrated build system from Rollup to Vite and test framework from Jest to Vitest
  • Added usePromiseStore hook to deduplicate concurrent API requests
  • Updated documentation links to point to new docs.fingerprint.com domain
  • Renamed FpjsProvider to FpProvider throughout codebase and examples

Reviewed changes

Copilot reviewed 25 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vite.config.ts New Vite build configuration replacing Rollup setup
vitest.config.ts New Vitest test configuration with jsdom environment and Istanbul coverage
src/utils/use-promise-store.ts New hook for deduplicating concurrent requests with same cache key
src/utils/use-const.ts New utility hook for persistent values across renders
src/components/fp-provider.tsx Integration of usePromiseStore to prevent duplicate requests
src/index.ts Changed from wildcard export to named Fp export for agent types
package.json Updated dependencies to Agent V4 and migrated to Vite/Vitest tooling
README.md Updated documentation links and FpProvider references
tests/*.test.tsx Migrated tests from Jest to Vitest syntax

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ilfa
Copy link
Member

ilfa commented Jan 27, 2026

I'm considering whether we should use Fingerprint instead of Fp in naming. Let's discuss.

TheUnderScorer and others added 5 commits January 27, 2026 15:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@TheUnderScorer
Copy link
Contributor Author

I'm considering whether we should use Fingerprint instead of Fp in naming. Let's discuss.

I like this idea, unless anyone objects, let’s do this.

1b6ca6e

@TheUnderScorer TheUnderScorer requested a review from ilfa January 27, 2026 15:31
@github-actions
Copy link

This PR will create a major release 🚀

3.0.0 (2026-01-27)

⚠ BREAKING CHANGES

  • The SDK api has changed to match changes introduced in V4 version of the agent.

Features

  • add usePromiseStore to prevent duplicate async requests (fb59d7f)
  • bump @fingerprint/agent to 4.0.0-beta.5 (c5d217d)
  • migrate to v4 version of the agent (36a26ba)
  • rename package to @fingerprint/react (4714fdf)

Build System

  • deps: use stable 4.0.0 version of the @fingerprint/agent (76a2fec)

@TheUnderScorer TheUnderScorer merged commit e0aad39 into test Jan 27, 2026
9 checks passed
@TheUnderScorer TheUnderScorer deleted the feature/INTER-1708-agent-v4 branch January 27, 2026 16:05
@fingerprint-dx-team
Copy link

🎉 This PR is included in version 3.0.0-test.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@fingerprint-dx-team
Copy link

🎉 This PR is included in version 3.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@fingerprint-dx-team
Copy link

🎉 This PR is included in version 3.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

1 similar comment
@fingerprint-dx-team
Copy link

🎉 This PR is included in version 3.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants