Skip to content

Updates - #250

Merged
gilbarbara merged 3 commits into
mainfrom
updates
May 5, 2026
Merged

Updates#250
gilbarbara merged 3 commits into
mainfrom
updates

Conversation

@gilbarbara

Copy link
Copy Markdown
Owner

This pull request introduces several improvements and fixes related to cache handling, concurrent requests, and testing infrastructure. The most significant changes include enhanced error handling for concurrent cache requests, improved test coverage for cache behaviors, and various dependency updates. Below are the most important changes grouped by theme.

Cache and Concurrency Improvements:

  • Improved error handling in CacheStore: now, if a concurrent request fails, all waiting calls are properly rejected, ensuring consistent error propagation for in-flight requests.
  • Added a test to verify that concurrent get() calls in CacheStore are rejected if the underlying fetch fails.
  • Updated the cache logic in tests to support multiple named caches, improving isolation and accuracy in persistent cache scenarios. [1] [2]

Testing Enhancements:

  • Added a test to ensure that all concurrent ReactInlineSVG instances render their fallback content and call onError when a request fails, and that only a single fetch is performed.
  • Added tests to verify cache isolation between the singleton cache and provider caches, as well as between providers with different cache names.
  • Updated persistent cache tests to clear all cache instances and the singleton cache between tests for better test reliability.

Code Quality and Refactoring:

  • Inlined the processSVG logic directly into getNode and removed the now-unused processSVG function, simplifying the SVG processing code. [1] [2]
  • Refactored the omit helper to combine conditional checks for improved readability and performance.

Dependency Updates:

  • Updated several development dependencies in package.json, including eslint, prettier, react, jsdom, and testing tools, to their latest versions for improved tooling and compatibility.

Copilot AI review requested due to automatic review settings April 30, 2026 21:57

This comment was marked as outdated.

- fix lint warnings

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/modules/cache.ts Outdated
gilbarbara added 2 commits May 4, 2026 21:42
Concurrent get() callers waiting on an in-flight fetch resolved
with empty content when the fetch failed. Now they throw the
original error so onError fires for all callers. AbortError is
filtered out so waiters don't reject on aborts they didn't trigger.
@sonarqubecloud

sonarqubecloud Bot commented May 5, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gilbarbara
gilbarbara merged commit 03101e0 into main May 5, 2026
9 checks passed
@gilbarbara
gilbarbara deleted the updates branch May 5, 2026 01:07
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.

2 participants