I stumbled upon this while I was trying to trace back another issue I currently have with dependency resolution. Simply these lines of code are useless this way:
They have to use push() instead of concat() like in the updater functions above/below those mentioned above.
You can find this problem directly on the master branch.
@edmundmaruhn Thanks for reporting this.
You are correct!
Feel free to open a PR for this change.
I believe it should be
this.issues.missingPackagesDependenciesOnFs[originFile] = this.issues.missingPackagesDependenciesOnFs[originFile].concat(missingPackages);
since push getting a one item and concat get an array.
@GiladShoham I would rather make use of the spread operator in conjunction with push(), since it's an in-place extension and does not need for reallocation of a new array. Since TypeScript is used it shouldn't be a problem using the spread operator. It's also shorter and more elegant:
this.issues.missingPackagesDependenciesOnFs[originFile].push(...missingPackages);
Do you see any reason against this?
No, I want to suggest that as well.