refactor(contact)!: extract expired email domains#487
Merged
Conversation
🦋 Changeset detectedLatest commit: 5c57df4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the ContactExtractor to extract expired email domains alongside illuminated contacts, updating related code and tests.
- Introduce NsResolver to detect expired email domains and integrate with
ContactExtractor.fromDependencies. - Update
ContactExtractorAPI to async and return bothilluminatedcontacts andexpireddomains. - Adapt tests, scanner warnings, and README to use the new asynchronous API.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| workspaces/scanner/src/utils/warnings.ts | Updated to await async fromDependencies and destructure illuminated. |
| workspaces/contact/test/ContactExtractor.spec.ts | Converted tests to async and updated usage of fromDependencies. |
| workspaces/contact/src/NsResolver.class.ts | Added new NsResolver class to resolve NS records and identify expired domains. |
| workspaces/contact/src/ContactExtractor.class.ts | Modified fromDependencies to async, register emails with NsResolver, and return expired domains. |
| workspaces/contact/README.md | Updated usage examples and documentation for new return type and interfaces. |
| .changeset/spicy-poems-sin.md | Added changelog entry for extracting expired email domains. |
Comments suppressed due to low confidence (4)
workspaces/contact/README.md:49
- Since
fromDependenciesis now async, the example should useawait:
const { illuminated, expired } = await extractor.fromDependencies(dependencies);const { illuminated, expired } = extractor.fromDependencies(
workspaces/contact/README.md:75
- [nitpick] The snippet references
RequireAtLeastOnebut doesn’t import or define it. Consider adding an import (e.g.,import type { RequireAtLeastOne } from 'type-fest';) or defining it in the docs.
type EnforcedContact = RequireAtLeastOne<
workspaces/contact/test/ContactExtractor.spec.ts:33
- The test definition is malformed here. The backticks and function call are split incorrectly, causing a syntax error. It should be wrapped in a single
test(…, async () => { … });invocation.
it should successfully scan, extract, and return the contact along with the list of dependencies where it appears.`
workspaces/contact/test/ContactExtractor.spec.ts:58
- This test signature is broken due to misplaced backticks and missing the
testcall. Consolidate the title and callback into:test(Given a Contact with a RegExp name ... appears., async () => { … });.
it should successfully scan, extract, and return the contact along with the list of dependencies where it appears.`
This was referenced Jul 16, 2025
PierreDemailly
approved these changes
Jul 17, 2025
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.
close #479