[Snyk] Upgrade kleur from 2.0.2 to 4.1.5 #7
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.
Snyk has created this PR to upgrade kleur from 2.0.2 to 4.1.5.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 14 versions ahead of your current version.
The recommended version was released on 2 years ago.
Release notes
Package name: kleur
-
4.1.5 - 2022-06-26
- Add "types" export conditions for
- Handle undefined
-
4.1.4 - 2021-01-22
-
-
-
4.1.3 - 2020-09-30
- Add existence
-
4.1.2 - 2020-09-26
- Ensure
- Adds tests to ensure
-
4.1.1 - 2020-08-19
- (types): Ensure
-
4.1.0 - 2020-08-13
- Add support for the
- Enable GitHub Sponsors button 🙇: 16bc034
-
4.0.3 - 2020-07-31
-
-
4.0.2 - 2020-06-24
-
# Before:
- Add bash tests for ENV detection: 5c7353f
- Update README with TTY explainer and example: 3a6a272, 3b3742a
- Update test runner version: 5fd93ba
-
4.0.1 - 2020-06-19
-
-
-
4.0.0 - 2020-06-17
-
-
-
import kleur from 'kleur';
- Migrate CI from TravisCI to GitHub Actions: f0b5da4, 88f9f72
- Move to
- Update test runner, include
- Update benchmarks: 46cc8d8, 61d0d58, 049c080
- Update README: e2291ef, 9f09249, 840d3c0
-
3.0.3 - 2019-04-07
-
3.0.2 - 2019-02-07
-
3.0.1 - 2018-12-07
-
3.0.0 - 2018-11-15
-
2.0.2 - 2018-08-28
from kleur GitHub release notesPatches
Node16TypeScript module resolution (#57): 06f28e0Thank you @ calebeby~!
process.envwith fallback (#54): ec20016For browser/vite support. Thank you @ farnabaz~!
Chores
Replace
includes()usage withindexOfto allow support for older browsers (#45): 86a7db8No behavioral differences. Simply allows
kleurto run in old browsers (eg, IE8-11) without requiring a polyfill.Thank you @ Krinkle~!
Update benchmarks to reflect
includes->indexOfupdate: 19764d4Patches
process.stdoutcheck for browser-like polyfills (#42): 01963ccBundlers like
parcel,webpack, andbrowserifypolyfillprocessbut don't include astdoutimplementation.Thank you @ tinchoz49~!
Patches
NO_COLORdisables colorization if any value is received (#38, #39, #40, #41): ef5d4a8, b329629Now properly adheres to the
NO_COLORspec.Thank you @ stramel and @ chocolateboy~!
Chores
FORCE_COLOR=works as expected (#41): b329629Much like
NO_COLOR, use ofFORCE_COLOR=is expected to be truthy.Patches
kleur/colorstype definitions can be resolved: 06923d0, cc66a6fFeatures
NO_COLORstandard (#37): d839af7Thank you @ stramel~! 🎉
Chores
Patches
Ensure
processis defined before settingprocess-based values (#36): 303e502This allows for
kleurto be imported into browsers without any bundle-shimming.Patches
Disable colorization if inside a TTY context (#33): 5c7353f
Thank you @ ai~!
$ npx app.js > log.txt
#=> The
log.txtfilled with ANSI codes# After:
$ npx app.js > log.txt
#=> The
log.txtis plain text# OVERRIDE:
$ FORCE_COLOR=1 npx app.js > log.txt
#=> The
log.txtfilled with ANSI codes; as requestedChores
Patches
Revert to Node 6.x minimum support: 8c01d93
The code works perfectly in that environment, so there's no reason not to.
Truth be told, it was only bumped to 10.x because of the test runner constraint.
(types) fix
kleur/colorsoverloaded definition: f2f33a8Original
printorder assumed that every export returnednull, which is not true.Breaking
The minimum Node.js runtime increased from 6.x to 10.x since 10.x is the oldest active LTS version.
If you need to continue supporting Node 6.x, either continue using
kleur@3.xor ignore the "engines" constraint ofkleur@4.x– its CommonJS files will still execute in a Node 6.x environment.Features
Added native ESM support with
exportsmap (for Node 12.18.x, Node 14+) (#30): 2da16a9Thank you @ kristoferbaxter~!
Added
modulepackage entry (for bundler and PikaCDN) (#31): 2da16a9Added new
kleur/colorsentry module: 049c080These changes allow for
importstatements withkleur.It's done in a way such that Node.js environments that natively support
importwill work. For those that don't and are using webpack/Rollup, the"module"entry is made available so that you can still take advantage of the ESM format.We took this idea one step further with
kleur/colors– which individually exports each color, modifier, and background function. This allows you to import only the methods you need, and the unused pieces of code are detached from your code. In other words,kleur/colorsis 100% treeshakeable, which is a big advantage of the ESM format. Node.js (with native ESM support), Rollup, and webpack benefit from this, which means that your programs only include/load thekleurcode you use.If you're not ready to use ESM yet,
requirestatements still work for both modules in all environments.import * as colors from 'kleur/colors';
console.log(
kleur.underline().green('kleur natively supports ESM~!')
);
console.log(
colors.white(colors.italic(
... so does "<span class="pl-s1"><span class="pl-kos">${</span> <span class="pl-s1">colors</span><span class="pl-kos">.</span><span class="pl-en">green</span><span class="pl-kos">(</span><span class="pl-s">'kleur/colors'</span><span class="pl-kos">)</span> <span class="pl-kos">}</span></span>"~!)));
Chores
c8for code coverage: 06e3ba4kleur/colorstests: f39b294Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: