Skip to content

chore(deps): update SDK dependencies and clean implementation installs - #572

Merged
Charles Hudson (phobetron) merged 1 commit into
mainfrom
chore/update-dependencies-and-clean-installs
Oct 27, 2026
Merged

Charles Hudson (phobetron) merged 1 commit into
mainfrom
chore/update-dependencies-and-clean-installs

Conversation

@phobetron

Copy link
Copy Markdown
Collaborator

Summary

Newer es-toolkit merge types expose a widened string in the React Native SDK's default event-builder configuration, causing typecheck and declaration-build failures. Give those defaults the existing public EventBuilderConfig type before merging them. This preserves the closed channel union and existing runtime behavior without casts or as const.

Update the workspace catalog and applicable implementation manifests to the newest stable releases published more than 24 hours before selection:

Dependency Previous Updated Published (UTC)
es-toolkit 1.46.0 1.53.0 October 24, 2026
happy-dom 20.14.5 21.0.4 October 20, 2026
@playwright/test 1.63.0 1.64.1 October 14, 2026

Playwright is updated in the shared browser-test catalog and both standalone Node implementations. Regenerate the root lockfile; pnpm also consolidates existing compatible resolutions of jiti, @types/node, and @babel/runtime. Node remains 26.12.1 in both .nvmrc and the workspace configuration.

Implementation installation

Make implementation:install remove the target implementation's node_modules before installing. When the implementation declares Next.js, also remove .next so compiled output cannot retain the previous SDK. Cleanup runs after local tarball preparation succeeds, applies only to the selected implementation, and preserves .env and source files.

Document the cleanup and the requirement to run pnpm build:pkgs after SDK source changes in CONTRIBUTING.md.

Validation

  • Workspace typecheck and lint passed.
  • Package unit suites passed: 1,366 tests, including the Web, React Web, and Next.js suites using happy-dom 21.0.4.
  • Clean pnpm build:pkgs, aggregate pnpm size:report, and pnpm size:check passed with existing budgets.
  • All implementation typechecks and implementation lint passed.
  • Compared 2,669 installed SDK distribution files across ten JavaScript implementations with freshly packed tarballs, including transitive SDK dependencies: all matched.
  • Verified the updated install command removes stale markers from node_modules and .next, preserves the existing .env hash, and installs matching App Router SDK artifacts. The helper passed lint and TypeScript checks.
  • Pages Router variant-resolution.spec.ts passed all 27 tests across Chromium, Firefox, and WebKit. Other Web and native E2E suites were not run.
  • Formatting and SDK knowledge validation passed. The pre-push build, affected typechecks, and unit tests also passed.

Compatibility note

Rstest 0.12.0 declares a happy-dom peer range of ^20.8.3; the newest Rstest release eligible under the same 24-hour cutoff still excludes happy-dom 21. The peer warning remains visible. The three affected browser SDK test suites passed against happy-dom 21.0.4; no peer override or warning suppression was added.

@bito-code-review

bito-code-review Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Code Review Agent Run #56d989

Actionable Suggestions - 0
Review Details
  • Files reviewed - 6 · Commit Range: d0fe921..d0fe921
    • CONTRIBUTING.md
    • implementations/node-sdk+web-sdk/package.json
    • implementations/node-sdk/package.json
    • packages/react-native-sdk/src/ContentfulOptimization.ts
    • pnpm-workspace.yaml
    • scripts/run-implementation-script.ts
  • Files skipped - 1
    • pnpm-lock.yaml - Reason: Filter setting
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • GITHUB_ADVISORY (Security Vulnerability) - ✔︎ Successful
    • OWASP (Security Vulnerability) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers an incremental AI Review.

  • /review full - Manually triggers a full AI Review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at jared.jolton@contentful.com.

Documentation & Help

AI Code Review powered by Bito Logo

@phobetron
Charles Hudson (phobetron) force-pushed the chore/update-dependencies-and-clean-installs branch 2 times, most recently from 6fa2fea to b2701b2 Compare October 27, 2026 12:09
@bito-code-review

bito-code-review Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Impact Analysis by Bito

Cross-Repository Impact Analysis
What Changed Impact of Change Suggested Review Actions
The requested repository dependency-graph lookup failed because the repository name was not found; organization-wide consumer verification was unavailable. - verify-needed: optimization repository consumers and package consumers: The lockfile and shared workspace dependency catalog change, but no cross-repo graph or search results are available to confirm consumers. - Retry the repository lookup using the exact indexed repository name and inspect incoming and outgoing dependencies.
- Confirm downstream projects tolerate the Playwright, happy-dom, es-toolkit, and zod version updates.
Code Paths Analyzed

Impact:
The PR documents and implements a cleaner implementation-install workflow, raises selected workspace dependencies, adjusts Web SDK bundle-size budgets, and makes a small React Native event-builder refactor. The local helper removes generated dependency/build directories before reinstalling.

Flow:
implementation:install action → read implementation config → ensure local package tarballs → remove node_modules and optionally .next → run pnpm install. React Native config merge constructs EventBuilderConfig and merges it with storage defaults and logging configuration.

Direct Changes (Diff Files):
• CONTRIBUTING.md [9-11] — Documents directory cleanup on implementation install and recommends rebuilding local package tarballs after SDK source changes.
• implementations/node-sdk+web-sdk/package.json [25-26] — Updates Playwright test dependency from 1.63.0 to 1.64.1.
• implementations/node-sdk/package.json [39-40] — Updates Playwright test dependency from 1.63.0 to 1.64.1.
• packages/react-native-sdk/src/ContentfulOptimization.ts [53-79] — Extracts event builder config into a typed local variable before merging; retains mobile channel and platform-specific library metadata.
• packages/web/web-sdk/package.json [92-102] — Raises gzip budgets for the web UMD bundle and web-components UMD bundle.
• pnpm-lock.yaml [109-1516] — Refreshes workspace resolution for catalog packages and transitive dependencies, including Playwright, Node types, happy-dom, es-toolkit, and zod.
• pnpm-workspace.yaml [1520-1551] — Updates shared catalog versions for Playwright, es-toolkit, happy-dom, and zod.
• scripts/run-implementation-script.ts [1556-1627] — Adds Next.js detection, removes generated directories before implementation installs, and passes implementation config to the install action.

Repository Impact:
• Implementation install tooling: Install now deletes generated state before pnpm runs; Next.js implementations additionally lose .next.
• React Native SDK configuration: The event builder is typed explicitly; configuration values appear preserved.
• Web SDK bundle-size checks: Increased gzip budgets may permit larger generated UMD bundles.
• Workspace dependency resolution and tests: Shared catalog and lockfile changes affect workspace installs and test environments.

Cross-Repository Dependencies:
• Optimization repository consumers and projects using its SDK packages: Potential dependency and bundle-output effects require consumer validation; dependency graph lookup did not resolve the repository.

Database/Caching Impact:
• None

API Contract Violations:
• No network API, schema, or exported SDK signature change is evident in the inspected diff. The install helper signature change appears internal to the script.

Infrastructure Dependencies:
• pnpm workspace catalog and lockfile determine dependency versions for package installation and CI.
• The install script recursively removes implementation-local node_modules and, for Next.js, .next; verify this cleanup is scoped to the intended implementation directory.

Additional Insights:
• Bundle-size enforcement: The gzip budgets increase by 2,200 bytes for each named UMD bundle; verify this is a deliberate threshold update rather than masking unexpected growth.

Testing Recommendations

Frontend Impact:
• Run the web SDK build and verify the generated contentful-optimization-web.umd.js and contentful-optimization-web-components.umd.js gzip sizes against their updated budgets.

Service Integration:
• Exercise implementation:install for a Next.js implementation and a non-Next.js implementation; verify pnpm install runs after cleanup and only the intended target directories are removed.

Data Serialization:
• Run React Native SDK tests covering config merge and confirm event metadata remains channel=mobile with the expected platform-specific library name and version.

Privacy Compliance:
• None.

Backward Compatibility:
• Verify SDK package build, typecheck, and tests after lockfile dependency refresh; ensure local package tarballs remain available when installation runs.

OAuth Functionality:
• None

Cross-Service Communication:
• Check workspace package builds and relevant consumer tests after the shared catalog and lockfile updates.

Reliability Testing:
• None

Additional Insights:
• Run pnpm install in frozen-lockfile mode, then the affected package test suites with the resolved Playwright 1.64.1, happy-dom 21.0.4, es-toolkit 1.53.0, and zod 4.6.7.

Analysis based on known dependency patterns and edges. Actual impact may vary.

@bito-code-review

Copy link
Copy Markdown

✅ Review Settings Overridden

Status: Overridden Successfully

Guidelines:

  • Accepted:

    • General : Review Posture, Repo Truth And Boundaries, Domain Invariants

    • Language : typescript= TypeScript Review Evidence

Note: Extra guidelines beyond 3 general purpose guidelines and 1 language specific guideline per language are not processed. Guidelines are fetched from the source branch.

bito-code-review[bot]
bito-code-review Bot previously approved these changes Oct 27, 2026
@bito-code-review

bito-code-review Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Code Review Agent Run #ff9b58

Actionable Suggestions - 0
Review Details
  • Files reviewed - 6 · Commit Range: b2701b2..b2701b2
    • CONTRIBUTING.md
    • implementations/node-sdk+web-sdk/package.json
    • implementations/node-sdk/package.json
    • packages/react-native-sdk/src/ContentfulOptimization.ts
    • pnpm-workspace.yaml
    • scripts/run-implementation-script.ts
  • Files skipped - 1
    • pnpm-lock.yaml - Reason: Filter setting
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • OWASP (Security Vulnerability) - ✔︎ Successful
    • GITHUB_ADVISORY (Security Vulnerability) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers an incremental AI Review.

  • /review full - Manually triggers a full AI Review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at jared.jolton@contentful.com.

Documentation & Help

AI Code Review powered by Bito Logo

@bito-code-review

bito-code-review Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Code Review Agent Run #1bc7dc

Actionable Suggestions - 0
Review Details
  • Files reviewed - 7 · Commit Range: 30c84c6..30c84c6
    • CONTRIBUTING.md
    • implementations/node-sdk+web-sdk/package.json
    • implementations/node-sdk/package.json
    • packages/react-native-sdk/src/ContentfulOptimization.ts
    • packages/web/web-sdk/package.json
    • pnpm-workspace.yaml
    • scripts/run-implementation-script.ts
  • Files skipped - 1
    • pnpm-lock.yaml - Reason: Filter setting
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • OWASP (Security Vulnerability) - ✔︎ Successful
    • GITHUB_ADVISORY (Security Vulnerability) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers an incremental AI Review.

  • /review full - Manually triggers a full AI Review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at jared.jolton@contentful.com.

Documentation & Help

AI Code Review powered by Bito Logo

@phobetron
Charles Hudson (phobetron) merged commit b8434be into main Oct 27, 2026
45 of 77 checks passed
@phobetron
Charles Hudson (phobetron) deleted the chore/update-dependencies-and-clean-installs branch October 27, 2026 13:54
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.

1 participant