Skip to content

⬆️ Upgrade dependency react-native-view-shot to v5#137

Closed
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/react-native-view-shot-5.x
Closed

⬆️ Upgrade dependency react-native-view-shot to v5#137
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/react-native-view-shot-5.x

Conversation

@renovate

@renovate renovate Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
react-native-view-shot 4.0.35.1.0 age confidence

Release Notes

gre/react-native-view-shot (react-native-view-shot)

v5.1.0

Compare Source

Highlights

iOS
  • iOS 17 compatibility: migrated to UIGraphicsImageRenderer (fixes deprecated APIs).
  • New XCTest target with releaseCapture + encoding tests.
Android
  • Fix: snapshotContentContainer now correctly captures off-screen content.
  • Expanded JUnit coverage for static / package helpers.
Windows
  • Working example-windows on RNW 0.76.17 with full demo screen suite (Basic, FS, FullScreen, Image, Modal, Rendering, ScrollView, StyleFilters, Transparency).
  • Native module fixes (RNViewShotModule, ViewShot, Helpers).
  • New native C# unit tests (RNViewShot.Tests).
  • CI: real Windows build + dotnet unit tests on GitHub Actions, app package uploaded as artifact.
Examples / Tests
  • New style-filters repro screen (#​578).
  • New snapshotContentContainer ScrollView capture demo.
  • All Detox e2e specs wired into CI via Jest testMatch.

Full Changelog: gre/react-native-view-shot@v5.0.1...v5.1.0

v5.0.1

Compare Source

Patch release fixing an Android crash that hit users capturing GL / SurfaceView / TextureView roots directly.

What changed

  • fix(android) Guard applyTransformations against NullPointerException and ClassCastException when the captured view is itself a non-ViewGroup (e.g. a SurfaceView captured directly with handleGLSurfaceView: true). The original parent walk ran past root and either dereferenced a null parent or tried to cast a ViewRootImpl to View. The walk is now extracted into a walkAncestors helper that short-circuits when child == root, stops on null, and stops on non-View ViewParent. Closes #​488. (#​631)
  • test(android) First JUnit + Mockito unit tests for the library, wired into the existing build-android CI job via ./gradlew :react-native-view-shot:testDebugUnitTest. Covers the three failure modes plus happy paths. (#​631)

Contributors

Full changelog: gre/react-native-view-shot@v5.0.0...v5.0.1

v5.0.0

Compare Source

First stable release of the 5.x line. This is a major version bump covering the New Architecture migration, a project-wide cleanup, and a long list of cross-platform fixes accumulated since v4.0.3. If you're upgrading from 4.x, please read the Breaking changes section below.

Highlights

  • New Architecture (Fabric + TurboModules) supported across iOS, Android, Web, Windows.
  • React Native peer dep bumped to >=0.76.0. Tested up to 0.84.1.
  • JS/TS layer migrated to TypeScript (src/ is now .ts/.tsx).
  • Android capture path hardened: view.draw() and view resolution now run on the UIManager queue with a hard timeout, cancellation, exception propagation, and a CAS-based bitmap pool handoff so canvas-backing bitmaps cannot be recycled mid-draw.
  • iOS updated for RCTScrollView removal in RN 0.84 (runtime UIScrollView detection covering both Paper and Fabric), plus a Privacy Manifest.
  • Web got several fixes around captureRef, JPG output, releaseCapture, and CORS image handling.
  • Example apps rebooted with 11 organized test screens; new Expo example added; new Detox + Playwright E2E coverage; CI now builds downloadable example APK.

Breaking changes

  • Minimum React Native is 0.76.0. Lower versions are no longer supported.
  • The library is now built from TypeScript. The public API is unchanged but generated .d.ts files now ship alongside lib/ (the package.json main still points to lib/index.js, the react-native field points to src/index.tsx).
  • Internal RNViewShot.web.js was renamed to RNViewShot.web.ts. Metro and webpack still resolve *.web.ts automatically.
  • The Android module exposes a TurboModule spec under src/specs/NativeRNViewShot.ts. The runtime detects old vs. new arch via global.__turboModuleProxy so consumers do not need to choose explicitly.

What changed

New Architecture / RN 0.84
  • #​580 Stack update: RN 0.81.4 + Fabric + TurboModules, TypeScript migration, example reboot, CI bootstrapped.
  • #​587 Upgrade example to React Native 0.84.1 and fix the removal of RCTScrollView on iOS by switching to runtime UIScrollView detection (subview walk + respondsToSelector:) that works under both Paper and Fabric.
  • #​621 Restore Android autolinking and runtime on RN 0.84 with the new arch enabled.
  • #​620 Fix react-native.config.js so the library is correctly linked on Android.
Android
  • #​628 (refactor(android)) UI-thread-safe view capture with hardened bitmap lifecycle:
    • view.draw() now runs on the UIManager queue instead of the capture executor.
    • runOnUiThreadBlocking posts work to the main looper with a hard 5s timeout (UiThreadBlockTimeoutException) so a stuck UI thread cannot hang capture forever.
    • State machine (STATE_QUEUED/RUNNING/DONE) with CAS between caller (timeout) and runnable (entry) so exactly one side owns cleanup.
    • Bitmap recycling split between caller and UI runnable via AtomicReference<Bitmap> + getAndSet(null) so the canvas-backing bitmap cannot be returned to the pool while view.draw() is still drawing into it.
    • handler.post() return value checked, Throwable thrown inside the UI runnable is captured and rethrown on the caller thread (surfaces as promise.reject(...) instead of crashing the UI thread).
    • Layer-marking scaffolding for translucent ViewGroup subtrees (kept inert in practice, see PR for context).
  • #​630 (fix(android)) Resolve view on the UIManager queue before posting capture work to the executor (cherry-pick of #​556 by @​wfern), with a try/catch so currentActivity == null (app backgrounded) or a throw inside resolveView rejects the promise instead of crashing the UIManager queue.
iOS
  • #​587 ScrollView capture works on RN 0.84 again: detects UIScrollView via subview walk and respondsToSelector:@&#8203;selector(scrollView) so both RCTScrollViewComponentView (Fabric) and legacy RCTScrollView (Paper) are covered with no compile-time __has_include branches.
  • #​600 Add iOS Privacy Manifest (PrivacyInfo.xcprivacy).
Web
  • #​599 Fix captureRef crash on web by skipping findNodeHandle (not supported).
  • #​601 Enable useCORS for html2canvas to fix cross-origin image capture.
  • #​602 Fix JPG format and base64 preview.
  • #​604 Fix releaseCapture crash on web (now a no-op since there are no temp files to clean up) and add a ViewShot component example.
Examples, tests, CI
  • #​580 Example app rebooted with 11 organized test cases (Basic, Media, Advanced).
  • #​603 Add unit tests for the JS/TS layer.
  • #​605 Add a dedicated Expo example app for testing with Expo + the New Architecture.
  • #​617 New CI workflow: build a downloadable example APK on every PR.
  • #​627 New "RENDERING CORRECTNESS" test card screen for visual regression checks across borderRadius/overflow:hidden, transforms, z-index, scrolled ScrollView, padding+bg+border, nested opacity, and Skia comparator.
  • Detox iOS E2E + Playwright web E2E running on CI.
  • #​629 Refresh example apps lockfiles to in-range latest.
Docs
Dependency updates

Numerous dependabot bumps in example/example-web/example-windows/example-expo (lodash, minimatch, fast-xml-parser, node-forge, picomatch, handlebars, brace-expansion, follow-redirects, flatted, terser-webpack-plugin, copy-webpack-plugin, serve, serialize-javascript). The library itself has no new runtime dependencies.

Closed PRs of note (superseded or already-on-master)

These were closed during this release cycle in favor of the consolidated work above:

  • #​531 (UiThreadUtil) superseded by the surgical UI-thread moves in #​628 + #​630.
  • #​540 (manual recursion view-cuts-off rewrite) superseded by the view.draw()-preserving approach.
  • #​563 (web releaseCapture throwing) addressed on master.
  • #​584 (RN 0.84 ScrollView iOS) addressed on master via #​587.

Contributors

Thanks to everyone who contributed to this release:

Full changelog: gre/react-native-view-shot@v4.0.3...v5.0.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the 📌 Dependencies External library or package updates label Jun 13, 2026
@Friedinger Friedinger closed this Jun 19, 2026
@renovate

renovate Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 5.x releases. But if you manually upgrade to 5.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate Bot deleted the renovate/react-native-view-shot-5.x branch June 19, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📌 Dependencies External library or package updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant