Skip to content

Commit 2986e2c

Browse files
committed
chore: formatting
1 parent 4f0061c commit 2986e2c

File tree

16 files changed

+178
-178
lines changed

16 files changed

+178
-178
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
branches:
55
- main
66
paths:
7-
- 'docs/**'
8-
- 'mkdocs.yml'
9-
- 'packages/async-storage/CHANGELOG.md'
7+
- "docs/**"
8+
- "mkdocs.yml"
9+
- "packages/async-storage/CHANGELOG.md"
1010
workflow_dispatch:
1111
jobs:
1212
deploy-docs:

docs/api/brownfield.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ runBlocking {
2828
}
2929
```
3030

31-
3231
### iOS / macOS
3332

3433
On iOS/macOS, the `StorageRegistry` singleton provides the same functionality in Swift/Objc.

docs/api/errors.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,21 @@ This class extends the standard `Error` class, by adding a `type` property to he
77

88
The error type is an enum `AsyncStorageError.Type` with the following possible values:
99

10-
1110
### NativeModuleError
1211

1312
Raised when the RN native module itself fails — for example,
1413
the module is null at app startup, or not initialized correctly.
1514

16-
1715
### WebStorageError
1816

1917
Web only, when an IndexedDB operation fails.
2018
[See IndexedDB error codes](https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/error.
2119

22-
2320
### SqliteStorageError
2421

2522
Raised when SQLite itself fails on iOS, macOS, or Android.
2623
[See SQLite error codes](https://www.sqlite.org/rescode.html).
2724

28-
2925
### OtherStorageError
3026

3127
Raised for other storage-related failures that don’t fit into the categories above.
@@ -38,14 +34,16 @@ Examples include:
3834
- Legacy storage exceptions (any error thrown by v2 implementation falls here)
3935

4036
### UnknownError
41-
A catch-all for cases where the system cannot classify the error.
4237

38+
A catch-all for cases where the system cannot classify the error.
4339

4440
## Example of error handling
4541

46-
4742
```typescript
48-
import { createAsyncStorage, AsyncStorageError } from "@react-native-async-storage/async-storage";
43+
import {
44+
createAsyncStorage,
45+
AsyncStorageError,
46+
} from "@react-native-async-storage/async-storage";
4947

5048
const storage = createAsyncStorage("user");
5149

examples/compose-ios/iosApp/Preview Content/Preview Assets.xcassets/Contents.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/react-native/app.json

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,9 @@
88
}
99
],
1010
"resources": {
11-
"android": [
12-
"dist/res",
13-
"dist/main.android.jsbundle"
14-
],
15-
"ios": [
16-
"dist/assets",
17-
"dist/main.ios.jsbundle"
18-
],
19-
"macos": [
20-
"dist/assets",
21-
"dist/main.macos.jsbundle"
22-
],
23-
"windows": [
24-
"dist/assets",
25-
"dist/main.windows.bundle"
26-
]
11+
"android": ["dist/res", "dist/main.android.jsbundle"],
12+
"ios": ["dist/assets", "dist/main.ios.jsbundle"],
13+
"macos": ["dist/assets", "dist/main.macos.jsbundle"],
14+
"windows": ["dist/assets", "dist/main.windows.bundle"]
2715
}
2816
}

examples/react-native/src/App.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ function App(): React.JSX.Element {
5656
case "legacy-basic":
5757
return <BasicTests key={example} storageName={null} />;
5858
case "perf":
59-
return <PerformanceTests key={example} storageName="test-db-storage" />;
59+
return (
60+
<PerformanceTests key={example} storageName="test-db-storage" />
61+
);
6062
case "legacy-perf":
6163
return <PerformanceTests key={example} storageName={null} />;
6264
}

mkdocs.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ nav:
66
- Overview: index.md
77
- API:
88
- Usage: api/usage.md
9-
- 'Database naming': api/db-naming.md
10-
- 'Error handling': api/errors.md
11-
- 'Brownfield integration': api/brownfield.md
12-
- 'Migration to v3': migration-to-3.md
9+
- "Database naming": api/db-naming.md
10+
- "Error handling": api/errors.md
11+
- "Brownfield integration": api/brownfield.md
12+
- "Migration to v3": migration-to-3.md
1313
- Contributing: contributing.md
1414
- Changelog: changelog.md
1515

16-
1716
theme:
1817
name: material
1918
palette:

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 '*.js' '*.json' '*.ts' '*.tsx' '*.yml' 'README.md')",
13+
"format:js": "prettier --write $(git ls-files '*.ts' '*.tsx' '*.json' '*.yml' 'README.md' docs/*.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 '*.js' '*.json' '*.ts' '*.tsx' '*.yml' 'README.md')",
16+
"test:format": "prettier --check --loglevel warn $(git ls-files '*.ts' '*.tsx' '*.json' '*.yml' 'README.md' docs/*.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",
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#import <AsyncStorageSpec/AsyncStorageSpec.h>
2+
23
#import <React/RCTBridgeModule.h>
34

45
@interface AsyncStorage : NSObject <
56
#ifdef RCT_NEW_ARCH_ENABLED
6-
NativeAsyncStorageSpec
7+
NativeAsyncStorageSpec
78
#else
8-
RCTBridgeModule
9+
RCTBridgeModule
910
#endif
10-
>
11+
>
1112

1213
@end

0 commit comments

Comments
 (0)