Skip to content

Commit 4e0760d

Browse files
Merge pull request #8 from JoaoPauloCMarra/v0.2.0
V0.3.0
2 parents ca4f007 + 9e609aa commit 4e0760d

35 files changed

Lines changed: 5260 additions & 2472 deletions

.github/workflows/ci.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313

1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
1717

1818
- name: Setup Bun
1919
uses: oven-sh/setup-bun@v2
2020
with:
21-
bun-version: latest
21+
bun-version: 1.3.9
2222

2323
- name: Cache dependencies
24-
uses: actions/cache@v4
24+
uses: actions/cache@v5
2525
with:
2626
path: |
2727
~/.bun/install/cache
@@ -41,9 +41,10 @@ jobs:
4141
run: bun run test
4242

4343
- name: Run JavaScript tests with coverage
44-
run: |
45-
cd packages/react-native-nitro-storage
46-
bun run test:coverage
44+
run: bun run test:coverage
45+
46+
- name: Run benchmark regression checks
47+
run: bun run benchmark
4748

4849
- name: Setup CMake (for C++ tests)
4950
run: |

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,62 @@ All notable changes to this project are documented in this file.
44

55
The format follows Keep a Changelog and the project adheres to SemVer.
66

7+
## 0.3.0 - 2026-02-15
8+
9+
### Added
10+
- Add `useStorageSelector(item, selector, isEqual?)` to reduce rerenders from unrelated object updates.
11+
- Add opt-in `coalesceSecureWrites` and per-item `readCache` controls in `createStorageItem` config.
12+
- Add benchmark regression gate (`benchmark` task/script) and wire it into CI and publish checks.
13+
14+
### Changed
15+
- Switch default serialization to a primitive fast path for primitives while preserving JSON compatibility for objects and legacy values.
16+
- Replace broad listener fan-out with key-indexed registries and automatic pruning for memory/native/web paths.
17+
- Rework Turbo task graph so `build` depends on `codegen`, `test`/`typecheck` run from source, and `codegen` can be cached.
18+
19+
### Fixed
20+
- Route native batch calls through true adapter-level batch APIs (HybridStorage + iOS/Android adapters) instead of per-key loops.
21+
- Add read-through cache invalidation on scoped/key change events and native/web clear paths.
22+
23+
## 0.2.1 - 2026-02-15
24+
25+
### Added
26+
- Add explicit package `exports` for ESM/CJS/react-native/web resolution.
27+
28+
### Fixed
29+
- Preserve validation and TTL semantics in batch APIs by falling back to per-item paths when needed.
30+
- Preserve item-level semantics in transaction `setItem`/`removeItem` by using item methods directly.
31+
- Decode native batch missing values correctly to avoid empty-string ambiguity on iOS/Android C++ bindings.
32+
- Avoid duplicate observer updates on native/web `setBatch` paths.
33+
- Scope iOS disk storage to a dedicated UserDefaults suite and avoid clearing unrelated app defaults.
34+
- Use a package-specific Android master-key alias for encrypted storage initialization and recovery.
35+
- Expo config plugin now preserves existing `NSFaceIDUsageDescription` values.
36+
- Expo config plugin makes Android biometric permissions opt-in.
37+
38+
### Changed
39+
- Raise `react` peer dependency floor to `>=18.2.0`.
40+
- Update CI workflow action versions and Bun runtime pin to latest stable releases.
41+
42+
## 0.2.0 - 2026-02-15
43+
44+
### Added
45+
- Export `migrateFromMMKV` from the package root entrypoint.
46+
- Add dedicated web storage tests and include `index.web.ts` in coverage collection.
47+
- Add `runTransaction(scope, fn)` with rollback on thrown errors.
48+
- Add versioned migration APIs: `registerMigration` and `migrateToLatest`.
49+
- Add schema-aware storage options: `validate` and `onValidationError`.
50+
- Add per-item TTL support via `expiration.ttlMs`.
51+
52+
### Fixed
53+
- Validate batch operation scope to prevent mixed-scope usage.
54+
- Avoid duplicate native remove calls in `removeBatch`.
55+
- Clear cached item values on `delete()` to prevent stale reads (native and web).
56+
57+
### Changed
58+
- Standardize internal package scripts and README contributor commands to Bun/Bunx.
59+
- Remove the Turbo `test` outputs config to avoid warnings on non-coverage test runs.
60+
- Expand README with complete API behavior/throws documentation.
61+
- Strengthen native and web test coverage for validation, TTL, migrations, and transactions.
62+
763
## 0.1.4 - 2026-02-09
864

965
### Added

0 commit comments

Comments
 (0)