INTER-2492: Remove postinstall script and detect framework at runtime - #211
Merged
Merged
Conversation
pnpm 10+ blocks install scripts by default, so pnpm users hit `ERR_PNPM_IGNORED_BUILDS` and got no framework info in `integrationInfo` at all. The script only stamped the framework name and version into the published bundle, and runtime detection already existed as the fallback. React now reports an exact version it previously lacked, so `integrationInfo` goes from `react-sdk/<sdk>/react` to `react-sdk/<sdk>/react/<react>`. Next.js is unchanged. Preact reports no version, since preact exposes none at runtime. Related-Task: INTER-2492
Contributor
Coverage report
Test suite run success41 tests passing in 15 suites. Report generated by 🧪jest coverage report action from 35454c7 Show full coverage report
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The install-time mechanism is cleanly removed, and the runtime behavior is consistently implemented and tested.
Pull request overview
Removes install-time framework stamping and performs framework/version detection at runtime, avoiding pnpm 10 ignored-build warnings.
Changes:
- Removes the postinstall detection script and generated environment modules.
- Reports the runtime React version while leaving Next.js and Preact behavior intact.
- Updates tests and release notes for the new analytics format.
File summaries
| File | Description |
|---|---|
.changeset/lucky-donuts-repeat.md |
Documents the minor release behavior change. |
package.json |
Removes the postinstall script and scripts package content. |
scripts/detect-env.js |
Deletes install-time framework detection. |
src/get-env.ts |
Removes build-time environment parsing. |
src/env.ts |
Removes the build-time placeholder. |
src/env.types.ts |
Removes the obsolete environment validator. |
src/detect-env.ts |
Adds runtime React version reporting. |
src/components/with-environment.tsx |
Uses runtime detection directly. |
__tests__/detect-env.test.ts |
Updates runtime detection expectations. |
__tests__/fpjs-provider.test.tsx |
Verifies React version in integration metadata. |
__tests__/with-environment.preact.test.tsx |
Verifies Preact reports no compatibility version. |
Review details
- Files reviewed: 11/11 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
erayaydin
marked this pull request as ready for review
September 11, 2026 03:32
erayaydin
requested review from
JuroUhlar,
TheUnderScorer,
ilfa and
mcnulty-fp
as code owners
September 11, 2026 03:32
TheUnderScorer
previously approved these changes
Sep 11, 2026
TheUnderScorer
left a comment
Contributor
There was a problem hiding this comment.
Looks good, thanks! I left just one suggestion regarding the changeset.
Contributor
🚀 Following releases will be created using changesets from this PR:@fingerprint/react@3.2.0Minor Changes
|
JuroUhlar
approved these changes
Sep 14, 2026
TheUnderScorer
approved these changes
Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pnpm 10+ blocks install scripts by default, so pnpm users hit:
and silently got no framework info in
integrationInfoat all. The script only stamped the framework name and version into the published bundle.With this change also:
integrationInfofor React apps goes fromreact-sdk/<sdk>/reacttoreact-sdk/<sdk>/react/<react>. Next.js is unchanged. Preact reports no version.Preact
Preact exposes no version at runtime, so this drops exact Preact versions from analytics. For now, going with name-only.