BREAKING CHANGE(core): major architectural refactoring with cross-platform support and SmartRequest rename
Some checks failed
Default (tags) / security (push) Failing after 24s
Default (tags) / test (push) Failing after 12s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped

This commit is contained in:
2025-07-28 23:20:52 +00:00
parent 8e75047d1f
commit 2dc82bd730
10 changed files with 2019 additions and 2545 deletions

View File

@@ -1,5 +1,34 @@
# Changelog
## 2025-07-28 - 4.0.0 - BREAKING CHANGE(core)
Complete architectural overhaul with cross-platform support
**Breaking Changes:**
- Renamed `SmartRequestClient` to `SmartRequest` for simpler, cleaner API
- Removed legacy API entirely (no more `/legacy` import path)
- Major architectural refactoring:
- Added abstraction layer with `core_base` containing abstract classes
- Split implementations into `core_node` (Node.js) and `core_fetch` (browser)
- Dynamic implementation selection based on environment
- Response streaming API changes:
- `stream()` now always returns web-style `ReadableStream<Uint8Array>`
- Added `streamNode()` for Node.js streams (throws error in browser)
- Unified type system with single `ICoreRequestOptions` interface
- Removed all "Abstract" prefixes from type names
**Features:**
- Full cross-platform support (Node.js and browsers)
- Automatic platform detection using @push.rocks/smartenv
- Consistent API across platforms with platform-specific capabilities
- Web Streams API support in both environments
- Better error messages for unsupported platform features
**Documentation:**
- Completely rewritten README with platform-specific examples
- Added architecture overview section
- Added migration guide from v2.x and v3.x
- Updated all examples to use the new `SmartRequest` class name
## 2025-07-27 - 3.0.0 - BREAKING CHANGE(core)
Major architectural refactoring with fetch-like API