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

Make Npm separate from Yarn #9393

Merged
merged 4 commits into from
Nov 8, 2024
Merged

Make Npm separate from Yarn #9393

merged 4 commits into from
Nov 8, 2024

Conversation

fviernau
Copy link
Member

@fviernau fviernau commented Nov 7, 2024

Part of: #9261.

@fviernau fviernau changed the title Npm rewrite Make Npm separate from Yarn Nov 7, 2024
@fviernau fviernau force-pushed the npm-rewrite branch 4 times, most recently from be80da6 to 52ff169 Compare November 7, 2024 13:29
The extraction of issues applies only to `Npm`, but not to `Yarn`.
Extract it to a function and place it in `Npm` to reduce the diff of an
upcoming change.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
@fviernau fviernau marked this pull request as ready for review November 7, 2024 13:30
@fviernau fviernau requested a review from a team as a code owner November 7, 2024 13:30
Prepare for removing the inheritance between these two.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 68.08%. Comparing base (151858e) to head (d338cf2).
Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
...s/node/src/main/kotlin/npm/NpmDependencyHandler.kt 65.21% 2 Missing and 6 partials ⚠️
...ge-managers/node/src/main/kotlin/npm/ModuleInfo.kt 81.25% 3 Missing ⚠️
...s/package-managers/node/src/main/kotlin/npm/Npm.kt 95.71% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9393      +/-   ##
============================================
+ Coverage     67.91%   68.08%   +0.16%     
- Complexity     1262     1279      +17     
============================================
  Files           244      246       +2     
  Lines          8724     8814      +90     
  Branches        909      920      +11     
============================================
+ Hits           5925     6001      +76     
- Misses         2422     2428       +6     
- Partials        377      385       +8     
Flag Coverage Δ
funTest-docker 64.96% <87.50%> (+0.99%) ⬆️
funTest-non-docker 33.57% <ø> (ø)

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.

Analog to 0eb1eea, remove the inheritance between the two managers and
re-write large parts of `Npm` to extract all needed information solely
based on the output of the `npm` CLI command, instead of relying on the
file hierarchy under the `node_modules` directory.

This reduces complexity and makes the implementation(s) easy to
understand, maintain and change in isolation.

Note: The handling of the `installIssues` in `Yarn` has been used only
for `Npm`, which is why that code is moved from `Yarn` to `Npm`.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
The comments do not provide much information.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Copy link
Member

@nnobelis nnobelis left a comment

Choose a reason for hiding this comment

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

LGTM

@fviernau fviernau merged commit 5a063c4 into main Nov 8, 2024
23 checks passed
@fviernau fviernau deleted the npm-rewrite branch November 8, 2024 12:21
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.

2 participants