Repository navigation
Conversation
Coverage report
Test suite run success43 tests passing in 15 suites. Report generated by 🧪jest coverage report action from 18361f6 Show full coverage report
|
dcfeea8 to
f8764cb
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The supplied changes have no identified blocking issues, but the large lockfile change described in the PR remains unreviewed.
No open issues 🎉
What changed in this PR
This PR adds tags support to the React SDK while preserving the deprecated tag option, aligning the SDK with the agent’s tagging API.
Changes:
- Include
tagsin cache keys, with regression tests for request deduplication and automatic refetching. - Require
@fingerprint/agentversion^4.1.6. - Update documentation and the sign-in example to use
tags, and add a minor-release changeset.
| File | Description |
|---|---|
src/utils/get-options-cache-key.ts |
Include tags in request cache keys. |
README.md |
Document tags, legacy tag support, and precedence. |
package.json |
Raise the minimum agent version to 4.1.6. |
examples/create-react-app/src/shared/pages/SignInPage.tsx |
Switch the sign-in form to tags. |
.changeset/tags-option-support.md |
Record the feature for a minor release. |
__tests__/use-visitor-data.test.tsx |
Test deduplication and refetching with different tags. |
Review effort: Balanced
TheUnderScorer
left a comment
There was a problem hiding this comment.
LGTM, left just one suggestion, thanks!
| '@fingerprint/react': minor | ||
| --- | ||
|
|
||
| Support `tags` in `useVisitorData` and deprecate `tag`. Bump `@fingerprint/agent` dependency to `^4.1.6`. |
There was a problem hiding this comment.
nit: for clarity, consider moving "Bump @fingerprint/agent dependency to ^4.1.6." note to a separate changeset
There was a problem hiding this comment.
Thanks for the call out! Updated here: #216 (comment)
18361f6
First PR as a part of INTER-2456. We're looking to standardize usage of
tagsacross SDKs. We will ensure thattagkeeps working, andtagswins if both are passed.The lockfile change is pretty large, but the only change from this PR is
@fingerprint/agent4.1.2 → 4.1.6. The rest is explained in the PR description in #214. Whichever of the two merges second will need to regenerate the lockfile.Changes:
@fingerprint/agent4.1.6 or later sotagsis inGetOptionstagsto the options cache key. Without it, changingtagsdidn't trigger a new request and calls with differenttagswere deduplicatedcreate-react-appexample to usetags, with a note thattagis deprecatedTesting:
tagstriggers a new request, and calls with differenttagsaren't deduplicated. Both failed before the fixtagtests still passcreate-react-app,nextandnext-appDirexamples locally