Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Aug 7, 2024
1 parent 795273f commit 77126fb
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 51 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/rainbow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
}
},
"types": "./source/index.d.ts",
"sideEffects": false,
"engines": {
"node": "^12.17.0 || ^14.13 || >=16.0.0"
},
Expand Down Expand Up @@ -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",
Expand Down
42 changes: 0 additions & 42 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,48 +15,6 @@

![](media/screenshot.png)

<br>

---

<div align="center">
<p>
<p>
<sup>
Sindre Sorhus' open source work is supported by the community on <a href="https://github.com/sponsors/sindresorhus">GitHub Sponsors</a>
</sup>
</p>
<sup>Special thanks to:</sup>
<br>
<br>
<a href="https://standardresume.co/tech">
<img src="https://sindresorhus.com/assets/thanks/standard-resume-logo.svg" width="160">
</a>
<br>
<br>
<a href="https://retool.com/?utm_campaign=sindresorhus">
<img src="https://sindresorhus.com/assets/thanks/retool-logo.svg" width="230">
</a>
<br>
<br>
<a href="https://strapi.io/?ref=sindresorhus">
<div>
<img src="https://sindresorhus.com/assets/thanks/strapi-logo-white-bg.png" width="220" alt="Strapi">
</div>
<b>Strapi is the leading open-source headless CMS.</b>
<div>
<sup>It’s 100% JavaScript, fully customizable, and developer-first.</sup>
</div>
</a>
<br>
<br>
</p>
</div>

---

<br>

## Highlights

- Expressive API
Expand Down
7 changes: 6 additions & 1 deletion source/index.d.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
21 changes: 18 additions & 3 deletions source/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down

0 comments on commit 77126fb

Please sign in to comment.