Skip to content

feat: migrate Rokt Pay Plus kit to monorepo (v1.1.0) - #1302

Merged
rmi22186 merged 1 commit into
mainfrom
feat/roktpayplus-kit-migration
Aug 6, 2026
Merged

feat: migrate Rokt Pay Plus kit to monorepo (v1.1.0)#1302
rmi22186 merged 1 commit into
mainfrom
feat/roktpayplus-kit-migration

Conversation

@rmi22186

Copy link
Copy Markdown
Member

Summary

Migrates @mparticle/web-rokt-pay-plus-kit (module ID 184) from its standalone repo into kits/roktpayplus/, matching the TypeScript/Vite/Vitest toolchain established by the Rokt kit migration.

What is Rokt Pay Plus

Rokt Pay+ is a Rokt product that runs inside an iframe on an advertiser's checkout / post-purchase page. This kit is a postMessage bridge: it receives the events the advertiser already logs to mParticle and re-emits them as Pay+ signals (initiated, stepComplete, approved, pending, purchaseCompleted, etc.) to the embedding window. The kit is silent on non-iframed pages — all signals are no-ops when window.parent === window.

Funnel progression is driven by page views; conversions and outcomes are driven by custom events. Everything is configurable via dashboard settings — no Pay+-specific code required in the advertiser's application.

Files

Path Origin
src/RoktPayPlus-Kit.ts Faithful copy from upstream main (v1.1.0)
test/src/RoktPayPlus-Kit.spec.ts Faithful copy from upstream
eslint.config.mjs Faithful copy from upstream
CHANGELOG.md, README.md Faithful copy from upstream
package-lock.json Faithful copy from upstream
package.json Adapted (see below)
vite.config.ts Adapted (see below)
tsconfig.json Adapted (see below)

Monorepo adaptations

package.json

  • @mparticle/web-sdk moved from dependenciespeerDependencies: "^3.0.0" + devDependencies: "^2.73.1" (same pattern as the Rokt kit)
  • Semantic-release devDependencies removed (release is managed at the monorepo level)
  • repository URL updated to point at the monorepo

vite.config.ts

  • rollupOptions.external set to exclude @mparticle/web-sdk from the build output
  • define added for process.env.PACKAGE_VERSION (lockstep version injection)
  • Test alias added:
    • @mparticle/web-sdk/internal../../src/internal-types.ts
    • @mparticle/web-sdk../../dist/mparticle.common.js

tsconfig.json

  • paths added to resolve @mparticle/web-sdk/internal../../src/internal-types.ts for type checking

Test plan

  • npm install && npm run build — builds dist/RoktPayPlus-Kit.{iife,esm,common}.js cleanly
  • npm test — 13/13 Vitest tests pass
  • CI run-kit-tests job passes for kits/roktpayplus

@rmi22186
rmi22186 requested a review from a team as a code owner July 30, 2026 18:25
@cursor

cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Additive new kit and matrix entry; behavior is isolated to optional Pay+ iframe integrations and does not change existing SDK or kit code paths.

Overview
Adds Rokt Pay Plus (kits/roktpayplus, module ID 184) to the web SDK monorepo and registers it in kits/matrix.json so it can ship with the rest of the JS kits.

The new kit is a postMessage bridge for Pay+ iframes: it maps mParticle page views to stepComplete, custom events to configurable Pay+ signals (approved, pending, purchaseCompleted, etc.), and emits initiated on kit init. Messages use { source: 'rokt-payplus-kit', type, detail } to the parent window (no-ops when not embedded).

The migrated package is v1.1.0, including the gwpApprovedEventName dashboard setting for gift-with-purchase conversions (separate from approved). Tooling matches other modern kits (TypeScript, Vite builds, Vitest, ESLint), with @mparticle/web-sdk as a peer dependency and monorepo-specific Vite/tsconfig aliases for local development.

Reviewed by Cursor Bugbot for commit da23ff1. Bugbot is set up for automated code reviews on this repo. Configure here.

@rmi22186
rmi22186 force-pushed the feat/roktpayplus-kit-migration branch from 1d3e3b3 to 453fab1 Compare August 6, 2026 14:01
alexs-mparticle
alexs-mparticle previously approved these changes Aug 6, 2026
@rmi22186
rmi22186 dismissed alexs-mparticle’s stale review August 6, 2026 14:20

The merge-base changed after approval.

@rmi22186
rmi22186 force-pushed the workstation/3.0-release-3 branch from 288ee82 to 822c819 Compare August 6, 2026 14:20
@rmi22186
rmi22186 force-pushed the feat/roktpayplus-kit-migration branch from 453fab1 to da23ff1 Compare August 6, 2026 14:35
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
13.0% Duplication on New Code (required ≤ 3%)
D Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@rmi22186
rmi22186 changed the base branch from workstation/3.0-release-3 to main August 6, 2026 14:38
@rmi22186
rmi22186 merged commit fa8bc1a into main Aug 6, 2026
60 of 66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants