Skip to content

chore: Bump ansis from 3.16.0 to 4.0.0 #1250

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

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 10, 2025

Bumps ansis from 3.16.0 to 4.0.0.

Release notes

Sourced from ansis's releases.

Release v4.0.0

✨ Ansis v4 - Smaller package and cleaner API

Ansis v4 drops unused duplicate aliases and legacy baggage. This release brings a stable and more compact ANSI library. v4 is ~15.7% smaller than v3.17

Follow the migration guide to upgrade.

⚠️ BREAKING CHANGES

1) Dropped support for Deno 1.x (EOL - October 9, 2024)

This version now supports Deno 2.0 and above.

2) Removed non-standard strike alias for strikethrough style

The legacy strike alias has been removed to clean up the API and stay consistent with ANSI style conventions.

  • The strike style was rarely (if ever) used and added unnecessary redundancy.
  • No usage of ansis.strike() was found in public GitHub repositories.
  • Other ANSI libraries use the standard strikethrough name exclusively.

3) Removed redundant aliases: grey, bgGrey, blackBright and bgBlackBright - use the standard gray and bgGray instead.

Holywar: gray vs grey vs blackBright

All these color names referred the same ANSI code. However, keeping many separate names for the same color is too much for a small library.

Why gray only, without aliases?

ANSI codes for the gray color:

  •   90 is officially "bright black" foreground (i.e., gray) in terminal specs.
  • 100 is officially "bright black" background (i.e., bgGray) in terminal specs.

Ansis prefers the more intuitive and commonly used names: gray and bgGray.

  • gray, bgGray - Standard spelling, common used, and intuitive
  • grey, bgGrey - British spelling, uncommon, rarely used, and a redundant alias for gray and bgGray
  • blackBright, bgBlackBright - Spec-style names for "bright black", less intuitive, never used, awkward for practical use

[!NOTE] Supporting both gray and grey (or even worse, verbose aliases like bgBlackBright) introduces unnecessary duplication.
Ansis v4 is focused on a clean, minimal API by intentionally avoiding redundant aliases.

4) Using 256-color functions

... (truncated)

Changelog

Sourced from ansis's changelog.

v4.0.0 is 12.4% smaller than v3.17.0.

4.0.0-beta.21 (2025-04-24)

⚠️ BREAKING CHANGE

  • feat: drop support for Deno 1.x (EOL - 9 Oct 2024) and add support for Deno 2.0+, #37 Backported from 3.18.0-beta.0

4.0.0-beta.20 (2025-04-21)

⚠️ BREAKING CHANGE

Removed unused and rarely used aliases for gray and bgGray:

  • grey, bgGrey - British spelling, uncommon, redundant aliases for gray and bgGray
  • blackBright, bgBlackBright - Spec-style names for "bright black", less intuitive, rarely used, and awkward in practice

Supporting three separate names for the same color is too much and introduces ambiguity into the API.

Migrating

Replace deprecated aliases with the preferred standard names:

- ansis.grey('text')
- ansis.blackBright('text')
+ ansis.gray('text')

ansis.bgGrey('text')
ansis.bgBlackBright('text')


ansis.bgGray('text')

4.0.0-beta.19 (2025-04-20)

⚠️ BREAKING CHANGE

The unused AnsiColorsExtend type has been removed.

This type was intended to support extended theme colors, but it was never used in other projects. If you relied on it in your own code (e.g. for typing custom styles), you can easily define it yourself.

Migrating

If you previously used the AnsiColorsExtend type, you’ll now need to define a custom utility type. Here's an example how to update your code:

- import ansis, { AnsiColorsExtend } from 'ansis';
</tr></table> 

... (truncated)

Commits
  • fd33a4d docs: update reaadme
  • 322c95f chore: refactor code, update readme
  • 736e0ba feat: simplify CI color detection (may fallback to 16 colors or b&w in rare C...
  • b36ff87 docs: update readme
  • 9e40038 test: increase timeout for testing on GitHub CI
  • e8957d1 chore: clean up
  • 5b8a468 chore(4.0.0-rc.6): clean up d.ts
  • 2103223 chore(4.0.0-rc.5): package optimisations
  • 28a21d3 chore: micro optimisation of performnce for hex()
  • 764a64a chore: optimize terser options and code for minify
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [ansis](https://github.com/webdiscus/ansis) from 3.16.0 to 4.0.0.
- [Release notes](https://github.com/webdiscus/ansis/releases)
- [Changelog](https://github.com/webdiscus/ansis/blob/master/CHANGELOG.md)
- [Commits](webdiscus/ansis@v3.16.0...v4.0.0)

---
updated-dependencies:
- dependency-name: ansis
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Copy link
Contributor Author

dependabot bot commented on behalf of github May 18, 2025

Looks like ansis is up-to-date now, so this is no longer needed.

@dependabot dependabot bot closed this May 18, 2025
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/ansis-4.0.0 branch May 18, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant