Socket
Socket
Sign inDemoInstall

@react-native-async-storage/async-storage

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-async-storage/async-storage - npm Package Compare versions

Comparing version 1.17.10 to 1.18.2

4

lib/commonjs/AsyncStorage.js

@@ -53,5 +53,3 @@ "use strict";

return Promise.all(promises).then(result => {
var _processResult;
const value = (_processResult = processResult === null || processResult === void 0 ? void 0 : processResult(result)) !== null && _processResult !== void 0 ? _processResult : null;
const value = (processResult === null || processResult === void 0 ? void 0 : processResult(result)) ?? null;
callback === null || callback === void 0 ? void 0 : callback(null, value);

@@ -58,0 +56,0 @@ return Promise.resolve(value);

@@ -13,9 +13,10 @@ "use strict";

// @ts-ignore Module '"react-native"' has no exported member 'TurboModuleRegistry'.
let RCTAsyncStorage = _reactNative.NativeModules['PlatformLocalStorage'] || // Support for external modules, like react-native-windows
// TurboModuleRegistry falls back to NativeModules so we don't have to try go
// assign NativeModules' counterparts if TurboModuleRegistry would resolve
// with undefined.
let RCTAsyncStorage = _reactNative.TurboModuleRegistry ? _reactNative.TurboModuleRegistry.get('PlatformLocalStorage') || // Support for external modules, like react-native-windows
_reactNative.TurboModuleRegistry.get('RNC_AsyncSQLiteDBStorage') || _reactNative.TurboModuleRegistry.get('RNCAsyncStorage') : _reactNative.NativeModules['PlatformLocalStorage'] || // Support for external modules, like react-native-windows
_reactNative.NativeModules['RNC_AsyncSQLiteDBStorage'] || _reactNative.NativeModules['RNCAsyncStorage'];
if (!RCTAsyncStorage && (0, _shouldFallbackToLegacyNativeModule.shouldFallbackToLegacyNativeModule)()) {
// TurboModuleRegistry falls back to NativeModules so we don't have to try go
// assign NativeModules' counterparts if TurboModuleRegistry would resolve
// with undefined.
if (_reactNative.TurboModuleRegistry) {

@@ -22,0 +23,0 @@ RCTAsyncStorage = _reactNative.TurboModuleRegistry.get('AsyncSQLiteDBStorage') || _reactNative.TurboModuleRegistry.get('AsyncLocalStorage');

@@ -43,5 +43,3 @@ /**

return Promise.all(promises).then(result => {
var _processResult;
const value = (_processResult = processResult === null || processResult === void 0 ? void 0 : processResult(result)) !== null && _processResult !== void 0 ? _processResult : null;
const value = (processResult === null || processResult === void 0 ? void 0 : processResult(result)) ?? null;
callback === null || callback === void 0 ? void 0 : callback(null, value);

@@ -48,0 +46,0 @@ return Promise.resolve(value);

// @ts-ignore Module '"react-native"' has no exported member 'TurboModuleRegistry'.
import { NativeModules, TurboModuleRegistry } from 'react-native';
import { shouldFallbackToLegacyNativeModule } from './shouldFallbackToLegacyNativeModule';
let RCTAsyncStorage = NativeModules['PlatformLocalStorage'] || // Support for external modules, like react-native-windows
import { shouldFallbackToLegacyNativeModule } from './shouldFallbackToLegacyNativeModule'; // TurboModuleRegistry falls back to NativeModules so we don't have to try go
// assign NativeModules' counterparts if TurboModuleRegistry would resolve
// with undefined.
let RCTAsyncStorage = TurboModuleRegistry ? TurboModuleRegistry.get('PlatformLocalStorage') || // Support for external modules, like react-native-windows
TurboModuleRegistry.get('RNC_AsyncSQLiteDBStorage') || TurboModuleRegistry.get('RNCAsyncStorage') : NativeModules['PlatformLocalStorage'] || // Support for external modules, like react-native-windows
NativeModules['RNC_AsyncSQLiteDBStorage'] || NativeModules['RNCAsyncStorage'];
if (!RCTAsyncStorage && shouldFallbackToLegacyNativeModule()) {
// TurboModuleRegistry falls back to NativeModules so we don't have to try go
// assign NativeModules' counterparts if TurboModuleRegistry would resolve
// with undefined.
if (TurboModuleRegistry) {

@@ -12,0 +13,0 @@ RCTAsyncStorage = TurboModuleRegistry.get('AsyncSQLiteDBStorage') || TurboModuleRegistry.get('AsyncLocalStorage');

{
"name": "@react-native-async-storage/async-storage",
"version": "1.17.10",
"version": "1.18.2",
"description": "Asynchronous, persistent, key-value storage system for React Native.",

@@ -40,3 +40,2 @@ "main": "lib/commonjs/index.js",

"scripts": {
"ci": "yarn --pure-lockfile --non-interactive --cache-folder .cache/yarn",
"format": "concurrently yarn:format:*",

@@ -51,3 +50,3 @@ "format:c": "clang-format -i $(git ls-files '*.cpp' '*.h' '*.m' '*.mm')",

"start:web": "expo start:web",
"start:windows": "react-native start --use-react-native-windows",
"start:windows": "install-windows-test-app -p example/windows && react-native run-windows --root example --logging --no-packager --no-telemetry",
"build:e2e:android": "scripts/android_e2e.sh 'build'",

@@ -70,3 +69,3 @@ "build:e2e:ios": "scripts/ios_e2e.sh 'build'",

"peerDependencies": {
"react-native": "^0.0.0-0 || 0.60 - 0.70 || 1000.0.0"
"react-native": "^0.0.0-0 || 0.60 - 0.72 || 1000.0.0"
},

@@ -76,23 +75,24 @@ "devDependencies": {

"@babel/preset-env": "^7.1.6",
"@expo/webpack-config": "^0.16.0",
"@react-native-community/eslint-config": "^3.0.0",
"@semantic-release/changelog": "^6.0.0",
"@semantic-release/git": "^10.0.0",
"@types/lodash": "^4.14.184",
"@types/react": "^17.0.0",
"@types/react-native": "^0.66.0",
"@types/react-native": "^0.68.0",
"concurrently": "^6.4.0",
"detox": "^19.4.5",
"eslint": "^7.0.0",
"expo": "^43.0.0",
"eslint": "^8.0.0",
"expo": "^45.0.0",
"jest": "^26.6.3",
"jest-circus": "^26.6.1",
"lodash": "^4.17.21",
"prettier": "^2.5.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "^0.66.0-0",
"react-native": "^0.68.0",
"react-native-builder-bob": "^0.18.0",
"react-native-macos": "^0.66.0-0",
"react-native-test-app": "^1.3.4",
"react-native-macos": "^0.68.0",
"react-native-test-app": "^2.3.10",
"react-native-web": "^0.17.0",
"react-native-windows": "^0.66.0-0",
"react-native-windows": "^0.68.0",
"react-test-renderer": "17.0.2",

@@ -102,3 +102,6 @@ "semantic-release": "^19.0.0",

},
"packageManager": "yarn@3.4.1",
"resolutions": {
"body-parser/qs": "^6.7.3",
"find-babel-config/json5": "^2.1.1",
"npm/chalk": "^4.1.2"

@@ -105,0 +108,0 @@ },

@@ -5,11 +5,14 @@ // @ts-ignore Module '"react-native"' has no exported member 'TurboModuleRegistry'.

let RCTAsyncStorage =
NativeModules['PlatformLocalStorage'] || // Support for external modules, like react-native-windows
NativeModules['RNC_AsyncSQLiteDBStorage'] ||
NativeModules['RNCAsyncStorage'];
// TurboModuleRegistry falls back to NativeModules so we don't have to try go
// assign NativeModules' counterparts if TurboModuleRegistry would resolve
// with undefined.
let RCTAsyncStorage = TurboModuleRegistry
? TurboModuleRegistry.get('PlatformLocalStorage') || // Support for external modules, like react-native-windows
TurboModuleRegistry.get('RNC_AsyncSQLiteDBStorage') ||
TurboModuleRegistry.get('RNCAsyncStorage')
: NativeModules['PlatformLocalStorage'] || // Support for external modules, like react-native-windows
NativeModules['RNC_AsyncSQLiteDBStorage'] ||
NativeModules['RNCAsyncStorage'];
if (!RCTAsyncStorage && shouldFallbackToLegacyNativeModule()) {
// TurboModuleRegistry falls back to NativeModules so we don't have to try go
// assign NativeModules' counterparts if TurboModuleRegistry would resolve
// with undefined.
if (TurboModuleRegistry) {

@@ -16,0 +19,0 @@ RCTAsyncStorage =

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc