Update dependencies to latest available versions #213
Merged
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.
Fixes #195
Used
node 14.20.0
which is the latest version of the current LTS. I'm personally in love withyarn
but ofc I've usednpm
to do the update. But I would suggest to move toyarn
since it's way faster.Aside from the update, the PR drops
chalk
due to its limited usage in favour of using the colors directly. Maybe it's not pretty as before but it doesn't really make sense to introduce a library for a couple of simple usages.istanbul
should be replaced bynyc
? I didn't delve into that option but I guess it should be taken in account. I would also consider to dropmoment
since it is used sparingly and its a huge dep. But I'll leave that to you as well since there are too many alternatives and too many opinions regarding them. 😄EDIT
Actually also
find
is unmaintained and very old. 😱 I feel like that can be substituted by a function, something along the line of:EDIT 2
Dropped both
moment
andistanbul
in favor ofluxon
andnyc
. While the latter was an obvious move,luxon
choice came because it's the only one with a sound implementation of duration formatting. Bothdayjs
anddate-fns
are bugged/not feature complete in that regard.It should be noted that
moment
format function was resetting on a24h
basis. Since some tests were interpretingns
times asms
(durationInMS=true
) that would have resulted in huge duration intervals but the behaviour ofmoment
was successfully hiding that.luxon
made the problem apparent and thus I've updated those tests to have "saner" duration intervals.Overall happy about these changes, dropping
moment
will reduce greatly the bundle sinceluxon
is almost half the size!Also the other minor deps can be probably dropped, as mentioned for
find
, but I think in those cases it really tumbles down to personal taste. I would not keep around a dep for a simple task or one that is unmaintained likefind
. Although, for this iteration, I think we have made enough changes. 🙂