Skip to content

refactor(contact)!: extract expired email domains#487

Merged
fraxken merged 1 commit intomasterfrom
contact-expired-emails
Jul 17, 2025
Merged

refactor(contact)!: extract expired email domains#487
fraxken merged 1 commit intomasterfrom
contact-expired-emails

Conversation

@fraxken
Copy link
Member

@fraxken fraxken commented Jul 15, 2025

close #479

@changeset-bot
Copy link

changeset-bot bot commented Jul 15, 2025

🦋 Changeset detected

Latest commit: 5c57df4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@nodesecure/contact Major
@nodesecure/scanner Minor

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

Copy link
Contributor

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 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 ContactExtractor API to async and return both illuminated contacts and expired domains.
  • 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 fromDependencies is now async, the example should use await:
const { illuminated, expired } = await extractor.fromDependencies(dependencies);
const { illuminated, expired } = extractor.fromDependencies(

workspaces/contact/README.md:75

  • [nitpick] The snippet references RequireAtLeastOne but 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 test call. 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.`

@fraxken fraxken merged commit c0feea6 into master Jul 17, 2025
5 checks passed
@fraxken fraxken deleted the contact-expired-emails branch July 17, 2025 23:31
@github-actions github-actions bot mentioned this pull request Jul 16, 2025
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.

(Contact) detect expired contact domains

3 participants