Releases: projectwallace/color-sorter
Releases · projectwallace/color-sorter
6.0.1
What's Changed
- Bump @babel/traverse from 7.22.8 to 7.23.2 by @dependabot in #61
- Bump postcss from 8.4.26 to 8.4.31 by @dependabot in #62
- fix types export by @bartveneman in #66
Full Changelog: v6.0.0...v6.0.1
6.0.0: ESM release
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
Tiny release tarball
v5.0.2 5.0.2
5.0.0
🚨 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
Dropped Node 6 support
- 🔥 BREAKING CHANGE 🔥 Drop Node 6 support
- Update dependencies
Expose sortFn
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
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
This release was attempt to improve the API, but it completely broke the sorting (but not the tests 🤔)