Skip to content

Commit e3fc528

Browse files
committed
chore: formatting
1 parent a0af93c commit e3fc528

File tree

6 files changed

+26
-33
lines changed

6 files changed

+26
-33
lines changed

.github/CONTRIBUTING.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ your feedback about anything, so please let us know.
66

77
## Tests
88

9-
We use TypeScript for type check, `eslint` with `prettier` for
10-
linting/formatting. All tests are run on Github Actions for all opened pull requests, but you should use them locally when
9+
We use TypeScript for type check, `eslint` with `prettier` for linting/formatting. All tests are run on Github Actions
10+
for all opened pull requests, but you should use them locally
11+
when
1112
making changes.
1213

1314
- `yarn test:lint`: Run `eslint` check.
1415
- `yarn test:ts`: Run `tsc` type check.
1516
- `yarn test:format`: Run `prettier` check for formatting mistakes.
1617

17-
1818
You can also run unit tests for `shared-storage`, using one of gradle task:
1919

2020
- `./gradlew testAndroidHostTest`
@@ -31,16 +31,16 @@ When you're sending a pull request:
3131
test/check.
3232
- Please make sure that all tests are passing on your local machine.
3333
- Please make sure you've run formatters and linters locally.
34-
- In VS Code, you can press ⇧+Alt+F or ⇧⌥F to format the current file.
35-
- To format C++ and Objective-C files, make sure you have the
36-
[C/C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)
37-
installed.
38-
- To format JavaScript files, please install
39-
[Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode).
40-
- From the command line, you can run `yarn format:c` and `yarn format:js` to
41-
format C-based languages and JavaScript respectively. The first command
42-
requires that you've already installed
43-
[ClangFormat](https://clang.llvm.org/docs/ClangFormat.html).
34+
- In VS Code, you can press ⇧+Alt+F or ⇧⌥F to format the current file.
35+
- To format C++ and Objective-C files, make sure you have the
36+
[C/C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)
37+
installed.
38+
- To format JavaScript files, please install
39+
[Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode).
40+
- From the command line, you can run `yarn format:c` and `yarn format:js` to
41+
format C-based languages and JavaScript respectively. The first command
42+
requires that you've already installed
43+
[ClangFormat](https://clang.llvm.org/docs/ClangFormat.html).
4444
- Follow the template when opening a PR.
4545

4646
## Commits and versioning
@@ -68,7 +68,7 @@ Most notably prefixes you'll see:
6868

6969
## Release process
7070

71-
We use [Changeset](https://github.com/changesets/changesets) to manage releases.
71+
We use [Changeset](https://github.com/changesets/changesets) to manage releases.
7272
In your PR, run `yarn changeset` to create a new changeset, describing your changes.
7373
The Changeset Bot will help you out during opening a PR.
7474

.github/workflows/pull-request.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ jobs:
2626
strategy:
2727
matrix:
2828
os: [macos-latest, ubuntu-24.04]
29-
testName:
30-
[testAndroidHostTest, macosArm64Test, iosSimulatorArm64Test]
29+
testName: [testAndroidHostTest, macosArm64Test, iosSimulatorArm64Test]
3130
exclude:
3231
- testName: testAndroidHostTest
3332
os: macos-latest

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
Async Storage is an asynchronous, unencrypted, persistent key-value storage solution for your React Native application.
44
It provides a simple API compatible with the [Web Storage API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API), with additional extensions for batch operations and multi-database support.
55

6-
76
## Supported platforms
87

98
- **Android** (SQLite backend via Room KMP)
@@ -12,18 +11,16 @@ It provides a simple API compatible with the [Web Storage API](https://developer
1211
- **macOS** (SQLite backend via Room KMP)
1312
- **Windows** (legacy fallback, single database only)
1413

15-
1614
## Supported versions
1715

1816
| Component | Minimum Version |
19-
|--------------------------|-----------------|
17+
| ------------------------ | --------------- |
2018
| kotlin | 2.1.0 |
2119
| ios/android React Native | 0.76 |
2220
| android min sdk | 24 |
2321
| macOS React Native | 0.78 |
2422
| macOS min target | 12 |
2523

26-
2724
---
2825

2926
## Installation
@@ -85,7 +82,6 @@ async function demo() {
8582

8683
Head over to [Usage page](api/usage.md) to learn more.
8784

88-
8985
## License
9086

91-
MIT
87+
MIT

docs/api/db-naming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ Creates database named `user-1234`:
7979
### Windows
8080

8181
On the Web, `databaseName` corresponds directly to the name of the IndexedDB database.
82-
Although the `async-storage` grouping is abstracted away, the name remains unique across instances.
82+
Although the `async-storage` grouping is abstracted away, the name remains unique across instances.

docs/migration-to-3.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@ AsyncStorage v3 introduces a few breaking changes to simplify the API and make i
99
Here is the table describing minimum requirements for v3:
1010

1111
| Component | Minimum Version |
12-
|--------------------------|-----------------|
12+
| ------------------------ | --------------- |
1313
| kotlin | 2.1.0 |
1414
| ios/android React Native | 0.76 |
1515
| android min sdk | 24 |
1616
| macOS React Native | 0.78 |
1717
| macOS min target | 12 |
1818

19-
20-
2119
### Installation changes
2220

2321
Android requires a local Maven repository to be added to your `android/build.gradle(.kts)`:
22+
2423
```groovy
2524
allprojects {
2625
repositories {
@@ -41,8 +40,8 @@ Each instance represents an **isolated storage area**, providing separation betw
4140

4241
```typescript
4342
// create separate storages
44-
const userStorage = createAsyncStorage('user');
45-
const cacheStorage = createAsyncStorage('cache');
43+
const userStorage = createAsyncStorage("user");
44+
const cacheStorage = createAsyncStorage("cache");
4645
```
4746

4847
### Default export still points to v2 storage
@@ -55,8 +54,8 @@ This ensures that:
5554

5655
```typescript
5756
// Still works (uses the v2 backend)
58-
import AsyncStorage from '@react-native-async-storage/async-storage';
59-
await AsyncStorage.setItem('foo', 'bar');
57+
import AsyncStorage from "@react-native-async-storage/async-storage";
58+
await AsyncStorage.setItem("foo", "bar");
6059
```
6160

6261
### Callbacks removed - Promises only
@@ -142,4 +141,3 @@ Renamed to `removeMany`, this method accepts a list of keys to remove.
142141

143142
+ removeMany(keys: string[]): Promise<void>;
144143
```
145-

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"build:js": "yarn workspace @react-native-async-storage/async-storage build",
1111
"format": "concurrently 'yarn:format:*'",
1212
"format:c": "clang-format -i $(git ls-files '*.cpp' '*.h' '*.m' '*.mm') --style file:.config/.clang-format",
13-
"format:js": "prettier --write $(git ls-files '*.ts' '*.tsx' '*.json' '*.yml' 'README.md' docs/*.md)",
13+
"format:js": "prettier --write $(git ls-files '*.ts' '*.tsx' '*.json' '*.yml' 'README.md' 'docs/*.md' ':!docs/index.md' ':!docs/contributing.md' ':!docs/changelog.md')",
1414
"test:lint": "turbo run test:lint",
1515
"test:ts": "turbo run test:ts",
16-
"test:format": "prettier --check --loglevel warn $(git ls-files '*.ts' '*.tsx' '*.json' '*.yml' 'README.md' docs/*.md)",
16+
"test:format": "prettier --check --log-level warn $(git ls-files '*.ts' '*.tsx' '*.json' '*.yml' 'README.md' 'docs/*.md' ':!docs/index.md' ':!docs/contributing.md' ':!docs/changelog.md')",
1717
"release:version": "./.github/scripts/setup-ci-git-user.sh && changeset version",
1818
"release:publish": "./.github/scripts/setup-ci-git-user.sh && changeset publish",
1919
"docs:dev": "mkdocs serve",

0 commit comments

Comments
 (0)