Skip to content

Conversation

@thgaskell
Copy link
Contributor

This pull request introduces significant updates to the radfish package, focusing on storage enhancements, service worker integration, and improved testing and configuration. The key changes include the addition of a Collection class for managing data with connectors, refactoring of service worker installation, and the introduction of Babel and Jest configurations for better development and testing workflows.

Storage Enhancements:

  • Added a new Collection class to manage data with schema validation, support for unique constraints, and CRUD operations (create, find, update, delete). It integrates with connectors and emits lifecycle events for each operation.
  • Introduced unit tests for the Collection class to ensure correct functionality, covering schema validation, event emission, and connector interactions.

Service Worker Integration:

  • Refactored service worker registration by introducing an asynchronous registerServiceWorker function. This replaces the previous setupWorker approach and provides better error handling and logging.
  • Updated the _installServiceWorker method in the Application class to use the new service worker registration logic.

Development and Testing Workflow:

  • Added a babel.config.js file with presets for @babel/preset-env and @babel/preset-typescript to enable modern JavaScript and TypeScript transpilation.
  • Add Jest tests to @nmfs-radfish/radfish package

Template

  • Removed mock service worker from the template repository and allow users to opt-in.

@thgaskell thgaskell requested a review from jaygiang May 16, 2025 22:41
Copy link
Collaborator

@jaygiang jaygiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

@thgaskell thgaskell merged commit f38585e into main May 17, 2025
3 checks passed
@thgaskell thgaskell deleted the storage branch May 17, 2025 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants