Conversation
* ci: add file to handle github workflows * feat(cache): rework expiry system and update get / all method according to changes * feat(cache): create interface for KeyPairValue and fix issue with undefined values * fix(test): fix issue with test after adding KeyPairValue interface * revert(cache): go back to old set method * update package.json
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the package dependencies, improves type safety with generics throughout the codebase, adds new functionality (merge mode for updates, data validation methods), and migrates from pnpm to npm with Node.js 24 requirement. The changes include:
- Adding TypeScript generics for type-safe data handling across File, Cache, and interfaces
- Introducing a new
DataBuddyclass that wraps File and Cache operations - Adding merge mode to the
update()method for partial updates - Adding
isValidJson()andisValidData()validation methods - Updating the
delete()method to return false instead of throwing when file doesn't exist - Major dependency updates and Node.js version bump to 24
Reviewed Changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Bumps Node.js engine to >=24.0.0, updates all dependencies, switches from pnpm to npm |
| src/file.ts | Adds generics, merge mode for updates, validation methods, changes delete error handling |
| src/cache.ts | Adds generics for type-safe cache operations |
| src/data_buddy.ts | New class providing unified interface for file and cache operations |
| src/types/*.ts | Adds generic type parameters to all interfaces |
| tests/data_buddy.spec.ts | Adds comprehensive tests for new features |
| .github/workflows/*.yml | Refactors CI workflows and adds npm publishing workflow |
| readme.md | Updates documentation with new features and examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.