Skip to content

Releases: bokub/gradient-string

3.0.0

27 Sep 21:00
Compare
Choose a tag to compare
  • gradient-string v3 is now written in TypeScript & pure ESM
  • All dependencies are up-to-date, all security issues patched
  • New super-fast unit tests made with Vitest
  • Improved documentation

⚠️ v2 to v3 migration

Breaking changes

  • gradient-string requires Node.js 14+ (instead of 10 before)
  • You cannot require gradient-string anymore, you have to import it
    - const gradient = require('gradient-string');
    + import gradient, { rainbow } from 'gradient-string';

Deprecated

The following recommendations are not breaking changes, but you should migrate your code to avoid problems in the future.
N.B You may see @deprecated warnings or TypeScript errors/warnings if you decide not to.

// Don't use aliases like this
- import gradient from 'gradient-string';
- gradient.rainbow('Hello, World!');

// Import aliases separately instead
+ import { rainbow } from 'gradient-string';
+ rainbow('Hello, World!');
// Don't separate your colors in different arguments
- const coolGradient = gradient('red', 'blue')('Hello, World!');

// Use an array instead
+ const coolGradient = gradient(['red', 'blue'])('Hello, World!');
// Don't pass your options when you call your already initialized gradient
- const coolGradient = gradient(['red', 'blue'])
- coolGradient('Hello, World!', { interpolation: 'hsv' }); // Options were needed here
// Pass your options directly when you initialize it
+ const coolGradient = gradient(['red', 'blue'], { interpolation: 'hsv' }) // Pass them here
+ coolGradient('Hello, World!');

2.0.2

06 Sep 09:37
Compare
Choose a tag to compare
  • Upgrade dependencies to patch security issues

2.0.1

19 Apr 10:05
Compare
Choose a tag to compare
  • Upgrade dependencies to patch security issues

2.0.0

26 Nov 14:16
Compare
Choose a tag to compare
  • gradient-string now needs Node.js >=10. For older versions, please keep using version 1.2.0
  • Updated dependencies, especially chalk, which massively improves performance , and brings a better color detection.

1.2.0

19 Sep 05:55
Compare
Choose a tag to compare

Updated dependencies

1.1.0

29 Mar 19:35
Compare
Choose a tag to compare
  • Updated dependencies, especially chalk which brings a better color support detection
  • Improved README

1.0.0

27 Oct 12:52
Compare
Choose a tag to compare
  • Add multiline string support

0.1.2

21 Aug 15:48
Compare
Choose a tag to compare
Update dependencies version

0.1.1

21 Aug 15:47
Compare
Choose a tag to compare
Exclude useless files from the package

0.1.0 - First version

21 Aug 15:46
Compare
Choose a tag to compare
0.1.0 - Add screenshots to readme, renamed 'themes' > 'built-in gradi…