Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Upgrade kleur from 2.0.2 to 4.1.5 #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nerds-github
Copy link
Owner

snyk-top-banner

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.


⚠️ Warning: This PR contains major version upgrade(s), and may be a breaking change.

  • 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

    Patches

    • Add "types" export conditions for Node16 TypeScript module resolution (#57): 06f28e0
      Thank you @ calebeby~!
    • Handle undefined process.env with fallback (#54): ec20016
      For browser/vite support. Thank you @ farnabaz~!

    Full Changelog: v4.1.4...v4.1.5

  • 4.1.4 - 2021-01-22

    Chores

    • Replace includes() usage with indexOf to allow support for older browsers (#45): 86a7db8
      No behavioral differences. Simply allows kleur to run in old browsers (eg, IE8-11) without requiring a polyfill.
      Thank you @ Krinkle~!

    • Update benchmarks to reflect includes -> indexOf update: 19764d4

  • 4.1.3 - 2020-09-30

    Patches

    • Add existence process.stdout check for browser-like polyfills (#42): 01963cc
      Bundlers like parcel, webpack, and browserify polyfill process but don't include a stdout implementation.
      Thank you @ tinchoz49~!
  • 4.1.2 - 2020-09-26

    Patches

    Chores

    • Adds tests to ensure FORCE_COLOR= works as expected (#41): b329629
      Much like NO_COLOR, use of FORCE_COLOR= is expected to be truthy.
  • 4.1.1 - 2020-08-19

    Patches

    • (types): Ensure kleur/colors type definitions can be resolved: 06923d0, cc66a6f
  • 4.1.0 - 2020-08-13

    Features

    Chores

  • 4.0.3 - 2020-07-31

    Patches

    • Ensure process is defined before setting process-based values (#36): 303e502
      This allows for kleur to be imported into browsers without any bundle-shimming.

      NOTE: ANSI code support varies between browsers, but typically colors and background-colors work (never modifiers).

  • 4.0.2 - 2020-06-24

    Patches

    • Disable colorization if inside a TTY context (#33): 5c7353f
      Thank you @ ai~!

      # Before:
      $ npx app.js > log.txt
      #=> The log.txt filled with ANSI codes

      # After:
      $ npx app.js > log.txt
      #=> The log.txt is plain text

      # OVERRIDE:
      $ FORCE_COLOR=1 npx app.js > log.txt
      #=> The log.txt filled with ANSI codes; as requested

    Chores

    • 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

    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/colors overloaded definition: f2f33a8
      Original print order assumed that every export returned null, which is not true.

  • 4.0.0 - 2020-06-17

    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.x or ignore the "engines" constraint of kleur@4.x – its CommonJS files will still execute in a Node 6.x environment.

    Features

    • Added native ESM support with exports map (for Node 12.18.x, Node 14+) (#30): 2da16a9
      Thank you @ kristoferbaxter~!

    • Added module package entry (for bundler and PikaCDN) (#31): 2da16a9

    • Added new kleur/colors entry module: 049c080

    These changes allow for import statements with kleur.
    It's done in a way such that Node.js environments that natively support import will 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/colors is 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 the kleur code you use.

    If you're not ready to use ESM yet, require statements still work for both modules in all environments.

    See the Individual Colors documentation for more info

    import kleur from 'kleur';
    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

  • 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 notes

Important

  • Warning: This PR contains a major version upgrade, and may be a breaking change.
  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

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:

Snyk has created this PR to upgrade kleur from 2.0.2 to 4.1.5.

See this package in npm:
kleur

See this project in Snyk:
https://app.snyk.io/org/nerds-github/project/338ddbb6-0130-444a-a771-ac67c9aec95f?utm_source=github&utm_medium=referral&page=upgrade-pr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants