Releases: unjs/defu
Releases · unjs/defu
v6.1.6
v6.1.5
v6.1.4
🩹 Fixes
- Merge objects with
Moduletype (#121)
💅 Refactors
- Move
isPlainObjectto_utilsto allow testing (e922a16) - Make
isPlainObjectlogic more readable (e458b63)
📖 Documentation
- Fix typo (#116)
✅ Tests
- Improve tests for internal
isPlainObjectutil (b24a213)
❤️ Contributors
- Alexander Lichter (@manniL)
- Pooya Parsa (@pi0)
- Yu Le [email protected]
v6.1.3
🩹 Fixes
- Only merge plain objects (#111)
📦 Build
- Backward compatible cjs entry (#110)
📖 Documentation
❤️ Contributors
- Pooya Parsa (@pi0)
- Abdul Al-Hasany [email protected]
- Kricsleo
- Donald Shtjefni (@dnldsht)
- Sébastien Chopin [email protected]
v6.0.0
⚠ BREAKING CHANGES
- When merging arrays, defaults are last in order:
defu(['a', 'b'], ['c', 'd'])
// With v6+
['a', 'b', 'c', 'd']
// Before
['c', 'd', 'a', 'b']- Using named exports instead of the default export
Before:
// With v6+
import { defu } from 'defu'
const { defu } = require('defu')
// Before
import defu from 'defu'
const defu = require('defu')Other utilities are also exported as named exports to be tree-shakable:
// instead of defu.fn
import { defuFn } from 'defu'
// Instead of defu.arrayFn
import { defuArrayFn } from 'defu'
// Instead of defu.extend
import { createDefu } from 'defu'