Skip to content

Releases: projectwallace/color-sorter

6.0.1

16 Apr 19:46
Compare
Choose a tag to compare

What's Changed

Full Changelog: v6.0.0...v6.0.1

6.0.0: ESM release

16 Jul 07:39
Compare
Choose a tag to compare

Breaking

  • This is now an ESM package, but we've added a build step to generate CommonJS output as well.
  • The package no longer exports a default export. There are now three named exports: { sort, sortFn, convert }

Upgrade

// before (v5.x)
const sort = require('color-sorter')

// after (v6)
import { sort } from 'color-sorter'

let sorted = sortColors(['red', 'blue'])

What's Changed

  • 📦 Converted to ESM
  • 🗂️ TS types included
  • 🧪 Simplified GitHub actions test matrix to a single Node version
  • 🛠️ Removed EsLint setup

Full Changelog: v5.0.3...v6.0.0

5.0.3

23 Jan 21:06
Compare
Choose a tag to compare

Tiny release tarball

19 Apr 21:22
Compare
Choose a tag to compare
v5.0.2

5.0.2

5.0.0

19 Apr 20:59
Compare
Choose a tag to compare

🚨 Breaking changes

  • 8️⃣ Dropped support for Node.js 8

🎁 Minor changes

  • 🏎 Replace tinycolor2 with colord for performance optimisations
  • 👓 Fully transparent colors are now sorted alongside their opaque companions, instead of being pushed to the end of the list
  • 🧰 Updated devDependencies
  • 🎁 Readme updates

Update dependencies, replace CI

17 Mar 20:06
Compare
Choose a tag to compare

Dropped Node 6 support

31 Aug 20:50
Compare
Choose a tag to compare
  • 🔥 BREAKING CHANGE 🔥 Drop Node 6 support
  • Update dependencies

Expose sortFn

21 Dec 23:01
Compare
Choose a tag to compare

This release adds support for using a sort function as a callback for array sorting. In other words, the api got better => ‘myColors.sort(colorSorter)’

Shift transparent colors to the end

05 Oct 20:24
Compare
Choose a tag to compare

Colors like rgba(0, 0, 0, 0) and hsla(100, 50%, 90%, 0) are actually invisible, so there is little use in listing them in between 'regular' colors, since comparing them is pretty much impossible. Moving them to the very end of our list makes more sense.

BROKEN - DO NOT USE - Improve API

16 Sep 21:43
Compare
Choose a tag to compare

This release was attempt to improve the API, but it completely broke the sorting (but not the tests 🤔)