Skip to content

Conversation

wo-o29
Copy link
Contributor

@wo-o29 wo-o29 commented Oct 7, 2025

Summary

Fixes #1392

This PR resolves the circular import issue between isMatch and isMatchWith functions.

Changes

  • Removed the import { isMatch } statement from src/compat/predicate/isMatchWith.ts
  • Changed the fallback behavior in isMatchWith when no comparator is provided from calling isMatch(target, source) to calling isMatchWith(target, source, () => undefined)
  • This maintains the same functionality while breaking the circular dependency, as isMatch internally calls isMatchWith with a no-op comparator

The change is functionally equivalent since isMatch simply delegates to isMatchWith with a comparator that always returns undefined, triggering the default matching behavior.

@Copilot Copilot AI review requested due to automatic review settings October 7, 2025 13:38
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR resolves a circular import issue between isMatch and isMatchWith functions by removing the direct dependency of isMatchWith on isMatch.

  • Removed the import statement for isMatch from isMatchWith.ts
  • Changed the fallback behavior to use recursive isMatchWith call instead of isMatch

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

vercel bot commented Oct 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
es-toolkit Ready Ready Preview Comment Oct 7, 2025 1:43pm

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.90%. Comparing base (6939b5e) to head (56a021c).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1446   +/-   ##
=======================================
  Coverage   99.90%   99.90%           
=======================================
  Files         468      468           
  Lines        4439     4439           
  Branches     1309     1309           
=======================================
  Hits         4435     4435           
  Misses          4        4           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Circular imports isMatch <-> isMatchWith

2 participants