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

[FIX] projectPreprocessor: Do not remove already removed dependencies #189

Merged
merged 2 commits into from
Jun 25, 2019

Conversation

RandomByte
Copy link
Member

This lead to the wrong dependency being removed in some cases.

Credits to @nlunets

@coveralls
Copy link

coveralls commented Jun 24, 2019

Coverage Status

Coverage increased (+0.07%) to 83.38% when pulling dfe07dc on project-preproc-no-remove-wrong-dependency into 29bd27a on master.

This lead to the wrong dependency being removed in some cases.

Credits to @nlunets for reporting this issue.
@RandomByte RandomByte force-pushed the project-preproc-no-remove-wrong-dependency branch from d10800c to 94422f3 Compare June 24, 2019 12:39
@RandomByte RandomByte requested review from matz3 and Thodd and removed request for matz3 June 24, 2019 17:16
lib/projectPreprocessor.js Outdated Show resolved Hide resolved
Co-Authored-By: Matthias Oßwald <1410947+matz3@users.noreply.github.com>
@RandomByte
Copy link
Member Author

Note: Squash it

@@ -163,7 +163,9 @@ class ProjectPreprocessor {
if (processedProject) {
if (processedProject.ignored) {
log.verbose(`Dependency of project ${parent.id}, "${project.id}" is flagged as ignored.`);
parent.dependencies.splice(parent.dependencies.indexOf(project), 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, splicing index -1 is a nice bug :D

@RandomByte RandomByte merged commit 4600d63 into master Jun 25, 2019
@RandomByte RandomByte deleted the project-preproc-no-remove-wrong-dependency branch June 25, 2019 10:56
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.

5 participants