Open
Conversation
|
Adding to that, webpack itself uses picocolors so this dependency is likely to be deduplicated. |
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.
🔗 Linked issue
No existing issue.
❓ Type of change
📚 Description
This PR the dependency Chalk by Picolors, a more lightweight dependency, with less sub-dependencies, and also faster (thus this is not really significant here).
I don't believe we need ~88Kb and 6 sub-dependencies to display colors in terminal, picocolors is totally enough for our usages.
Less dependencies means less possible vulnerability security issues, we already saw a lot of "not so known" but over-used dependencies being discrelty modified to introduce malicious code. It also means a reduction of consumed bandwidth.
See https://npmgraph.js.org/?q=@nuxt/friendly-errors-webpack-plugin#select=exact%3Achalk%402.4.2 and the report below:
Note, here we're using Chalk 2.4.2, which is 5 years old. It is not possible to use the latest version 5 (which has no sub-dependencies, and weighs less than 2.4.2) because it is ESM-compatible only.
Chalk therefore recommends using CJS-compatible version 4, but it still weighs ~90KB and still has 5 sub-dependencies :(
Thanks!