diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 10bb5ee..d588995 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,8 +14,8 @@ jobs: - 16 - 14 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm install diff --git a/examples/rainbow.js b/examples/rainbow.js index cfc4cef..5b2b1d2 100644 --- a/examples/rainbow.js +++ b/examples/rainbow.js @@ -10,7 +10,7 @@ function rainbow(string, offset) { return string; } - const hueStep = 360 / string.replace(ignoreChars, '').length; + const hueStep = 360 / string.replaceAll(ignoreChars, '').length; let hue = offset % 360; const characters = []; diff --git a/package.json b/package.json index 3c50010..4eb7f11 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ } }, "types": "./source/index.d.ts", + "sideEffects": false, "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -58,10 +59,9 @@ "log-update": "^5.0.0", "matcha": "^0.7.0", "tsd": "^0.19.0", - "xo": "^0.53.0", + "xo": "^0.57.0", "yoctodelay": "^2.0.0" }, - "sideEffects": false, "xo": { "rules": { "unicorn/prefer-string-slice": "off", diff --git a/readme.md b/readme.md index d52688b..6aa0119 100644 --- a/readme.md +++ b/readme.md @@ -15,48 +15,6 @@ ![](media/screenshot.png) -
- ---- - -
-

-

- - Sindre Sorhus' open source work is supported by the community on GitHub Sponsors - -

- Special thanks to: -
-
- - - -
-
- - - -
-
- -
- Strapi -
- Strapi is the leading open-source headless CMS. -
- It’s 100% JavaScript, fully customizable, and developer-first. -
-
-
-
-

-
- ---- - -
- ## Highlights - Expressive API diff --git a/source/index.d.ts b/source/index.d.ts index b0cd2ae..8295d92 100644 --- a/source/index.d.ts +++ b/source/index.d.ts @@ -1,7 +1,12 @@ // TODO: Make it this when TS suports that. // import {ModifierName, ForegroundColor, BackgroundColor, ColorName} from '#ansi-styles'; // import {ColorInfo, ColorSupportLevel} from '#supports-color'; -import {ModifierName, ForegroundColorName, BackgroundColorName, ColorName} from './vendor/ansi-styles/index.js'; +import { + ModifierName, + ForegroundColorName, + BackgroundColorName, + ColorName, +} from './vendor/ansi-styles/index.js'; import {ColorInfo, ColorSupportLevel} from './vendor/supports-color/index.js'; export interface Options { diff --git a/source/index.test-d.ts b/source/index.test-d.ts index e729675..92da39d 100644 --- a/source/index.test-d.ts +++ b/source/index.test-d.ts @@ -1,7 +1,22 @@ -import {expectType, expectAssignable, expectError, expectDeprecated} from 'tsd'; +import { + expectType, + expectAssignable, + expectError, + expectDeprecated, +} from 'tsd'; import chalk, { - Chalk, ChalkInstance, ColorInfo, ColorSupport, ColorSupportLevel, chalkStderr, supportsColor, supportsColorStderr, - ModifierName, ForegroundColorName, BackgroundColorName, ColorName, + Chalk, + ChalkInstance, + ColorInfo, + ColorSupport, + ColorSupportLevel, + chalkStderr, + supportsColor, + supportsColorStderr, + ModifierName, + ForegroundColorName, + BackgroundColorName, + ColorName, Modifiers, } from './index.js';