v1.0.0-0
Pre-release
Pre-release
⚠️ BREAKING CHANGE
This release converts the package to ESM-only and TypeScript. Projects using require() will need to migrate to ESM or use dynamic imports.
After this PR CommonJS is no longer supported. See ESM Module FAQ.
Migration Guide
For consumers using CommonJS (require):
// ❌ No longer works
const getBestContrastColor = require('get-best-contrast-color')
// ✅ Option 1: Convert to ESM
import getBestContrastColor from 'get-best-contrast-color'
// ✅ Option 2: Use dynamic import
const { default: getBestContrastColor } = await import('get-best-contrast-color')For consumers already using ESM:
No changes needed - the package now properly exports ESM.
What's Changed
Summary
This release modernizes the build tooling to current standards:
- Convert from JavaScript to TypeScript
- ESLint 9 with flat config
- ESM module format (breaking change)
- TypeScript 5.9.2
- tsx for test execution
- Node.js 20, 22, 24 support
- get-contrast-ratio@1.0.0-1 (ESM version)
- GitHub Actions replacing Travis CI
BREAKING
CI
- ci: Upgrade to GitHub-native Dependabot (#315) bd0b3ab
- ci: Add GitHub Actions workflow (#356) 5455400
Chore
Docs
docs(readme): replace greenkeeper badge with dependabot badge (#68) 6a5dd66
Build
- build(deps-dev): bump tsx from 4.19.2 to 4.20.6 (#358) 0bcf348
- build(deps-dev): bump @eslint/js from 9.32.0 to 9.37.0 (#362) a92fe01
- build(deps-dev): bump eslint from 9.32.0 to 9.37.0 (#357) 6720ff3
- build(deps-dev): bump mocha from 11.7.1 to 11.7.4 (#359) 81619ea
- build(deps-dev): bump @types/node from 22.10.5 to 24.7.1 (#361) e1dc4bb
- build(deps): bump minimist from 1.2.0 to 1.2.8 (#363) e164142
- build(deps-dev): bump typescript from 5.9.2 to 5.9.3 (#360) e411a16
- build(deps-dev): bump np from 5.0.2 to 5.1.3 (#107) 0bffee5
- build(deps-dev): bump @babel/register from 7.5.5 to 7.7.0 (#101) 6f9559e
- build(deps-dev): bump @babel/core from 7.5.5 to 7.7.2 (#106) fe4d95e
- build(deps-dev): bump @babel/preset-env from 7.5.5 to 7.7.1 (#105) 7e9a3ad
- build(deps-dev): bump @babel/cli from 7.5.5 to 7.7.0 (#102) 476379d
- build(deps-dev): bump eslint from 6.5.1 to 6.6.0 (#99) 84d6895
- build(deps-dev): bump eslint-plugin-react from 7.14.3 to 7.16.0 (#90) 88c0892
- build(deps-dev): bump eslint from 6.1.0 to 6.5.1 (#87) f3dbf05
- build(deps-dev): bump mocha from 6.2.0 to 6.2.2 (#97) 8d3e9bb
- build(deps): [security] bump eslint-utils from 1.3.1 to 1.4.3 (#98) 309544b
- build(deps): [security] bump mixin-deep from 1.3.1 to 1.3.2 (#73) fd715e6
- build(deps-dev): bump eslint-plugin-react from 7.14.2 to 7.14.3 (#67) 31e8b68
- build(deps-dev): bump eslint from 6.0.1 to 6.1.0 (#63) 2fb7378
- build(deps-dev): bump eslint-plugin-import from 2.18.0 to 2.18.2 (#66) d2bb614
- build(deps-dev): bump mocha from 6.1.4 to 6.2.0 (#58) 937cbb1
- chore(package): update @babel packages from 7.5.4 to 7.5.5 (#55) 9b5a6f0
Full Changelog: v0.3.1...v1.0.0-0