Release 8.5.3 - fix coalesceLocales to handle undefined paths better #349
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.
When searching for locale files, some glob searches return undefined paths which end up breaking some of the logic. This fixes that by skipping undefined paths.
The Error that would show up:
This only happens when certain combinations of dependencies result in npm leaving those dependencies in node_modules under the parent instead of hoisting to the root.
After triaging the cause of the error and trying to avoid getting the undefined paths, that was trickier to get right as it depends on third party behavior, and it seemed easier to just allow the undefined paths through, but skip them once we try to inspect them.