Skip to content

build: update dev-dependency ansis from 4.2.0 to 4.4.0 - #10

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm/ansis-4.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm/ansis-4.x

Conversation

@renovate

@renovate renovate Bot commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence OpenSSF
ansis 4.2.0 → 4.4.0 age adoption passing confidence OpenSSF Scorecard

Release Notes

webdiscus/ansis (ansis)

v4.4.0

Compare Source

  • fix(color-support): treat TERM=dumb as no color before applying COLORTERM, #​49.

    COLORTERM is a color level hint.
    When TERM=dumb, Ansis now disables ANSI color output even if color environment variables such as COLORTERM=truecolor were inherited from a parent process (e.g. in Emacs M-x compile).

    FORCE_COLOR keeps the highest priority and can still explicitly enable colors.

    Auto-detection behavior changes after the fix

    Use case v4.3.1 v4.4.0 Notes
    TERM=dumb ✅ may allow colors * ❌ no color TERM=dumb now has higher priority in autoDetectLevel.
    TERM=dumb + COLORTERM=truecolor ✅ allow colors ❌ no color COLORTERM no longer overrides TERM=dumb.
    TERM=dumb + CI ✅ allow colors ❌ no color CI detection runs after TERM=dumb.
    TERM=dumb + PM2 ✅ may allow colors * ❌ no color PM2 detection runs after TERM=dumb.
    TERM=dumb + Next.js runtime ✅ may allow colors * ❌ no color Next.js detection runs after TERM=dumb.
    COLORTERM without TERM=dumb ✅ allow colors ✅ allow colors Unchanged.
    CI without TERM=dumb ✅ allow colors ✅ allow colors Unchanged.
    PM2 without TERM=dumb ✅ allow colors ✅ allow colors Unchanged.
    Next.js without TERM=dumb ✅ allow colors ✅ allow colors Unchanged.

    * - Depends on additional conditions.

  • test(color-support): add regression coverage for TERM=dumb with inherited COLORTERM=truecolor

    The tests also cover PM2 and Next.js edge behavior where stdout.isTTY is not exposed.

  • test: add a manual color support checker

    Run npm run color-checker to print the environment values used by color detection and visually inspect ANSI 16, ANSI 256, and Truecolor rendering.

  • test(deno): run CI against Deno 2.3+ and the current LTS

    Deno 2.0-2.2 are no longer tested in the CI matrix because they cannot use the same deno.lock v5 format as Deno 2.3+.
    Runtime compatibility with Deno 2.0-2.2 remains supported.

v4.3.1

Compare Source

  • fix: remove closing reset ANSI sequence

    reset is now treated as a single SGR command, not as a paired style.
    This means ansis.reset(value) prepends \x1b[0m and does not append a closing reset sequence.

    Before:

    ansis.reset('foo');
    // "\x1b[0mfoo\x1b[0m"

    Now:

    ansis.reset('foo');
    // "\x1b[0mfoo"

    If a trailing reset is needed, add it explicitly:

    ansis.reset`foo ${ansis.red('bar')} baz` + ansis.reset();
    // "\x1b[0mfoo \x1b[31mbar\x1b[39m baz\x1b[0m"

    The fix removes extra reset sequences in chained, nested, template literal, and multiline style compositions
    where treating reset as a paired style gave wrong output.

  • fix: strip() now removes OSC 8 hyperlink sequences generated by link()
    ansis.strip(ansis.link(url, text)) now returns plain text

  • fix: prevent silent style leakage between Ansis instances created with different color levels

  • fix: .extend() on one Ansis instance no longer overrides styles created on other instances with different color levels

  • refactor: micro-optimisations to reduce code size

v4.3.0

Compare Source

  • feat: add link(url, text?) for OSC 8 hyperlinks, supported by many terminal emulators
  • feat: add constructor overload to pass a mock globalThis object for controlled color auto-detection
    import { Ansis } from 'ansis';
    
    const color = new Ansis({
      process: {
        env: { FORCE_COLOR: '1' },
        argv: ['node', 'app.js'],
        stdout: { isTTY: false },
        platform: 'linux',
      },
    });
    
    console.log(color.level); // 1
  • fix(color-support): correctly handle edge cases using ENV variables and CLI flags
Fixed edge case Old behavior (bug) New behavior (correct)
FORCE_COLOR=1, NO_COLOR=1 disable color enable color (FORCE_COLOR takes precedence over NO_COLOR)
NO_COLOR=1, --color disable color enable color (CLI color flags take precedence over NO_COLOR)
FORCE_COLOR=1, --no-color disable color enable color (FORCE_COLOR has the highest priority)
--no-color --color disable color enable color (last flag wins)
--color with no detected colors truecolor 16 colors (auto-detect fallback uses the minimum color level, not truecolor)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from codeismyid as a code owner May 14, 2026 12:53
@renovate renovate Bot added bot Bot involvement dependency Additions or changes involving dependency renovate Anything from renovatebot labels May 14, 2026
@renovate
renovate Bot force-pushed the renovate/npm/ansis-4.x branch from 0ee8bd8 to 476e411 Compare May 20, 2026 00:54
@renovate
renovate Bot force-pushed the renovate/npm/ansis-4.x branch from 476e411 to 448ad36 Compare June 3, 2026 17:16
@renovate renovate Bot changed the title build: update dev-dependency ansis from 4.2.0 to 4.3.0 build: update dev-dependency ansis from 4.2.0 to 4.3.1 Jun 3, 2026
@renovate
renovate Bot force-pushed the renovate/npm/ansis-4.x branch from 448ad36 to daf43fb Compare September 7, 2026 22:41
@renovate
renovate Bot force-pushed the renovate/npm/ansis-4.x branch from daf43fb to 328f842 Compare September 16, 2026 19:49
@renovate renovate Bot changed the title build: update dev-dependency ansis from 4.2.0 to 4.3.1 build: update dev-dependency ansis from 4.2.0 to 4.4.0 Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot Bot involvement dependency Additions or changes involving dependency renovate Anything from renovatebot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants