Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dns: remove redundant code using common variable #57386

Merged

Conversation

deokjinkim
Copy link
Contributor

validFamilies variable is defined 2 times, so remove redundant code by defining validFamilies in util. Plus, apply the same approach to validDnsOrders because it's also used multiple times.

`validFamilies` variable is defined 2 times, so remove
redundant code by defining `validFamilies` in util. Plus,
apply the same approach to `validDnsOrders` because it's
also used multiple times.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added dns Issues and PRs related to the dns subsystem. needs-ci PRs that need a full CI run. labels Mar 9, 2025
Copy link

codecov bot commented Mar 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.23%. Comparing base (9df0ff7) to head (d93b5b2).
Report is 15 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #57386   +/-   ##
=======================================
  Coverage   90.23%   90.23%           
=======================================
  Files         630      630           
  Lines      185200   185206    +6     
  Branches    36233    36235    +2     
=======================================
+ Hits       167108   167118   +10     
+ Misses      11056    11051    -5     
- Partials     7036     7037    +1     
Files with missing lines Coverage Δ
lib/dns.js 98.66% <100.00%> (+<0.01%) ⬆️
lib/internal/dns/promises.js 98.29% <100.00%> (+<0.01%) ⬆️
lib/internal/dns/utils.js 99.44% <100.00%> (+<0.01%) ⬆️

... and 18 files with indirect coverage changes

🚀 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.

@deokjinkim deokjinkim added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 10, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 10, 2025
@nodejs-github-bot
Copy link
Collaborator

@daeyeon daeyeon added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 10, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@deokjinkim deokjinkim added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 10, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 11, 2025
@nodejs-github-bot nodejs-github-bot merged commit baf989b into nodejs:main Mar 11, 2025
72 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in baf989b

targos pushed a commit that referenced this pull request Mar 11, 2025
`validFamilies` variable is defined 2 times, so remove
redundant code by defining `validFamilies` in util. Plus,
apply the same approach to `validDnsOrders` because it's
also used multiple times.

PR-URL: #57386
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
targos pushed a commit that referenced this pull request Mar 11, 2025
`validFamilies` variable is defined 2 times, so remove
redundant code by defining `validFamilies` in util. Plus,
apply the same approach to `validDnsOrders` because it's
also used multiple times.

PR-URL: #57386
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. dns Issues and PRs related to the dns subsystem. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants