From 00c461a1449288cf5ac597a3ed978d3881c5e2fa Mon Sep 17 00:00:00 2001 From: David Bertet <11665957+DavidBertet@users.noreply.github.com> Date: Tue, 30 Apr 2024 12:14:00 -0700 Subject: [PATCH 1/8] Return height/width of capture (#646) To be consistent with Android --- ios/ReactNativeCameraKit/CameraProtocol.swift | 2 +- ios/ReactNativeCameraKit/CameraView.swift | 13 ++++++++++--- ios/ReactNativeCameraKit/PhotoCaptureDelegate.swift | 6 +++--- ios/ReactNativeCameraKit/RealCamera.swift | 6 +++--- ios/ReactNativeCameraKit/SimulatorCamera.swift | 4 ++-- src/types.ts | 4 ++-- 6 files changed, 21 insertions(+), 14 deletions(-) diff --git a/ios/ReactNativeCameraKit/CameraProtocol.swift b/ios/ReactNativeCameraKit/CameraProtocol.swift index fda57ef29..27625201d 100644 --- a/ios/ReactNativeCameraKit/CameraProtocol.swift +++ b/ios/ReactNativeCameraKit/CameraProtocol.swift @@ -28,6 +28,6 @@ protocol CameraProtocol: AnyObject, FocusInterfaceViewDelegate { func update(scannerFrameSize: CGRect?) func capturePicture(onWillCapture: @escaping () -> Void, - onSuccess: @escaping (_ imageData: Data, _ thumbnailData: Data?) -> (), + onSuccess: @escaping (_ imageData: Data, _ thumbnailData: Data?, _ dimensions: CMVideoDimensions) -> (), onError: @escaping (_ message: String) -> ()) } diff --git a/ios/ReactNativeCameraKit/CameraView.swift b/ios/ReactNativeCameraKit/CameraView.swift index 142ee0314..7da64ef04 100644 --- a/ios/ReactNativeCameraKit/CameraView.swift +++ b/ios/ReactNativeCameraKit/CameraView.swift @@ -242,9 +242,13 @@ class CameraView: UIView { self?.camera.previewView.alpha = 1 }) } - }, onSuccess: { [weak self] imageData, thumbnailData in + }, onSuccess: { [weak self] imageData, thumbnailData, dimensions in DispatchQueue.global(qos: .default).async { - self?.writeCaptured(imageData: imageData, thumbnailData: thumbnailData, onSuccess: onSuccess, onError: onError) + self?.writeCaptured(imageData: imageData, + thumbnailData: thumbnailData, + dimensions: dimensions, + onSuccess: onSuccess, + onError: onError) self?.focusInterfaceView.resetFocus() } @@ -289,6 +293,7 @@ class CameraView: UIView { private func writeCaptured(imageData: Data, thumbnailData: Data?, + dimensions: CMVideoDimensions, onSuccess: @escaping (_ imageObject: [String: Any]) -> (), onError: @escaping (_ error: String) -> ()) { do { @@ -298,7 +303,9 @@ class CameraView: UIView { "size": imageData.count, "uri": temporaryImageFileURL.description, "name": temporaryImageFileURL.lastPathComponent, - "thumb": "" + "thumb": "", + "height": dimensions.height, + "width": dimensions.width ]) } catch { let errorMessage = "Error occurred while writing image data to a temporary file: \(error)" diff --git a/ios/ReactNativeCameraKit/PhotoCaptureDelegate.swift b/ios/ReactNativeCameraKit/PhotoCaptureDelegate.swift index 42b4a6eea..6c77eccd2 100644 --- a/ios/ReactNativeCameraKit/PhotoCaptureDelegate.swift +++ b/ios/ReactNativeCameraKit/PhotoCaptureDelegate.swift @@ -12,12 +12,12 @@ class PhotoCaptureDelegate: NSObject, AVCapturePhotoCaptureDelegate { private(set) var requestedPhotoSettings: AVCapturePhotoSettings private let onWillCapture: () -> Void - private let onCaptureSuccess: (_ uniqueID: Int64, _ imageData: Data, _ thumbnailData: Data?) -> Void + private let onCaptureSuccess: (_ uniqueID: Int64, _ imageData: Data, _ thumbnailData: Data?, _ dimensions: CMVideoDimensions) -> Void private let onCaptureError: (_ uniqueID: Int64, _ message: String) -> Void init(with requestedPhotoSettings: AVCapturePhotoSettings, onWillCapture: @escaping () -> Void, - onCaptureSuccess: @escaping (_ uniqueID: Int64, _ imageData: Data, _ thumbnailData: Data?) -> Void, + onCaptureSuccess: @escaping (_ uniqueID: Int64, _ imageData: Data, _ thumbnailData: Data?, _ dimensions: CMVideoDimensions) -> Void, onCaptureError: @escaping (_ uniqueID: Int64, _ errorMessage: String) -> Void) { self.requestedPhotoSettings = requestedPhotoSettings self.onWillCapture = onWillCapture @@ -50,6 +50,6 @@ class PhotoCaptureDelegate: NSObject, AVCapturePhotoCaptureDelegate { thumbnailData = uiImage.jpegData(compressionQuality: 0.7) } - onCaptureSuccess(requestedPhotoSettings.uniqueID, imageData, thumbnailData) + onCaptureSuccess(requestedPhotoSettings.uniqueID, imageData, thumbnailData, photo.resolvedSettings.photoDimensions) } } diff --git a/ios/ReactNativeCameraKit/RealCamera.swift b/ios/ReactNativeCameraKit/RealCamera.swift index 492ad956f..c357359a5 100644 --- a/ios/ReactNativeCameraKit/RealCamera.swift +++ b/ios/ReactNativeCameraKit/RealCamera.swift @@ -292,7 +292,7 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega } func capturePicture(onWillCapture: @escaping () -> Void, - onSuccess: @escaping (_ imageData: Data, _ thumbnailData: Data?) -> Void, + onSuccess: @escaping (_ imageData: Data, _ thumbnailData: Data?, _ dimensions: CMVideoDimensions) -> Void, onError: @escaping (_ message: String) -> Void) { /* Retrieve the video preview layer's video orientation on the main queue before @@ -317,10 +317,10 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega let photoCaptureDelegate = PhotoCaptureDelegate( with: settings, onWillCapture: onWillCapture, - onCaptureSuccess: { uniqueID, imageData, thumbnailData in + onCaptureSuccess: { uniqueID, imageData, thumbnailData, dimensions in self.inProgressPhotoCaptureDelegates[uniqueID] = nil - onSuccess(imageData, thumbnailData) + onSuccess(imageData, thumbnailData, dimensions) }, onCaptureError: { uniqueID, errorMessage in self.inProgressPhotoCaptureDelegates[uniqueID] = nil diff --git a/ios/ReactNativeCameraKit/SimulatorCamera.swift b/ios/ReactNativeCameraKit/SimulatorCamera.swift index be15c83b8..abee1a14b 100644 --- a/ios/ReactNativeCameraKit/SimulatorCamera.swift +++ b/ios/ReactNativeCameraKit/SimulatorCamera.swift @@ -169,7 +169,7 @@ class SimulatorCamera: CameraProtocol { func update(scannerFrameSize: CGRect?) {} func capturePicture(onWillCapture: @escaping () -> Void, - onSuccess: @escaping (_ imageData: Data, _ thumbnailData: Data?) -> (), + onSuccess: @escaping (_ imageData: Data, _ thumbnailData: Data?, _ dimensions: CMVideoDimensions) -> (), onError: @escaping (_ message: String) -> ()) { onWillCapture() @@ -180,7 +180,7 @@ class SimulatorCamera: CameraProtocol { // Then switch to background thread DispatchQueue.global(qos: .default).async { if let imageData = previewSnapshot?.jpegData(compressionQuality: 0.85) { - onSuccess(imageData, nil) + onSuccess(imageData, nil, CMVideoDimensions(width: 480, height: 640)) } else { onError("Failed to convert snapshot to JPEG data") } diff --git a/src/types.ts b/src/types.ts index 15d70b379..20d2b26a8 100644 --- a/src/types.ts +++ b/src/types.ts @@ -14,11 +14,11 @@ export type ZoomMode = 'on' | 'off'; export type CaptureData = { uri: string; name: string; + height: number; + width: number; // Android only id?: string; path?: string; - height?: number; - width?: number; // iOS only size?: number; }; From a13aa787c469cde7f2bbd88059bddb537e4bc15c Mon Sep 17 00:00:00 2001 From: David Bertet <11665957+DavidBertet@users.noreply.github.com> Date: Tue, 30 Apr 2024 16:10:07 -0700 Subject: [PATCH 2/8] Add iOS linter & report issues on PR (#634) * Add iOS linter & report issues on PR * Fix lint errors --------- Co-authored-by: Seph Soliman --- .github/workflows/build.yml | 9 ++- .github/workflows/linter.yml | 35 ++++++++- .swiftlint.yml | 21 +++++ Brewfile | 2 + Brewfile.lock.json | 62 +++++++++++++++ ios/ReactNativeCameraKit/CameraManager.swift | 7 +- ios/ReactNativeCameraKit/CameraProtocol.swift | 4 +- ios/ReactNativeCameraKit/CameraView.swift | 29 ++++--- .../FocusInterfaceView.swift | 14 ++-- .../PhotoCaptureDelegate.swift | 2 +- .../RatioOverlayView.swift | 1 + ios/ReactNativeCameraKit/RealCamera.swift | 78 ++++++++++--------- .../RealPreviewView.swift | 1 + .../ScannerFrameView.swift | 1 - .../ScannerInterfaceView.swift | 6 +- .../SimulatorCamera.swift | 32 ++++---- package.json | 1 + scripts/check-ios.sh | 7 ++ 18 files changed, 225 insertions(+), 87 deletions(-) create mode 100644 .swiftlint.yml create mode 100644 Brewfile create mode 100644 Brewfile.lock.json create mode 100755 scripts/check-ios.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e76e1319..782ca2897 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,13 @@ name: Build +run-name: ⚙️ Build examples on ${{ github.event_name == 'pull_request' && 'PR' || '🌱' }} ${{ github.event_name == 'pull_request' && github.event.number || github.ref_name }} + on: - pull_request: - types: [opened, reopened] push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] + jobs: build-example-ios: name: build-example-ios diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 34b973154..5fd53a991 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,8 +1,13 @@ name: Linter +run-name: 🩺 Code checks on ${{ github.event_name == 'pull_request' && 'PR' || '🌱' }} ${{ github.event_name == 'pull_request' && github.event.number || github.ref_name }} + on: - pull_request: - types: [opened, reopened] push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] + jobs: eslint: name: ESLint @@ -16,3 +21,29 @@ jobs: run: yarn bootstrap-linux - name: Lint run: yarn lint + + ios: + name: Lint iOS + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Install dependencies + run: brew bundle + - name: Run swiftlint + run: | + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + updatedFiles=$(git --no-pager diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} -- '*.swift') + + if [[ -z "$updatedFiles" ]]; then + echo "No Swift files changed, skipping linting" + exit 0 + fi + + swiftlint --reporter github-actions-logging -- $updatedFiles + else + swiftlint + fi diff --git a/.swiftlint.yml b/.swiftlint.yml new file mode 100644 index 000000000..4eaa1b300 --- /dev/null +++ b/.swiftlint.yml @@ -0,0 +1,21 @@ +included: + - ios + - example/ios + +excluded: + - ios/Pods + - example/ios/Pods + +disabled_rules: + - todo + +line_length: 160 +type_body_length: 400 +function_body_length: 50 + +identifier_name: + excluded: + - on + - x + - y + - at diff --git a/Brewfile b/Brewfile new file mode 100644 index 000000000..4d9396ec1 --- /dev/null +++ b/Brewfile @@ -0,0 +1,2 @@ +brew 'swiftlint' + diff --git a/Brewfile.lock.json b/Brewfile.lock.json new file mode 100644 index 000000000..5943b20df --- /dev/null +++ b/Brewfile.lock.json @@ -0,0 +1,62 @@ +{ + "entries": { + "brew": { + "swiftlint": { + "version": "0.53.0", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:240ccda9de55d948d0c635798079074099bfcb73ffda41428900fdc748aeea7b", + "sha256": "240ccda9de55d948d0c635798079074099bfcb73ffda41428900fdc748aeea7b" + }, + "arm64_ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:7b7ceb7896c6833965cc4eac9001255d8adde6c5432045d5a8ab6aea8a9e81d9", + "sha256": "7b7ceb7896c6833965cc4eac9001255d8adde6c5432045d5a8ab6aea8a9e81d9" + }, + "arm64_monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:78c2a4c3f4a2f6847b484527b0f0f916da71e3ee29e49890fd44b63fe7b38e26", + "sha256": "78c2a4c3f4a2f6847b484527b0f0f916da71e3ee29e49890fd44b63fe7b38e26" + }, + "sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:abdca78dd8a8bd268053b3be195fe891bb74aef5502ab3a6b871ae0c6bb04540", + "sha256": "abdca78dd8a8bd268053b3be195fe891bb74aef5502ab3a6b871ae0c6bb04540" + }, + "ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:be711c707bf3b49fa0dd6e2ae576b309aad620f9b56a2c6e7b1ac5cf35cf652a", + "sha256": "be711c707bf3b49fa0dd6e2ae576b309aad620f9b56a2c6e7b1ac5cf35cf652a" + }, + "monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:13487d68a971dbe035019364e19d70641af2a18c06e52925d238685b384a7979", + "sha256": "13487d68a971dbe035019364e19d70641af2a18c06e52925d238685b384a7979" + }, + "x86_64_linux": { + "cellar": "/home/linuxbrew/.linuxbrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:fbbc56fccfcfcd34564feb7325567e2ff3638d3c609396a5c4aa13311c7b26e0", + "sha256": "fbbc56fccfcfcd34564feb7325567e2ff3638d3c609396a5c4aa13311c7b26e0" + } + } + } + } + } + }, + "system": { + "macos": { + "sonoma": { + "HOMEBREW_VERSION": "4.2.0-54-g0b804d4", + "HOMEBREW_PREFIX": "/opt/homebrew", + "Homebrew/homebrew-core": "api", + "CLT": "15.1.0.0.1.1700200546", + "Xcode": "15.0", + "macOS": "14.1" + } + } + } +} diff --git a/ios/ReactNativeCameraKit/CameraManager.swift b/ios/ReactNativeCameraKit/CameraManager.swift index 1d19ccff4..f105d49b2 100644 --- a/ios/ReactNativeCameraKit/CameraManager.swift +++ b/ios/ReactNativeCameraKit/CameraManager.swift @@ -25,12 +25,11 @@ import Foundation resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let cam = self.camera else { - reject("capture_error", "CKCamera capture() was called but camera view is nil", nil) + reject("capture_error", "CKCamera capture() was called but camera view is nil", nil) return } - cam.capture(options as! [String: Any], - onSuccess: { resolve($0) }, - onError: { reject("capture_error", $0, nil) }) + cam.capture(onSuccess: { resolve($0) }, + onError: { reject("capture_error", $0, nil) }) } @objc func checkDeviceCameraAuthorizationStatus(_ resolve: @escaping RCTPromiseResolveBlock, diff --git a/ios/ReactNativeCameraKit/CameraProtocol.swift b/ios/ReactNativeCameraKit/CameraProtocol.swift index 27625201d..cc8c62f35 100644 --- a/ios/ReactNativeCameraKit/CameraProtocol.swift +++ b/ios/ReactNativeCameraKit/CameraProtocol.swift @@ -28,6 +28,6 @@ protocol CameraProtocol: AnyObject, FocusInterfaceViewDelegate { func update(scannerFrameSize: CGRect?) func capturePicture(onWillCapture: @escaping () -> Void, - onSuccess: @escaping (_ imageData: Data, _ thumbnailData: Data?, _ dimensions: CMVideoDimensions) -> (), - onError: @escaping (_ message: String) -> ()) + onSuccess: @escaping (_ imageData: Data, _ thumbnailData: Data?, _ dimensions: CMVideoDimensions) -> Void, + onError: @escaping (_ message: String) -> Void) } diff --git a/ios/ReactNativeCameraKit/CameraView.swift b/ios/ReactNativeCameraKit/CameraView.swift index 7da64ef04..787c0c50d 100644 --- a/ios/ReactNativeCameraKit/CameraView.swift +++ b/ios/ReactNativeCameraKit/CameraView.swift @@ -71,7 +71,7 @@ class CameraView: UIView { } private func setupCamera() { - if (hasPropBeenSetup && hasPermissionBeenGranted && !hasCameraBeenSetup) { + if hasPropBeenSetup && hasPermissionBeenGranted && !hasCameraBeenSetup { hasCameraBeenSetup = true camera.setup(cameraType: cameraType, supportedBarcodeType: scanBarcode && onReadCode != nil ? supportedBarcodeType : []) } @@ -141,6 +141,7 @@ class CameraView: UIView { } // Called once when all props have been set, then every time one is updated + // swiftlint:disable:next cyclomatic_complexity function_body_length override func didSetProps(_ changedProps: [String]) { hasPropBeenSetup = true @@ -154,11 +155,11 @@ class CameraView: UIView { if changedProps.contains("cameraType") || changedProps.contains("torchMode") { camera.update(torchMode: torchMode) } - + if changedProps.contains("onOrientationChange") { camera.update(onOrientationChange: onOrientationChange) } - + if changedProps.contains("onZoom") { camera.update(onZoom: onZoom) } @@ -219,11 +220,11 @@ class CameraView: UIView { if changedProps.contains("zoomMode") { self.update(zoomMode: zoomMode) } - + if changedProps.contains("zoom") { camera.update(zoom: zoom?.doubleValue) } - + if changedProps.contains("maxZoom") { camera.update(maxZoom: maxZoom?.doubleValue) } @@ -231,9 +232,8 @@ class CameraView: UIView { // MARK: Public - func capture(_ options: [String: Any], - onSuccess: @escaping (_ imageObject: [String: Any]) -> (), - onError: @escaping (_ error: String) -> ()) { + func capture(onSuccess: @escaping (_ imageObject: [String: Any]) -> Void, + onError: @escaping (_ error: String) -> Void) { camera.capturePicture(onWillCapture: { [weak self] in // Flash/dim preview to indicate shutter action DispatchQueue.main.async { @@ -254,12 +254,12 @@ class CameraView: UIView { } }, onError: onError) } - + // MARK: - Private Helper private func update(zoomMode: ZoomMode) { if zoomMode == .on { - if (zoomGestureRecognizer == nil) { + if zoomGestureRecognizer == nil { let pinchGesture = UIPinchGestureRecognizer(target: self, action: #selector(handlePinchToZoomRecognizer(_:))) addGestureRecognizer(pinchGesture) zoomGestureRecognizer = pinchGesture @@ -271,13 +271,12 @@ class CameraView: UIView { } } } - + private func handleCameraPermission() { switch AVCaptureDevice.authorizationStatus(for: .video) { case .authorized: // The user has previously granted access to the camera. hasPermissionBeenGranted = true - break case .notDetermined: // The user has not yet been presented with the option to grant video access. AVCaptureDevice.requestAccess(for: .video) { [weak self] granted in @@ -294,11 +293,11 @@ class CameraView: UIView { private func writeCaptured(imageData: Data, thumbnailData: Data?, dimensions: CMVideoDimensions, - onSuccess: @escaping (_ imageObject: [String: Any]) -> (), - onError: @escaping (_ error: String) -> ()) { + onSuccess: @escaping (_ imageObject: [String: Any]) -> Void, + onError: @escaping (_ error: String) -> Void) { do { let temporaryImageFileURL = try saveToTmpFolder(imageData) - + onSuccess([ "size": imageData.count, "uri": temporaryImageFileURL.description, diff --git a/ios/ReactNativeCameraKit/FocusInterfaceView.swift b/ios/ReactNativeCameraKit/FocusInterfaceView.swift index f873e8c4a..0f9a02cc4 100644 --- a/ios/ReactNativeCameraKit/FocusInterfaceView.swift +++ b/ios/ReactNativeCameraKit/FocusInterfaceView.swift @@ -82,7 +82,7 @@ class FocusInterfaceView: UIView { func update(focusMode: FocusMode) { if focusMode == .on { - if (focusGestureRecognizer == nil) { + if focusGestureRecognizer == nil { let tapGesture = UITapGestureRecognizer(target: self, action: #selector(focusAndExposeTap(_:))) addGestureRecognizer(tapGesture) focusGestureRecognizer = tapGesture @@ -157,17 +157,17 @@ class FocusInterfaceView: UIView { UIView.animate(withDuration: 0.2, animations: { self.focusView.frame = focusViewFrame self.focusView.alpha = 1 - }) { _ in + }, completion: { _ in self.hideFocusViewTimer?.invalidate() - self.hideFocusViewTimer = Timer.scheduledTimer(withTimeInterval: 2, repeats: false) { [weak self] _ in + self.hideFocusViewTimer = Timer.scheduledTimer(withTimeInterval: 2, repeats: false, block: { [weak self] _ in guard let self else { return } UIView.animate(withDuration: 0.2, animations: { self.focusView.alpha = 0 - }) { _ in + }, completion: { _ in self.focusView.isHidden = true - } - } - } + }) + }) + }) } } diff --git a/ios/ReactNativeCameraKit/PhotoCaptureDelegate.swift b/ios/ReactNativeCameraKit/PhotoCaptureDelegate.swift index 6c77eccd2..a7fda525b 100644 --- a/ios/ReactNativeCameraKit/PhotoCaptureDelegate.swift +++ b/ios/ReactNativeCameraKit/PhotoCaptureDelegate.swift @@ -43,7 +43,7 @@ class PhotoCaptureDelegate: NSObject, AVCapturePhotoCaptureDelegate { return } - var thumbnailData: Data? = nil + var thumbnailData: Data? if let previewPixelBuffer = photo.previewPixelBuffer { let ciImage = CIImage(cvPixelBuffer: previewPixelBuffer) let uiImage = UIImage(ciImage: ciImage) diff --git a/ios/ReactNativeCameraKit/RatioOverlayView.swift b/ios/ReactNativeCameraKit/RatioOverlayView.swift index f65cc7a41..a98e2cc24 100644 --- a/ios/ReactNativeCameraKit/RatioOverlayView.swift +++ b/ios/ReactNativeCameraKit/RatioOverlayView.swift @@ -88,6 +88,7 @@ class RatioOverlayView: UIView { // MARK: - Private + // swiftlint:disable:next function_body_length private func setOverlayParts() { guard let ratioData, ratioData.ratio != 0 else { isHidden = true diff --git a/ios/ReactNativeCameraKit/RealCamera.swift b/ios/ReactNativeCameraKit/RealCamera.swift index c357359a5..d0d9f702c 100644 --- a/ios/ReactNativeCameraKit/RealCamera.swift +++ b/ios/ReactNativeCameraKit/RealCamera.swift @@ -3,6 +3,8 @@ // ReactNativeCameraKit // +// swiftlint:disable file_length + import AVFoundation import UIKit import CoreMotion @@ -10,6 +12,7 @@ import CoreMotion /* * Real camera implementation that uses AVFoundation */ +// swiftlint:disable:next type_body_length class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelegate { var previewView: UIView { cameraPreview } @@ -32,13 +35,13 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega private var resetFocus: (() -> Void)? private var focusFinished: (() -> Void)? private var onBarcodeRead: ((_ barcode: String) -> Void)? - private var scannerFrameSize: CGRect? = nil + private var scannerFrameSize: CGRect? private var onOrientationChange: RCTDirectEventBlock? private var onZoomCallback: RCTDirectEventBlock? private var lastOnZoom: Double? private var zoom: Double? private var maxZoom: Double? - + private var deviceOrientation = UIDeviceOrientation.unknown private var motionManager: CMMotionManager? @@ -52,10 +55,11 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega override init() { super.init() - + // In addition to using accelerometer to determine REAL orientation // we also listen to UI orientation changes (UIDevice does not report rotation if orientation lock is on, so photos aren't rotated correctly) - // When UIDevice reports rotation to the left, UI is rotated right to compensate, but that means we need to re-rotate left to make camera appear correctly (see self.uiOrientationChanged) + // When UIDevice reports rotation to the left, UI is rotated right to compensate, but that means we need to re-rotate left + // to make camera appear correctly (see self.uiOrientationChanged) UIDevice.current.beginGeneratingDeviceOrientationNotifications() NotificationCenter.default.addObserver(forName: UIDevice.orientationDidChangeNotification, object: UIDevice.current, @@ -75,11 +79,11 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega self.removeObservers() } } - + motionManager?.stopAccelerometerUpdates() - + NotificationCenter.default.removeObserver(self, name: UIDevice.orientationDidChangeNotification, object: UIDevice.current) - + UIDevice.current.endGeneratingDeviceOrientationNotifications() } @@ -94,7 +98,7 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega self.cameraPreview.session = self.session self.cameraPreview.previewLayer.videoGravity = .resizeAspect } - + self.initializeMotionManager() // Setup the capture session. @@ -113,13 +117,13 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega // We need to reapply the configuration after starting the camera self.update(torchMode: self.torchMode) } - + DispatchQueue.main.async { self.setVideoOrientationToInterfaceOrientation() } } } - + private var zoomStartedAt: Double = 1.0 func zoomPinchStart() { sessionQueue.async { @@ -130,13 +134,13 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega func zoomPinchChange(pinchScale: CGFloat) { guard !pinchScale.isNaN else { return } - + sessionQueue.async { guard let videoDevice = self.videoDeviceInput?.device else { return } - + let desiredZoomFactor = (self.zoomStartedAt / self.defaultZoomFactor(for: videoDevice)) * pinchScale let zoomForDevice = self.getValidZoom(forDevice: videoDevice, zoom: desiredZoomFactor) - + if zoomForDevice != self.normalizedZoom(for: videoDevice) { // Only trigger zoom changes if it's an uncontrolled component (zoom isn't manually set) // otherwise it's likely to cause issues inf. loops @@ -147,25 +151,25 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega } } } - + func update(maxZoom: Double?) { self.maxZoom = maxZoom - + // Re-update zoom value in case the max was increased self.update(zoom: self.zoom) } - + func update(zoom: Double?) { sessionQueue.async { self.zoom = zoom guard let videoDevice = self.videoDeviceInput?.device else { return } - guard let zoom_ = zoom else { return } + guard let zoom else { return } - let zoomForDevice = self.getValidZoom(forDevice: videoDevice, zoom: zoom_) + let zoomForDevice = self.getValidZoom(forDevice: videoDevice, zoom: zoom) self.setZoomFor(videoDevice, to: zoomForDevice) } } - + /** `desiredZoom` can be nil when we want to notify what the zoom factor really is */ @@ -174,7 +178,7 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega let cameraZoom = normalizedZoom(for: videoDevice) let desiredOrCameraZoom = desiredZoom ?? cameraZoom guard desiredOrCameraZoom > -1.0 else { return } - + // ignore duplicate events when zooming to min/max // but always notify if a desiredZoom wasn't given, // since that means they wanted to reset setZoom(0.0) @@ -182,11 +186,11 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega if desiredZoom != nil && desiredOrCameraZoom == lastOnZoom { return } - + lastOnZoom = desiredOrCameraZoom self.onZoomCallback?(["zoom": desiredOrCameraZoom]) } - + func update(onZoom: RCTDirectEventBlock?) { self.onZoomCallback = onZoom } @@ -228,11 +232,11 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega } } } - + func update(onOrientationChange: RCTDirectEventBlock?) { self.onOrientationChange = onOrientationChange } - + func update(torchMode: TorchMode) { sessionQueue.async { self.torchMode = torchMode @@ -300,7 +304,8 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega the main thread and session configuration is done on the session queue. */ DispatchQueue.main.async { - let videoPreviewLayerOrientation = self.videoOrientation(from: self.deviceOrientation) ?? self.cameraPreview.previewLayer.connection?.videoOrientation + let videoPreviewLayerOrientation = + self.videoOrientation(from: self.deviceOrientation) ?? self.cameraPreview.previewLayer.connection?.videoOrientation self.sessionQueue.async { if let photoOutputConnection = self.photoOutput.connection(with: .video), let videoPreviewLayerOrientation { @@ -365,10 +370,13 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega } DispatchQueue.main.async { - let visibleRect = scannerFrameSize != nil && scannerFrameSize != .zero ? self.cameraPreview.previewLayer.metadataOutputRectConverted(fromLayerRect: scannerFrameSize!) : nil + var visibleRect: CGRect? + if scannerFrameSize != nil && scannerFrameSize != .zero { + visibleRect = self.cameraPreview.previewLayer.metadataOutputRectConverted(fromLayerRect: scannerFrameSize!) + } self.sessionQueue.async { - if (self.metadataOutput.rectOfInterest == visibleRect) { + if self.metadataOutput.rectOfInterest == visibleRect { return } @@ -457,14 +465,13 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega if session.canAddInput(videoDeviceInput) { session.addInput(videoDeviceInput) - + self.videoDeviceInput = videoDeviceInput self.resetZoom(forDevice: videoDevice) } else { return .sessionConfigurationFailed } - if session.canAddOutput(photoOutput) { session.addOutput(photoOutput) @@ -494,11 +501,11 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega private func defaultZoomFactor(for videoDevice: AVCaptureDevice) -> CGFloat { let fallback = 1.0 guard #available(iOS 13.0, *) else { return fallback } - + // Devices that have multiple physical cameras are hidden behind one virtual camera input // The zoom factor defines what physical camera it actually uses // The default lens on the native camera app is the wide angle - if var wideAngleIndex = videoDevice.constituentDevices.firstIndex(where: { $0.deviceType == .builtInWideAngleCamera }) { + if let wideAngleIndex = videoDevice.constituentDevices.firstIndex(where: { $0.deviceType == .builtInWideAngleCamera }) { // .virtualDeviceSwitchOverVideoZoomFactors has the .constituentDevices zoom factor which borders the NEXT device // so we grab the one PRIOR to the wide angle to get the wide angle's zoom factor guard wideAngleIndex >= 1 else { return fallback } @@ -507,7 +514,7 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega return fallback } - + private func setZoomFor(_ videoDevice: AVCaptureDevice, to zoom: Double) { do { try videoDevice.lockForConfiguration() @@ -523,7 +530,7 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega let defaultZoom = defaultZoomFactor(for: videoDevice) return videoDevice.videoZoomFactor / defaultZoom } - + private func getValidZoom(forDevice videoDevice: AVCaptureDevice, zoom: Double) -> Double { let defaultZoom = defaultZoomFactor(for: videoDevice) let minZoomFactor = videoDevice.minAvailableVideoZoomFactor / defaultZoom @@ -534,7 +541,7 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega let cappedZoom = max(minZoomFactor, min(zoom, maxZoomFactor)) return cappedZoom } - + private func resetZoom(forDevice videoDevice: AVCaptureDevice) { var zoomForDevice = getValidZoom(forDevice: videoDevice, zoom: 1) if let zoomPropValue = self.zoom { @@ -594,7 +601,7 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega adjustingFocusObservation = videoDeviceInput?.device.observe(\.isAdjustingFocus, options: .new, - changeHandler: { [weak self] device, change in + changeHandler: { [weak self] _, change in guard let self, let isFocusing = change.newValue else { return } self.isAdjustingFocus(isFocusing: isFocusing) @@ -616,6 +623,7 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega } private func removeObservers() { + // swiftlint:disable:next notification_center_detachment NotificationCenter.default.removeObserver(self) adjustingFocusObservation?.invalidate() diff --git a/ios/ReactNativeCameraKit/RealPreviewView.swift b/ios/ReactNativeCameraKit/RealPreviewView.swift index 56c9e96c9..543089bbe 100644 --- a/ios/ReactNativeCameraKit/RealPreviewView.swift +++ b/ios/ReactNativeCameraKit/RealPreviewView.swift @@ -14,6 +14,7 @@ class RealPreviewView: UIView { // Create an accessor for the right layer type var previewLayer: AVCaptureVideoPreviewLayer { // We can safely forcecast here, it can't change at runtime + // swiftlint:disable:next force_cast return layer as! AVCaptureVideoPreviewLayer } diff --git a/ios/ReactNativeCameraKit/ScannerFrameView.swift b/ios/ReactNativeCameraKit/ScannerFrameView.swift index 381da4f8a..161f061db 100644 --- a/ios/ReactNativeCameraKit/ScannerFrameView.swift +++ b/ios/ReactNativeCameraKit/ScannerFrameView.swift @@ -48,7 +48,6 @@ class ScannerFrameView: UIView { laserView.frame = CGRect(x: 2, y: 2, width: frame.size.width - 4, height: 2) } - UIView.animate(withDuration: 3, delay: 0, options: [.autoreverse, .repeat], animations: { self.laserView.center = CGPoint(x: self.frame.size.width / 2, y: self.frame.size.height - 3) }) diff --git a/ios/ReactNativeCameraKit/ScannerInterfaceView.swift b/ios/ReactNativeCameraKit/ScannerInterfaceView.swift index dd6a6c2b5..bedfea1f8 100644 --- a/ios/ReactNativeCameraKit/ScannerInterfaceView.swift +++ b/ios/ReactNativeCameraKit/ScannerInterfaceView.swift @@ -80,6 +80,10 @@ class ScannerInterfaceView: UIView { topOverlayView.frame = CGRect(x: 0, y: 0, width: frame.size.width, height: frameRect.origin.y) leftOverlayView.frame = CGRect(x: 0, y: frameRect.origin.y, width: frameOffset, height: frameHeight) rightOverlayView.frame = CGRect(x: frameRect.size.width + frameOffset, y: frameRect.origin.y, width: frameOffset, height: frameHeight) - bottomOverlayView.frame = CGRect(x: 0, y: frameRect.origin.y + frameHeight, width: frame.size.width, height: frame.size.height - frameRect.origin.y - frameHeight) + bottomOverlayView.frame = CGRect( + x: 0, + y: frameRect.origin.y + frameHeight, + width: frame.size.width, + height: frame.size.height - frameRect.origin.y - frameHeight) } } diff --git a/ios/ReactNativeCameraKit/SimulatorCamera.swift b/ios/ReactNativeCameraKit/SimulatorCamera.swift index abee1a14b..d67f680d2 100644 --- a/ios/ReactNativeCameraKit/SimulatorCamera.swift +++ b/ios/ReactNativeCameraKit/SimulatorCamera.swift @@ -31,7 +31,7 @@ class SimulatorCamera: CameraProtocol { DispatchQueue.main.async { self.mockPreview.cameraTypeLabel.text = "Camera type: \(cameraType)" } - + // Listen to orientation changes UIDevice.current.beginGeneratingDeviceOrientationNotifications() NotificationCenter.default.addObserver(forName: UIDevice.orientationDidChangeNotification, @@ -39,9 +39,8 @@ class SimulatorCamera: CameraProtocol { queue: nil, using: { [weak self] notification in self?.orientationChanged(notification: notification) }) - } - + private func orientationChanged(notification: Notification) { guard let device = notification.object as? UIDevice, let orientation = Orientation(from: device.orientation) else { @@ -50,7 +49,7 @@ class SimulatorCamera: CameraProtocol { self.onOrientationChange?(["orientation": orientation.rawValue]) } - + func cameraRemovedFromSuperview() { NotificationCenter.default.removeObserver(self, name: UIDevice.orientationDidChangeNotification, object: UIDevice.current) @@ -59,16 +58,16 @@ class SimulatorCamera: CameraProtocol { func update(onOrientationChange: RCTDirectEventBlock?) { self.onOrientationChange = onOrientationChange } - + func update(onZoom: RCTDirectEventBlock?) { self.onZoom = onZoom } - + func setVideoDevice(zoomFactor: Double) { self.videoDeviceZoomFactor = zoomFactor self.mockPreview.zoomLabel.text = "Zoom: \(zoomFactor)" } - + private var zoomStartedAt: Double = 1.0 func zoomPinchStart() { DispatchQueue.main.async { @@ -76,10 +75,10 @@ class SimulatorCamera: CameraProtocol { self.mockPreview.zoomLabel.text = "Zoom start" } } - + func zoomPinchChange(pinchScale: CGFloat) { guard !pinchScale.isNaN else { return } - + DispatchQueue.main.async { let desiredZoomFactor = self.zoomStartedAt * pinchScale var maxZoomFactor = self.videoDeviceMaxAvailableVideoZoomFactor @@ -87,7 +86,7 @@ class SimulatorCamera: CameraProtocol { maxZoomFactor = min(maxZoom, maxZoomFactor) } let zoomForDevice = max(1.0, min(desiredZoomFactor, maxZoomFactor)) - + if zoomForDevice != self.videoDeviceZoomFactor { // Only trigger zoom changes if it's an uncontrolled component (zoom isn't manually set) // otherwise it's likely to cause issues inf. loops @@ -132,14 +131,14 @@ class SimulatorCamera: CameraProtocol { self.mockPreview.randomize() } } - + func update(maxZoom: Double?) { self.maxZoom = maxZoom } - + func update(zoom: Double?) { self.zoom = zoom - + DispatchQueue.main.async { var zoomOrDefault = zoom ?? 0 // -1 will reset to zoom default (which is not 1 on modern cameras) @@ -153,7 +152,7 @@ class SimulatorCamera: CameraProtocol { } let zoomForDevice = max(1.0, min(zoomOrDefault, maxZoomFactor)) self.setVideoDevice(zoomFactor: zoomForDevice) - + // If they wanted to reset, tell them what the default zoom turned out to be // regardless if it's controlled if self.zoom == nil || zoom == 0 { @@ -161,7 +160,6 @@ class SimulatorCamera: CameraProtocol { } } } - func isBarcodeScannerEnabled(_ isEnabled: Bool, supportedBarcodeType: [AVMetadataObject.ObjectType], @@ -169,8 +167,8 @@ class SimulatorCamera: CameraProtocol { func update(scannerFrameSize: CGRect?) {} func capturePicture(onWillCapture: @escaping () -> Void, - onSuccess: @escaping (_ imageData: Data, _ thumbnailData: Data?, _ dimensions: CMVideoDimensions) -> (), - onError: @escaping (_ message: String) -> ()) { + onSuccess: @escaping (_ imageData: Data, _ thumbnailData: Data?, _ dimensions: CMVideoDimensions) -> Void, + onError: @escaping (_ message: String) -> Void) { onWillCapture() DispatchQueue.main.async { diff --git a/package.json b/package.json index b9463de02..460d6f1c5 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "clean": "rm -rf dist/", "test": "jest", "lint": "yarn eslint -c .eslintrc.js", + "check-ios": "scripts/check-ios.sh", "release": "yarn clean && yarn build && yarn publish --verbose", "release:beta": "yarn clean && yarn build && yarn publish --tag beta --verbose", "release:local": "yarn clean && yarn build && tmp=$(mktemp) && yarn pack --filename $tmp.tar.gz && open -R $tmp.tar.gz", diff --git a/scripts/check-ios.sh b/scripts/check-ios.sh new file mode 100755 index 000000000..6b1b1dc23 --- /dev/null +++ b/scripts/check-ios.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +if which swiftlint >/dev/null; then + swiftlint lint --quiet --autocorrect && swiftlint lint --quiet +else + echo "warning: SwiftLint not installed, use `brew bundle` to install it" +fi \ No newline at end of file From 8a2df983334f2b036b4cae170714704a1a58f6a3 Mon Sep 17 00:00:00 2001 From: David Bertet <11665957+DavidBertet@users.noreply.github.com> Date: Tue, 30 Apr 2024 16:10:35 -0700 Subject: [PATCH 3/8] Fix barcode screen top button size (#631) --- example/src/BarcodeScreenExample.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/example/src/BarcodeScreenExample.tsx b/example/src/BarcodeScreenExample.tsx index 438bcef40..440b5c199 100644 --- a/example/src/BarcodeScreenExample.tsx +++ b/example/src/BarcodeScreenExample.tsx @@ -94,16 +94,17 @@ const BarcodeExample = ({ onBack }: { onBack: () => void }) => { {flashData.image && ( - + )} - + @@ -199,7 +200,17 @@ const styles = StyleSheet.create({ justifyContent: 'space-between', }, topButton: { - padding: 10, + backgroundColor: '#222', + width: 44, + height: 44, + borderRadius: 22, + justifyContent: 'center', + alignItems: 'center', + }, + topButtonImg: { + margin: 10, + width: 24, + height: 24, }, cameraContainer: { From a7413aa4325e76876049843d8efdc8a66ac7f158 Mon Sep 17 00:00:00 2001 From: David Bertet <11665957+DavidBertet@users.noreply.github.com> Date: Tue, 30 Apr 2024 16:11:16 -0700 Subject: [PATCH 4/8] Fix #614. "onError" method needs to be declared (#630) --- android/src/main/java/com/rncamerakit/CKCameraManager.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/rncamerakit/CKCameraManager.kt b/android/src/main/java/com/rncamerakit/CKCameraManager.kt index a31322d90..9b1cda918 100644 --- a/android/src/main/java/com/rncamerakit/CKCameraManager.kt +++ b/android/src/main/java/com/rncamerakit/CKCameraManager.kt @@ -47,7 +47,8 @@ class CKCameraManager : SimpleViewManager() { "onOrientationChange", MapBuilder.of("registrationName", "onOrientationChange"), "onReadCode", MapBuilder.of("registrationName", "onReadCode"), "onPictureTaken", MapBuilder.of("registrationName", "onPictureTaken"), - "onZoom", MapBuilder.of("registrationName", "onZoom") + "onZoom", MapBuilder.of("registrationName", "onZoom"), + "onError", MapBuilder.of("registrationName", "onError") ) } From ae39ea880a1022149210e4e43a142574d9c120a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 16:11:47 -0700 Subject: [PATCH 5/8] Bump react-devtools-core from 4.9.0 to 4.28.4 (#613) Bumps [react-devtools-core](https://github.com/facebook/react/tree/HEAD/packages/react-devtools-core) from 4.9.0 to 4.28.4. - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/HEAD/packages/react-devtools-core) --- updated-dependencies: - dependency-name: react-devtools-core dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5c77f88f1..84726650d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6120,9 +6120,9 @@ react-deep-force-update@^1.0.0: integrity sha512-WUSQJ4P/wWcusaH+zZmbECOk7H5N2pOIl0vzheeornkIMhu+qrNdGFm0bDZLCb0hSF0jf/kH1SgkNGfBdTc4wA== react-devtools-core@^4.0.6: - version "4.9.0" - resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.9.0.tgz#39cc4589b4c6fbcb6a18e529ce745a1af3e63ae5" - integrity sha512-3NyHXW1ClqxEXdHunawAytDxiIxs620oP3wB8DHsbx1fkGgqjMkwlyHVf0zmES/b4ffqzJySowRwSYds/uAHzw== + version "4.28.4" + resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.28.4.tgz#fb8183eada77093f4c2f9830e664bf22255abe27" + integrity sha512-IUZKLv3CimeM07G3vX4H4loxVpByrzq3HvfTX7v9migalwvLs9ZY5D3S3pKR33U+GguYfBBdMMZyToFhsSE/iQ== dependencies: shell-quote "^1.6.1" ws "^7" From da2c7cc6985ee4fcefe9416d92d48cb5959d7e49 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 16:12:09 -0700 Subject: [PATCH 6/8] Bump react-devtools-core from 4.27.8 to 4.28.4 in /example (#612) Bumps [react-devtools-core](https://github.com/facebook/react/tree/HEAD/packages/react-devtools-core) from 4.27.8 to 4.28.4. - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/HEAD/packages/react-devtools-core) --- updated-dependencies: - dependency-name: react-devtools-core dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- example/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/yarn.lock b/example/yarn.lock index 2f27ecad6..1f9f6a4e7 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -3529,9 +3529,9 @@ range-parser@~1.2.1: integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== react-devtools-core@^4.26.1: - version "4.27.8" - resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.27.8.tgz#b7b387b079c14ae9a214d4846a402da2b6efd164" - integrity sha512-KwoH8/wN/+m5wTItLnsgVraGNmFrcTWR3k1VimP1HjtMMw4CNF+F5vg4S/0tzTEKIdpCi2R7mPNTC+/dswZMgw== + version "4.28.4" + resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.28.4.tgz#fb8183eada77093f4c2f9830e664bf22255abe27" + integrity sha512-IUZKLv3CimeM07G3vX4H4loxVpByrzq3HvfTX7v9migalwvLs9ZY5D3S3pKR33U+GguYfBBdMMZyToFhsSE/iQ== dependencies: shell-quote "^1.6.1" ws "^7" From d8da12c8ea37a4a081b20e13f3e0c7fe3aaa4e93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 16:12:54 -0700 Subject: [PATCH 7/8] Bump @babel/traverse from 7.22.4 to 7.23.2 in /example (#611) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.4 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- example/yarn.lock | 122 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 101 insertions(+), 21 deletions(-) diff --git a/example/yarn.lock b/example/yarn.lock index 1f9f6a4e7..32c0873be 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -17,6 +17,14 @@ dependencies: "@babel/highlight" "^7.18.6" +"@babel/code-frame@^7.22.13": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" + integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== + dependencies: + "@babel/highlight" "^7.22.13" + chalk "^2.4.2" + "@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.0": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.3.tgz#cd502a6a0b6e37d7ad72ce7e71a7160a3ae36f7e" @@ -43,7 +51,7 @@ json5 "^2.2.2" semver "^6.3.0" -"@babel/generator@^7.20.0", "@babel/generator@^7.22.0", "@babel/generator@^7.22.3": +"@babel/generator@^7.20.0", "@babel/generator@^7.22.0": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.3.tgz#0ff675d2edb93d7596c5f6728b52615cfc0df01e" integrity sha512-C17MW4wlk//ES/CJDL51kPNwl+qiBQyN7b9SKyVp11BLGFeSPoVaHrv+MNt8jwQFhQWowW88z1eeBx3pFz9v8A== @@ -53,6 +61,16 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" +"@babel/generator@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420" + integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g== + dependencies: + "@babel/types" "^7.23.0" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" @@ -112,6 +130,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.1.tgz#ac3a56dbada59ed969d712cf527bd8271fe3eba8" integrity sha512-Z2tgopurB/kTbidvzeBrc2To3PUP/9i5MUe+fU6QJCQDyPwSH2oRapkLw3KGECDYSjhQZCNxEvNvZlLw8JjGwA== +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== + "@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0", "@babel/helper-function-name@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4" @@ -120,12 +143,20 @@ "@babel/template" "^7.20.7" "@babel/types" "^7.21.0" -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== +"@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== dependencies: - "@babel/types" "^7.18.6" + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" + +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== + dependencies: + "@babel/types" "^7.22.5" "@babel/helper-member-expression-to-functions@^7.22.0": version "7.22.3" @@ -210,16 +241,33 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-string-parser@^7.21.5": version "7.21.5" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz#2b3eea65443c6bdc31c22d037c65f6d323b6b2bd" integrity sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w== +"@babel/helper-string-parser@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" + integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== + "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + "@babel/helper-validator-option@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" @@ -253,11 +301,25 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.13.16", "@babel/parser@^7.14.0", "@babel/parser@^7.20.0", "@babel/parser@^7.21.9", "@babel/parser@^7.22.0", "@babel/parser@^7.22.4": +"@babel/highlight@^7.22.13": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54" + integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.13.16", "@babel/parser@^7.14.0", "@babel/parser@^7.20.0", "@babel/parser@^7.21.9", "@babel/parser@^7.22.0": version "7.22.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.4.tgz#a770e98fd785c231af9d93f6459d36770993fb32" integrity sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA== +"@babel/parser@^7.22.15", "@babel/parser@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" + integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== + "@babel/plugin-proposal-async-generator-functions@^7.0.0": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz#bfb7276d2d573cb67ba379984a2334e262ba5326" @@ -692,23 +754,32 @@ "@babel/parser" "^7.21.9" "@babel/types" "^7.21.5" -"@babel/traverse@^7.20.0", "@babel/traverse@^7.20.5", "@babel/traverse@^7.22.1": - version "7.22.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.4.tgz#c3cf96c5c290bd13b55e29d025274057727664c0" - integrity sha512-Tn1pDsjIcI+JcLKq1AVlZEr4226gpuAQTsLMorsYg9tuS/kG7nuwwJ4AB8jfQuEgb/COBwR/DqJxmoiYFu5/rQ== +"@babel/template@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" + integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== dependencies: - "@babel/code-frame" "^7.21.4" - "@babel/generator" "^7.22.3" - "@babel/helper-environment-visitor" "^7.22.1" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.22.4" - "@babel/types" "^7.22.4" + "@babel/code-frame" "^7.22.13" + "@babel/parser" "^7.22.15" + "@babel/types" "^7.22.15" + +"@babel/traverse@^7.20.0", "@babel/traverse@^7.20.5", "@babel/traverse@^7.22.1": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" + integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== + dependencies: + "@babel/code-frame" "^7.22.13" + "@babel/generator" "^7.23.0" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.0" + "@babel/types" "^7.23.0" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.5", "@babel/types@^7.21.0", "@babel/types@^7.21.4", "@babel/types@^7.21.5", "@babel/types@^7.22.0", "@babel/types@^7.22.3", "@babel/types@^7.22.4": +"@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.5", "@babel/types@^7.21.0", "@babel/types@^7.21.4", "@babel/types@^7.21.5", "@babel/types@^7.22.0", "@babel/types@^7.22.3": version "7.22.4" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.4.tgz#56a2653ae7e7591365dabf20b76295410684c071" integrity sha512-Tx9x3UBHTTsMSW85WB2kphxYQVvrZ/t1FxD88IpSgIjiUJlCm9z+xWIDwyo1vffTwSqteqyznB8ZE9vYYk16zA== @@ -717,6 +788,15 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" +"@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" + integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== + dependencies: + "@babel/helper-string-parser" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + "@hapi/hoek@^9.0.0": version "9.3.0" resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" @@ -1496,7 +1576,7 @@ caniuse-lite@^1.0.30001489: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001492.tgz#4a06861788a52b4c81fd3344573b68cc87fe062b" integrity sha512-2efF8SAZwgAX1FJr87KWhvuJxnGJKOnctQa8xLOskAXNXq8oiuqgl6u1kk3fFpsp3GgvzlRjiK1sl63hNtFADw== -chalk@^2.0.0: +chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== From 6c5ae903f93e6a578ec42c0211eeeb4c925d315f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 16:13:27 -0700 Subject: [PATCH 8/8] Bump @babel/traverse from 7.12.1 to 7.23.2 (#608) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.12.1 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 144 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 132 insertions(+), 12 deletions(-) diff --git a/yarn.lock b/yarn.lock index 84726650d..0761248c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,6 +9,14 @@ dependencies: "@babel/highlight" "^7.10.4" +"@babel/code-frame@^7.22.13": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" + integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== + dependencies: + "@babel/highlight" "^7.22.13" + chalk "^2.4.2" + "@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.7.5": version "7.12.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.3.tgz#1b436884e1e3bff6fb1328dc02b208759de92ad8" @@ -40,6 +48,16 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420" + integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g== + dependencies: + "@babel/types" "^7.23.0" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" @@ -101,6 +119,11 @@ "@babel/types" "^7.10.5" lodash "^4.17.19" +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== + "@babel/helper-explode-assignable-expression@^7.10.4": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz#8006a466695c4ad86a2a5f2fb15b5f2c31ad5633" @@ -117,6 +140,14 @@ "@babel/template" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== + dependencies: + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" + "@babel/helper-get-function-arity@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" @@ -124,6 +155,13 @@ dependencies: "@babel/types" "^7.10.4" +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-member-expression-to-functions@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz#fba0f2fcff3fba00e6ecb664bb5e6e26e2d6165c" @@ -212,11 +250,28 @@ dependencies: "@babel/types" "^7.11.0" +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-string-parser@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" + integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== + "@babel/helper-validator-identifier@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + "@babel/helper-wrap-function@^7.10.4": version "7.12.3" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz#3332339fc4d1fbbf1c27d7958c27d34708e990d9" @@ -245,11 +300,25 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.12.1", "@babel/parser@^7.12.3", "@babel/parser@^7.7.0": +"@babel/highlight@^7.22.13": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54" + integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.12.3", "@babel/parser@^7.7.0": version "7.12.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.3.tgz#a305415ebe7a6c7023b40b5122a0662d928334cd" integrity sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw== +"@babel/parser@^7.22.15", "@babel/parser@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" + integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== + "@babel/plugin-external-helpers@^7.0.0": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/plugin-external-helpers/-/plugin-external-helpers-7.12.1.tgz#df474775860b3b8bdfeaedd45596cd2c7f36a2be" @@ -676,20 +745,30 @@ "@babel/parser" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.4": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.1.tgz#941395e0c5cc86d5d3e75caa095d3924526f0c1e" - integrity sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw== +"@babel/template@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" + integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.1" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.12.1" - "@babel/types" "^7.12.1" + "@babel/code-frame" "^7.22.13" + "@babel/parser" "^7.22.15" + "@babel/types" "^7.22.15" + +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.4": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" + integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== + dependencies: + "@babel/code-frame" "^7.22.13" + "@babel/generator" "^7.23.0" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.0" + "@babel/types" "^7.23.0" debug "^4.1.0" globals "^11.1.0" - lodash "^4.17.19" "@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.7.0": version "7.12.1" @@ -700,6 +779,15 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" +"@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" + integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== + dependencies: + "@babel/helper-string-parser" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -1003,6 +1091,38 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" +"@jridgewell/gen-mapping@^0.3.2": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.19" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@react-native-community/cli-debugger-ui@^4.9.0": version "4.9.0" resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-4.9.0.tgz#4177764ba69243c97aa26829d59d9501acb2bd71"