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

net: support blocklist in net.connect #56075

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

theanarkh
Copy link
Contributor

The first PR for #55000

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added errors Issues and PRs related to JavaScript errors originated in Node.js core. needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem. labels Nov 29, 2024
doc/api/net.md Outdated Show resolved Hide resolved
lib/net.js Outdated
@@ -510,6 +511,13 @@ function Socket(options) {
// Used after `.destroy()`
this[kBytesRead] = 0;
this[kBytesWritten] = 0;
if (options.blockList) {
if (options.blockList instanceof module.exports.BlockList) {
Copy link
Member

Choose a reason for hiding this comment

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

TODO for later... we should have a more efficient isBlockList(...) API

@theanarkh theanarkh force-pushed the support_blocklist_in_net_connect branch from 176a993 to e6be3e3 Compare November 29, 2024 16:35
@lpinca lpinca added the semver-minor PRs that contain new features and should be released in the next minor version. label Nov 29, 2024
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 88.46154% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.02%. Comparing base (4cf6fab) to head (e6be3e3).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
lib/net.js 86.95% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56075      +/-   ##
==========================================
+ Coverage   88.00%   88.02%   +0.01%     
==========================================
  Files         656      656              
  Lines      188988   189014      +26     
  Branches    35992    35999       +7     
==========================================
+ Hits       166315   166371      +56     
+ Misses      15838    15823      -15     
+ Partials     6835     6820      -15     
Files with missing lines Coverage Δ
lib/internal/errors.js 94.33% <100.00%> (+<0.01%) ⬆️
lib/net.js 93.54% <86.95%> (+0.65%) ⬆️

... and 26 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
errors Issues and PRs related to JavaScript errors originated in Node.js core. needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem. semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants