src: reduce duplication through consolidation #67497
Review requested:
lgtm
Codecov Report
:x: Patch coverage is
75.49407% with 62 lines in your changes missing coverage. Please review.:white_check_mark: Project coverage is 90.70%. Comparing base (
d105ef7) to head (5f73d63).:warning: Report is 5 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/cares\_wrap.cc | 67.42% | 34 Missing and 9 partials :warning: |
| src/node\_file.cc | 81.11% | 0 Missing and 17 partials :warning: |
| src/glob/node\_glob.cc | 0.00% | 1 Missing :warning: |
| src/node\_realm-inl.h | 80.00% | 0 Missing and 1 partial :warning: |
<details><summary>Additional details and impacted files</summary>
@@ Coverage Diff @@
## main #67497 +/- ##
==========================================
+ Coverage 90.67% 90.70% +0.03%
==========================================
Files 799 799
Lines 280245 280039 -206
Branches 54125 54028 -97
==========================================
- Hits 254100 254014 -86
+ Misses 16280 16215 -65
+ Partials 9865 9810 -55
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/encoding\_binding.cc | 56.60% <100.00%> (-0.50%) | :arrow_down: |
| src/node\_blob.cc | 73.40% <100.00%> (-0.09%) | :arrow_down: |
| src/node\_diagnostics\_channel.cc | 85.23% <100.00%> (+1.05%) | :arrow_up: |
| src/node\_modules.cc | 79.75% <100.00%> (-0.16%) | :arrow_down: |
| src/node\_process\_methods.cc | 88.67% <100.00%> (-0.15%) | :arrow_down: |
| src/node\_realm.h | 100.00% <ø> (ø) | |
| src/node\_snapshotable.cc | 73.68% <100.00%> (-0.06%) | :arrow_down: |
| src/node\_snapshotable.h | 100.00% <100.00%> (ø) | |
| src/node\_url.cc | 78.93% <100.00%> (-0.52%) | :arrow_down: |
| src/node\_v8.cc | 87.41% <100.00%> (+0.04%) | :arrow_up: |
| ... and 5 more | |
... and 34 files with indirect coverage changes
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
</details>
rslgtm
Landed in a625b01d03f718f79c09d625938e38d72eda5961...2aa37623fead9c66638ad60bf6179a4a9b6840de
gurgunday
jasnell
Reduce code by consolidating cleanup. See individual commits