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.
This adds some general improvements and three bug fixes, I saw when implementing #261
Bugs:
g
flag was used in the regex for the version number, so the resultingmatch
array was["1.6.0"]
instead of["1.6.0","1","6","0"]
version[1] < 50
, which only worked correctly before1.0.0
(thsi never showed, since after this check we additionally check, if the returned filename is an array or not, so this only cleans this up)["1.6.0","1","6","0"].slice(1,.3)
results in["1","6"]
and not in three componentsImprovements:
Most of these things I "need" for #261 or at least it makes the life much more easy, (I print versions in some places, comparison is an improvement, that benefits also existing code)
Feel free to suggest any changes 😄