Skip to content

Commit 7dbcc4a

Browse files
committed
release: bump version to 0.0.8 with critical array splice bug fixes and validation
1 parent 3a1dae3 commit 7dbcc4a

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# Changelog
22

3+
## [0.0.8] - 2025-08-27
4+
5+
### Fixed
6+
7+
#### Array Splice Method Critical Bug Fixes
8+
9+
- **Fixed "Length exceeded!" error** in array splice operations that occurred when Y.js delete was called multiple times inside loops
10+
- **Fixed empty array handling** - Setting arrays to `[]` no longer returns `null`, properly maintains empty array state
11+
- **Fixed Y.js document synchronization** - Array operations now properly sync between Svelte5 $state and Y.js document
12+
- **Added comprehensive bounds validation** for array splice method to prevent crashes and ensure native JavaScript Array compatibility
13+
14+
#### Array Splice Bounds Validation
15+
16+
- **Negative start indices** - Now properly handles negative indices like native `Array.splice()` (e.g., `-1` refers to last element)
17+
- **Start index beyond array length** - Safely clamps to array bounds instead of causing errors
18+
- **Excessive deleteCount** - Prevents attempting to delete more items than available
19+
- **Negative deleteCount** - Treats negative values as 0 (no deletion) matching native behavior
20+
- **Edge case handling** - Robust handling of empty arrays, single elements, and boundary violations
21+
22+
#### Array Schema Coercion Fix
23+
24+
- **Fixed empty array coercion** - Empty arrays `[]` are now properly coerced and maintained instead of being converted to `null`
25+
26+
### Technical Improvements
27+
28+
- **Enhanced test coverage** with comprehensive diagnostic and bounds validation test suites
29+
- **Improved error handling** - Array operations no longer throw "Length exceeded!" errors under any circumstances
30+
- **Better Y.js integration** - Proper synchronization between proxy arrays and underlying Y.js documents
31+
- **Memory optimization** - Fixed state cleanup order in splice operations to prevent memory spikes
32+
33+
### Breaking Changes
34+
35+
None - All fixes maintain backward compatibility while resolving critical synchronization bugs.
36+
37+
---
38+
339
## [0.0.7] - 2025-08-27
440

541
### Added

package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "syncrostate",
3-
"version": "0.0.7",
3+
"version": "0.0.8",
44
"description": "A reactive and real-time state management solution integrating Yjs with Svelte 5's runes for seamless collaborative applications",
55
"publishConfig": {
66
"access": "public"

0 commit comments

Comments
 (0)