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

refactor: Updated webframework-shim to reduce the cognitive complexity #1927

Merged
merged 2 commits into from Jan 2, 2024

Conversation

bizob2828
Copy link
Member

Description

This PR refactors webframework-shim to reduce cognitive complexity. I broke out a lot into new files because it was very hard to navigate.

Copy link

codecov bot commented Dec 21, 2023

Codecov Report

Attention: 26 lines in your changes are missing coverage. Please review.

Comparison is base (4c30d97) 96.98% compared to head (ae8fef0) 97.02%.
Report is 3 commits behind head on main.

Files Patch % Lines
lib/shim/webframework-shim/middleware.js 96.52% 16 Missing ⚠️
lib/shim/webframework-shim/index.js 98.71% 7 Missing ⚠️
lib/shim/webframework-shim/common.js 97.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1927      +/-   ##
==========================================
+ Coverage   96.98%   97.02%   +0.03%     
==========================================
  Files         212      215       +3     
  Lines       40072    40238     +166     
==========================================
+ Hits        38862    39039     +177     
+ Misses       1210     1199      -11     
Flag Coverage Δ
integration-tests-16.x 78.91% <81.76%> (+0.19%) ⬆️
integration-tests-18.x 79.17% <81.76%> (+0.19%) ⬆️
integration-tests-20.x 79.18% <81.76%> (+0.19%) ⬆️
unit-tests-16.x 91.09% <95.54%> (+0.08%) ⬆️
unit-tests-18.x 91.07% <95.54%> (+0.08%) ⬆️
unit-tests-20.x 91.07% <95.54%> (+0.08%) ⬆️
versioned-tests-16.x 73.95% <94.24%> (+0.14%) ⬆️
versioned-tests-18.x 73.98% <94.24%> (+0.14%) ⬆️
versioned-tests-20.x 73.99% <94.24%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jsumners-nr jsumners-nr left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@bizob2828 bizob2828 merged commit 1ce371e into newrelic:main Jan 2, 2024
22 checks passed
Node.js Engineering Board automation moved this from Needs PR Review to Done: Issues recently completed Jan 2, 2024
@github-actions github-actions bot mentioned this pull request Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Node.js Engineering Board
  
Done: Issues recently completed
Development

Successfully merging this pull request may close these issues.

None yet

2 participants