Conversation
Pull Request Test Coverage Report for Build 22577657716Details
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
This PR makes DataStore event-driven by having it extend NanoEmitter, adds a strongly-typed DataStoreEventMap, emits events throughout key lifecycle operations (load/update/migrate/delete/errors), and documents/tests the new event surface.
Changes:
DataStorenow extendsNanoEmitterand emits events likeloadData,updateData(Sync),migrateData,migrateId,deleteData,error, andmigrationError.- Added extensive Vitest coverage for the new event emissions.
- Updated documentation and added a changeset describing the new event API.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/DataStore.ts | Makes DataStore extend NanoEmitter, defines DataStoreEventMap, and emits events across operations. |
| lib/test/DataStore.spec.ts | Adds tests asserting correct event emission behavior for load/update/migration/error flows. |
| docs.md | Documents DataStore’s inheritance from NanoEmitter, adds events section and DataStoreEventMap docs. |
| lib/test/other/userutils_v9_datastore_migration_test/gm_polyfill.js | Improves module JSDoc and clarifies storage key prefix usage for tests. |
| .changeset/wild-cycles-thank.md | Announces the new DataStore event API as a minor version change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.