Repository navigation
Conversation
also fixed some linting errors (semicolons & equals)
…a path as it's mainly the code of .analyze, use it there
• use the `in` operator more frequently (it's much nicer than `typeof foo !== "undefined"` + is more readable) • removed some garbage • added some comments
in L54, err would have always be falsey (or the function had returned earlier)
This reverts commit a7c35d1.
also moved the creation of the find-dependencies path to the surrounding scope
this is the functionality that is described in the comments, but wasn't implemented (yet)
a folder should never contain a file that has the folder's path as it's name
the last change broke most tests, so .findNextDir is what's actually wanted for .npmAnalyze
we don't use more, so don't do anything fancy
• removed scanning scripts as they weren't implemented properly (they just looped a couple of times without doing anything) • simplified signature of mergeDependencies • return errors in .package • also updated some comments
Member
There was a problem hiding this comment.
Needs review. Is this depended upon anywhere?
Guessing not, as in the error we don't return any ee.
|
LGTM. Seems like great work by @fb55 Tests pass locally |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As you might have seen, I did some refactoring in the
refactorbranch. Mainly removing unused code, improving and abstracting some stuff and introducing two new public methods:analyzer.pathdoes ra's magic on a path, no matter what kind of file is behind it.analyzer.findNextDirdoes what.findModulesDirdid so long: Return the next directory for a path..findModulesDirnow actually searches for a directory containing either anode_modulesdir or apackage.jsonfile.finditis no longer a dependency, as.path(which is an abstraction of.dir) can do the job.Please have a look at the code, it's possible that I've missed something. (All tests pass at least.)