Fix: TypeError in matchConnection for enterprise connections with no domains#2736
Open
ankita10119 wants to merge 5 commits intomasterfrom
Open
Fix: TypeError in matchConnection for enterprise connections with no domains#2736ankita10119 wants to merge 5 commits intomasterfrom
ankita10119 wants to merge 5 commits intomasterfrom
Conversation
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.
Changes
Added
List()as a default fallback tox.get('domains')return x.get('domains', List()).contains(target);This returns an empty Immutable List when
domainsis absent, making.contains()returnfalsesafely instead of throwing.References
Closes #2733
Testing
Running the test suite after the fix revealed that
cheeriov1.2.0 (a transitive dependency via enzyme) had broken all Jest tests due to an ESM/CommonJS incompatibility. These changes were required to restore the test suite and are not related to the bug fix itself:moduleNameMapperin Jest config - redirectscheerioimports to the CJS build (jsdom's browser export condition was resolving cheerio to its ESM build, which Jest cannot parse), maps the removedcheerio/lib/utilspath to its new location, and stubs undici (pulled in by cheerio's CJS build for HTTP fetch, unavailable injsdom)src/__tests__/__mocks__/undici.js- minimal stub forundicitestPathIgnorePatterns- excludes__mocks__/from Jest test discoveryChecklist