Skip to content

feat: migrated from react 18 to react 19 - #1710

Merged
ArushKapoorJuspay merged 5 commits into
mainfrom
feat/react-19-migration
Aug 5, 2026
Merged

feat: migrated from react 18 to react 19#1710
ArushKapoorJuspay merged 5 commits into
mainfrom
feat/react-19-migration

Conversation

@ArushKapoorJuspay

Copy link
Copy Markdown
Collaborator

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Upgrades the embedded HyperSwitch Web SDK and demo application to React 19 and ReScript 12.
The changes are limited to build and runtime compatibility. Submit orchestration, postMessage behavior, state architecture, and resource loading are outside this PR.

Changes

  • Upgraded React and React DOM to 19.2.8.
  • Upgraded ReScript to 12.3.0.
  • Upgraded @rescript/react to 0.15.0.
  • Added @rescript/runtime 12.3.0.
  • Added the ReScript 12 Node requirement.
  • Retained classic JSX mode.
  • Updated ReScript compiler configuration keys.
  • Updated Promise exception normalization for ReScript 12.
  • Updated callback-ref handling for React 19.
  • Updated the demo to React 19 and @juspay-tech/react-hyper-js 2.3.0.
  • Updated CI and release workflows to use a supported Node version and deterministic installation.
  • Preserved existing Jotai Provider isolation.
  • Restored unrelated lockfile changes to minimize the patch.

Compatibility

The following behavior remains unchanged:

  • window.Hyper
  • window.Hyper.init
  • Conditional window.Stripe
  • removeBeforeUnloadEventListeners
  • loadHyper and deprecated loadStripe
  • WordPress-specific loader behavior
  • v1 and v2 SDK APIs
  • Existing Promise exception identity and wrapping behavior

Validation

  • npm ci --ignore-scripts
  • npm run re:clean && npm run re:build
  • npm run build
  • npm run build:v2
  • npm run test:hooks
  • Demo npm ci --ignore-scripts
  • Demo npm run build
  • Demo npm run build:v2
  • Dependency-tree validation with npm ls
  • Focused Promise rejection checks for null, undefined, JavaScript errors, JsExn, and ReScript exceptions
  • git diff --cached --check

How did you test it?

Screenshot 2026-07-27 at 9 06 18 PM

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

@semanticdiff-com

semanticdiff-com Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  .github/workflows/run-automation-test.yml  98% smaller
  package.json  51% smaller
  Hyperswitch-React-Demo-App/package-lock.json  41% smaller
  Hyperswitch-React-Demo-App/package.json  32% smaller
  rescript.json  20% smaller
  package-lock.json  20% smaller
  .github/workflows/stable-release.yml  0% smaller
  .gitignore Unsupported file format
  README.md Unsupported file format
  src/Components/PortalCapture.res Unsupported file format
  src/libraries/Promise.res Unsupported file format
  src/libraries/Promise.resi Unsupported file format

@github-actions

Copy link
Copy Markdown
Contributor

🚫 Missing Linked Issue

Hi 👋 This pull request does not appear to be linked to any open issue yet.

Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically.

✔️ How to fix this

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues.
🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

@XyneSpaces

Copy link
Copy Markdown

[blocking] This React 19/ReScript 12 migration needs to be consolidated with #1712 before merge. Both PRs modify the same migration surface (package.json, lockfiles, rescript.json, PortalCapture.res, and Promise.res) with conflicting dependency/config choices, so merging one first will leave the other resolving conflicts by overwriting migration code rather than reviewing a single coherent upgrade.

Comment thread package.json
Comment thread package.json Outdated
Comment thread package.json
Comment thread rescript.json
LakSHyaMudgal1 added a commit to LakSHyaMudgal1/hyperswitch-web that referenced this pull request Jul 30, 2026
@ArushKapoorJuspay
ArushKapoorJuspay merged commit 1b9545a into main Aug 5, 2026
13 of 15 checks passed
@ArushKapoorJuspay
ArushKapoorJuspay deleted the feat/react-19-migration branch August 5, 2026 16:10
@github-actions github-actions Bot added the Closed Label will be automatically added when the PR will get merged to main label Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Closed Label will be automatically added when the PR will get merged to main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade Web SDK to React 19 and ReScript 12

5 participants