Skip to content

Releases: unjs/defu

v6.1.4

05 Jan 19:15
@pi0 pi0
1b9fcab
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • Merge objects with Module type (#121)

πŸ’… Refactors

  • Move isPlainObject to _utils to allow testing (e922a16)
  • Make isPlainObject logic more readable (e458b63)

πŸ“– Documentation

βœ… Tests

  • Improve tests for internal isPlainObject util (b24a213)

❀️ Contributors

v6.1.3

24 Oct 23:03
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • Only merge plain objects (#111)

πŸ“¦ Build

  • Backward compatible cjs entry (#110)

πŸ“– Documentation

  • Update badges (581dd92)
  • Fix typo (#96)
  • Fix the result of the array merging (#99)
  • Fix typo (#107)

❀️ Contributors

v6.0.0

21 Mar 13:53
@pi0 pi0
Compare
Choose a tag to compare

⚠ 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'

Features

  • concat array defaults to the last (f6df314)
  • use named exports (4a8fc52)

v5.0.0

12 May 16:51
@pi0 pi0
Compare
Choose a tag to compare

⚠ BREAKING CHANGES

  • undefined values will be bypassed and not consistent behavior with defaults-deep anymore.

Features

v4.0.0

12 May 16:50
@pi0 pi0
Compare
Choose a tag to compare

⚠ BREAKING CHANGES

  • module exports

Features

v3.2.2

10 Nov 13:06
@pi0 pi0
Compare
Choose a tag to compare

Bug Fixes

  • switch back to bili for es5 support till fixing in siroc (07786c2)

v3.2.1

09 Nov 11:12
@pi0 pi0
Compare
Choose a tag to compare

Bug Fixes

  • types: correct type inference where merged types are same (#26) (f322607)

v3.2.0

09 Nov 09:34
@pi0 pi0
Compare
Choose a tag to compare

Features

  • add type inference for defu result (#24) (934d736)
  • pass namespace to custom merger (#25) (6bd7ef5)

v3.1.0

04 Aug 15:57
Compare
Choose a tag to compare

Features