From a62a7177cc73380a2fbd3254f3aec6b6fb35c671 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Mon, 8 Aug 2022 12:54:30 +0200 Subject: [PATCH] fix: Remove fbjs in favor of `invariant` lib (#367) --- example/js/CameraRollExample.js | 2 +- js/CameraRoll.js | 2 +- package.json | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/example/js/CameraRollExample.js b/example/js/CameraRollExample.js index 02c88ae..d938989 100644 --- a/example/js/CameraRollExample.js +++ b/example/js/CameraRollExample.js @@ -24,7 +24,7 @@ const { import CameraRoll from '../../js/CameraRoll'; import type {PhotoIdentifier, GroupTypes} from '../../js/CameraRoll'; -const invariant = require('fbjs/lib/invariant'); +const invariant = require('invariant'); const CameraRollView = require('./CameraRollView'); diff --git a/js/CameraRoll.js b/js/CameraRoll.js index 859060d..ab4f420 100644 --- a/js/CameraRoll.js +++ b/js/CameraRoll.js @@ -11,7 +11,7 @@ import {Platform} from 'react-native'; import RNCCameraRoll from './nativeInterface'; -const invariant = require('fbjs/lib/invariant'); +const invariant = require('invariant'); const GROUP_TYPES_OPTIONS = { Album: 'Album', diff --git a/package.json b/package.json index 553628e..74e8ea9 100644 --- a/package.json +++ b/package.json @@ -126,5 +126,8 @@ "repository": { "type": "git", "url": "https://github.com/react-native-community/react-native-cameraroll.git" + }, + "dependencies": { + "invariant": "^2.2.4" } }