Version History
0.3.0 (Current)
Latest stable release with anti-cheat system and integrity verification.0.2.0
Introduced item collection and runtime max progress.0.1.0
Initial release with core achievement system and React bindings.Migrating from 0.2.x to 0.3.0
Anti-Cheat System
What changed: Version 0.3.0 introduces a pluggable anti-cheat system with automatic tamper detection. Impact: Low — the default behavior is backward compatible, but you should handle tamper events.Before (0.2.x)
After (0.3.0)
In Your App Component
Custom Hash Adapters
What changed: You can now provide custom hash functions for stronger integrity checks.Using Web Crypto API (HMAC-SHA-256)
State Wiping Behavior
What changed: When tamper is detected, ALL storage keys (unlocked, progress, items) are now wiped atomically.
Impact: Low — this prevents partial state corruption.
Before (0.2.x):
- Items cleared individually
- Could leave stale progress after tamper
- All three keys wiped together after hydration
- Clean slate on tamper detection
Migrating from 0.1.x to 0.2.0
Item Collection API
What changed: Version 0.2.0 introducedcollectItem() and getItems() for managing unique item sets.
Impact: None if you don’t use item collection. Additive change only.
New Features
Using in React
Runtime Max Progress
What changed: You can now updatemaxProgress at runtime with setMaxProgress().
Impact: None — existing static maxProgress values continue to work.
Use Case: Server-Driven Counts
React Example
Reset Behavior
What changed:reset() now also clears item sets and removes the "items" storage key.
Impact: None — more thorough cleanup is backward compatible.
Before (0.1.x):
Hook Stability Fixes
What changed: Fixed infinite render loops inuseEngineState and useAchievementToast.
Impact: None — these were internal bugs. Your code should be more stable.
Details:
useEngineStateselector no longer tracked as dependency (caused loop with array refs)useAchievementToastdismiss callback now stable (was recreated with.bind()each render)
General Migration Tips
Type Safety
Always derive your ID type from definitions:Storage Keys
If you prefix your storage keys, versions are compatible:Testing Migrations
-
Export current data before upgrading:
-
Upgrade packages:
-
Test in development with backed-up data:
Breaking Change Checklist
When upgrading, check:- Read the CHANGELOG for your target version
- Update import statements if packages were restructured
- Add tamper detection handler (0.3.0+)
- Test with existing localStorage data
- Update TypeScript types if engine API changed
- Review and update tests
