Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@react-native-ohos/async-storage

Package Overview
Dependencies
Maintainers
18
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version
2.2.1
to
2.2.2-beta.1
README.OpenSource

Sorry, the diff of this file is not supported yet

+1
-1

@@ -8,3 +8,3 @@ {

"name": "@react-native-ohos/async-storage",
"version": "2.2.1",
"version": "2.2.2-beta.1",
"description": "",

@@ -11,0 +11,0 @@ "main": "ts.ts",

@@ -29,2 +29,9 @@ /*

destroy() {
if (this.table.rdbStore !== null) {
this.table.rdbStore.close();
this.table.rdbStore = null;
}
}
/**

@@ -95,3 +102,3 @@ * Given an array of keys, this returns a map of (key, value) pairs for the keys found, and

Logger.warn(CommonConstants.TAG, e.message);
[AsyncStorageErrorUtil.getError(null, e.message), null];
return [AsyncStorageErrorUtil.getError(null, e.message), null];
} finally {

@@ -101,5 +108,3 @@ cursor.close();

for (let key of keysRemaining) {
let row: [string, string] = ['', ''];
row[0] = key;
data.push(row);
data.push([key, null]);
}

@@ -170,5 +175,5 @@ keysRemaining.clear();

await this.table.rdbStore.insert(ReactDatabaseSupplier.TABLE_CATALYST, obj, relationalStore.ConflictResolution.ON_CONFLICT_REPLACE)
this.table.rdbStore.commit();
Logger.debug(CommonConstants.TAG, `key: ${obj.key}, value: ${obj.value}, Insert success!`)
}
this.table.rdbStore.commit();
} catch (e) {

@@ -239,5 +244,5 @@ let e_message = `Insert is failed, code is ${e.code},message is ${e.message}`

await this.table.rdbStore.delete(predicates);
this.table.rdbStore.commit();
Logger.debug(CommonConstants.TAG, `keys: ${keys}, Delete success!`)
}
this.table.rdbStore.commit();
} catch (e) {

@@ -290,2 +295,3 @@ Logger.warn(CommonConstants.TAG, e.message);

try {
this.table.rdbStore.beginTransaction();
for (let idx = 0; idx < keyValueArray.length; idx++) {

@@ -309,2 +315,3 @@ if (keyValueArray[idx].length !== 2) {

}
this.table.rdbStore.commit();
} catch (e) {

@@ -355,3 +362,4 @@ Logger.warn(CommonConstants.TAG, e.message);

try {
await this.table.deleteRdbStore(this.ctx.uiAbilityContext);
let predicates = new relationalStore.RdbPredicates(ReactDatabaseSupplier.TABLE_CATALYST);
await this.table.rdbStore.delete(predicates);
} catch (e) {

@@ -358,0 +366,0 @@ Logger.warn(CommonConstants.TAG, `Module clear() error: ${e.message}`);

{
"name": "@react-native-ohos/async-storage",
"version": "2.2.1",
"version": "2.2.2-beta.1",
"description": "Asynchronous, persistent, key-value storage system for React Native.",

@@ -5,0 +5,0 @@ "main": "lib/commonjs/index.js",

@@ -1,52 +0,13 @@

# React Native Async Storage
# @react-native-ohos/async-storage
An asynchronous, unencrypted, persistent, key-value storage system for React
Native.
This project is based on [react-native-async-storage](https://github.com/react-native-async-storage/async-storage)
## Supported platforms
## Documentation
- Android
- iOS
- [macOS](https://github.com/react-native-async-storage/async-storage/releases/tag/v1.8.1)
- [Web](https://github.com/react-native-async-storage/async-storage/releases/tag/v1.9.0)
- [Windows](https://github.com/react-native-async-storage/async-storage/releases/tag/v1.10.0)
- [中文](https://gitcode.com/OpenHarmony-RN/usage-docs/blob/master/zh-cn/react-native-async-storage-async-storage.md)
## Getting Started
- [English](https://gitcode.com/OpenHarmony-RN/usage-docs/blob/master/en/react-native-async-storage-async-storage.md)
Head over to the
[documentation](https://react-native-async-storage.github.io/async-storage/docs/install)
to learn more.
## Running E2E locally
### Android
1. Create and start Android Emulator with Play services, API level 29
2. Build app and run tests
```shell
yarn bundle:android
yarn build:e2e:android
yarn test:e2e:android
```
### iOS
1. Create and start iPhone 14 simulator with iOS version 16.4
2. Build app and run tests
```shell
yarn bundle:ios
pod install --project-directory=example/ios
yarn build:e2e:ios
yarn test:e2e:ios
```
## Contribution
Pull requests are welcome. Please open an issue first to discuss what you would
like to change.
See the [CONTRIBUTING](.github/CONTRIBUTING.md) file for more information.
## License
MIT
This library is licensed under [The MIT License (MIT)](https://github.com/react-native-async-storage/async-storage?tab=MIT-1-ov-file#readme)

Sorry, the diff of this file is not supported yet

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/harmony.iml" filepath="$PROJECT_DIR$/.idea/harmony.iml" />
</modules>
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>

Sorry, the diff of this file is not supported yet