Skip to content

deps(dev): bump ansis from 3.17.0 to 4.3.1 - #58

Merged
sbosio merged 1 commit into
mainfrom
dependabot/npm_and_yarn/ansis-4.2.0
Aug 14, 2026
Merged

deps(dev): bump ansis from 3.17.0 to 4.3.1#58
sbosio merged 1 commit into
mainfrom
dependabot/npm_and_yarn/ansis-4.2.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Apr 21, 2026

Copy link
Copy Markdown
Contributor

Bumps ansis from 3.17.0 to 4.3.1.

Release notes

Sourced from ansis's releases.

v4.3.1

Bug fixes

1. reset no longer appends a closing sequence

[!IMPORTANT] reset is now a single SGR command, not a paired open/close style. ansis.reset(value) prepends \x1b[0m and no longer appends a closing reset. If your code or snapshot tests relied on the trailing \x1b[0m, update them or add the reset explicitly (see below).

Before, reset was treated like any other style with an open and a close code, so it wrapped the value on both sides. That produced extra reset sequences in chained, nested, template literal, and multiline compositions, and the output did not match what a single reset should do.

Before:

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

Now:

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

If you need a trailing reset, add it explicitly:

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

ansis.reset() without argument returns just the reset code \x1b[0m, which makes appending it easy.

2. strip() removes OSC 8 hyperlink sequences

strip() did not clear the OSC 8 sequences produced by link(). It now removes them and returns plain text:

ansis.strip(ansis.link('https://example.com', 'text'));
// "text"

3. No style leakage between instances with different color levels

Styles created on one Ansis instance could appear on another instance that was created with a different color level. That could give output rendered at the wrong color level. Now, instances are isolated, so each one keeps its own styles and level.

import { Ansis } from 'ansis';
</tr></table> 

... (truncated)

Changelog

Sourced from ansis's changelog.

4.3.1 (2026-05-31)

  • 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

4.3.0 (2026-05-11)

  • 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' },

... (truncated)

Commits
  • 3baa7aa refactor: micro-optimisations to reduce code size
  • 1914005 fix: prevent silent style leakage between Ansis instances created with differ...
  • 1d575d4 fix: fix edge cases in reset ANSI sequence generation
  • d83dd95 refactor: code micro optimisation
  • bc74986 test: add tests for style stack handling
  • fa344ef test: detected BUG in Node hasColors under Windows + Node 24 - NO_COLOR="" re...
  • 29c1412 chore: update git workflow
  • 3873dbd chore: update github templates
  • b514d49 chore: release 4.3.0
  • 8eb1334 refactor: micro optimisations
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Apr 21, 2026
@dependabot
dependabot Bot requested a review from a team as a code owner April 21, 2026 18:57
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Apr 21, 2026

@sbosio sbosio left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sbosio

sbosio commented Aug 14, 2026

Copy link
Copy Markdown

@dependabot recreate

Bumps [ansis](https://github.com/webdiscus/ansis) from 3.17.0 to 4.3.1.
- [Release notes](https://github.com/webdiscus/ansis/releases)
- [Changelog](https://github.com/webdiscus/ansis/blob/master/CHANGELOG.md)
- [Commits](webdiscus/ansis@v3.17.0...v4.3.1)

---
updated-dependencies:
- dependency-name: ansis
  dependency-version: 4.2.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot changed the title chore(deps-dev): bump ansis from 3.17.0 to 4.2.0 deps(dev): bump ansis from 3.17.0 to 4.3.1 Aug 14, 2026
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/ansis-4.2.0 branch from 9a4e1e5 to bfc1252 Compare August 14, 2026 15:06
@sbosio
sbosio merged commit 591a22b into main Aug 14, 2026
10 checks passed
@sbosio
sbosio deleted the dependabot/npm_and_yarn/ansis-4.2.0 branch August 14, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant