Skip to content

Commit 23cc432

Browse files
committed
chore: update repo
1 parent 70cffe5 commit 23cc432

File tree

13 files changed

+4069
-4058
lines changed

13 files changed

+4069
-4058
lines changed

.eslintrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.oxfmtrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"$schema": "https://unpkg.com/oxfmt/configuration_schema.json"
3+
}

.oxlintrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://unpkg.com/oxlint/configuration_schema.json",
3+
"plugins": [
4+
"unicorn",
5+
"typescript",
6+
"oxc"
7+
],
8+
"rules": {}
9+
}

.prettierrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 45 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -68,29 +68,28 @@ All notable changes to this project will be documented in this file. See [standa
6868

6969
- Pooya Parsa ([@pi0](http://github.com/pi0))
7070
- Abdul Al-Hasany <[email protected]>
71-
- Kricsleo
71+
- Kricsleo
7272
- Donald Shtjefni ([@dnldsht](http://github.com/dnldsht))
7373
- Sébastien Chopin <[email protected]>
7474

7575
## v6.1.2
7676

7777
[compare changes](https://github.com/unjs/defu/compare/v6.1.1...v6.1.2)
7878

79-
8079
### 🩹 Fixes
8180

82-
- Add node16 compatible type declaration ([#73](https://github.com/unjs/defu/pull/73))
81+
- Add node16 compatible type declaration ([#73](https://github.com/unjs/defu/pull/73))
8382

8483
### 🏡 Chore
8584

86-
- Fix renovate config ([#56](https://github.com/unjs/defu/pull/56))
87-
- Use changelogen to release ([5e24124](https://github.com/unjs/defu/commit/5e24124))
85+
- Fix renovate config ([#56](https://github.com/unjs/defu/pull/56))
86+
- Use changelogen to release ([5e24124](https://github.com/unjs/defu/commit/5e24124))
8887

8988
### 🎨 Styles
9089

91-
- Format with prettier ([26477ed](https://github.com/unjs/defu/commit/26477ed))
90+
- Format with prettier ([26477ed](https://github.com/unjs/defu/commit/26477ed))
9291

93-
### ❤️ Contributors
92+
### ❤️ Contributors
9493

9594
- Pooya Parsa <[email protected]>
9695
- Daniel Roe <[email protected]>
@@ -100,177 +99,159 @@ All notable changes to this project will be documented in this file. See [standa
10099

101100
## [6.1.0](https://github.com/unjs/defu/compare/v6.0.1...v6.1.0) (2022-08-16)
102101

103-
104102
### Features
105103

106-
* export `Defu` type helper ([#45](https://github.com/unjs/defu/issues/45)) ([551ae4c](https://github.com/unjs/defu/commit/551ae4c87c13f2188b97930eaffd72e5575e9048))
107-
104+
- export `Defu` type helper ([#45](https://github.com/unjs/defu/issues/45)) ([551ae4c](https://github.com/unjs/defu/commit/551ae4c87c13f2188b97930eaffd72e5575e9048))
108105

109106
### Bug Fixes
110107

111-
* **types:** constrain inferred types of `Defu` ([3d3ea3e](https://github.com/unjs/defu/commit/3d3ea3e4e982591632f070bbf64e28f9d98d6bf9))
108+
- **types:** constrain inferred types of `Defu` ([3d3ea3e](https://github.com/unjs/defu/commit/3d3ea3e4e982591632f070bbf64e28f9d98d6bf9))
112109

113110
### [6.0.1](https://github.com/unjs/defu/compare/v6.0.0...v6.0.1) (2022-08-16)
114111

115-
116112
### Bug Fixes
117113

118-
* add typing to allow for non-objects input args ([#42](https://github.com/unjs/defu/issues/42)) ([1f3a701](https://github.com/unjs/defu/commit/1f3a701bc3fd839344359ad5c2b358fbefd978cc))
119-
* merge object strings of many types ([#44](https://github.com/unjs/defu/issues/44)) ([c7226f9](https://github.com/unjs/defu/commit/c7226f971740966282530745030123aa07ff7b17))
114+
- add typing to allow for non-objects input args ([#42](https://github.com/unjs/defu/issues/42)) ([1f3a701](https://github.com/unjs/defu/commit/1f3a701bc3fd839344359ad5c2b358fbefd978cc))
115+
- merge object strings of many types ([#44](https://github.com/unjs/defu/issues/44)) ([c7226f9](https://github.com/unjs/defu/commit/c7226f971740966282530745030123aa07ff7b17))
120116

121117
## [6.0.0](https://github.com/unjs/defu/compare/v5.0.1...v6.0.0) (2022-03-21)
122118

123-
124119
### ⚠ BREAKING CHANGES
125120

126-
* Use named exports:
127-
- `import defu from 'defu'` => `import { defu } from 'defu'`
128-
- `defu.fn` => `import { defuFn }`
129-
- `defu.arrayFn` => `import { defuArrayFn }`
130-
* When merging input value with defaults with an array, order is reversed
121+
- Use named exports:
131122

132-
### Features
123+
* `import defu from 'defu'` => `import { defu } from 'defu'`
124+
* `defu.fn` => `import { defuFn }`
125+
* `defu.arrayFn` => `import { defuArrayFn }`
133126

134-
* concat array defaults to the last ([f6df314](https://github.com/unjs/defu/commit/f6df314c26540591c3ac6534c6942edc3b06384f))
135-
* use named exports ([4a8fc52](https://github.com/unjs/defu/commit/4a8fc52c228d82949384a50efe8f0052e9eaba68))
127+
- When merging input value with defaults with an array, order is reversed
128+
129+
### Features
136130

131+
- concat array defaults to the last ([f6df314](https://github.com/unjs/defu/commit/f6df314c26540591c3ac6534c6942edc3b06384f))
132+
- use named exports ([4a8fc52](https://github.com/unjs/defu/commit/4a8fc52c228d82949384a50efe8f0052e9eaba68))
137133

138134
### Bug Fixes
139135

140-
* workaround for [#32](https://github.com/unjs/defu/issues/32) ([7b1f284](https://github.com/unjs/defu/commit/7b1f284b76d2a4706b37adbdb99c49ec9d2d35aa))
136+
- workaround for [#32](https://github.com/unjs/defu/issues/32) ([7b1f284](https://github.com/unjs/defu/commit/7b1f284b76d2a4706b37adbdb99c49ec9d2d35aa))
141137

142138
### [5.0.1](https://github.com/unjs/defu/compare/v5.0.0...v5.0.1) (2022-01-13)
143139

144140
## [5.0.0](https://github.com/unjs/defu/compare/v4.0.1...v5.0.0) (2021-05-12)
145141

146-
147142
### ⚠ BREAKING CHANGES
148143

149-
* `undefined` values will be bypassed and not consistent behavior with defaults-deep anymore.
144+
- `undefined` values will be bypassed and not consistent behavior with defaults-deep anymore.
150145

151146
### Features
152147

153-
* skip nullish values from source ([#29](https://github.com/unjs/defu/issues/29)) ([076f10a](https://github.com/unjs/defu/commit/076f10a77fc1384f53e0586d3c77d754cd419f06))
148+
- skip nullish values from source ([#29](https://github.com/unjs/defu/issues/29)) ([076f10a](https://github.com/unjs/defu/commit/076f10a77fc1384f53e0586d3c77d754cd419f06))
154149

155150
### [4.0.1](https://github.com/unjs/defu/compare/v4.0.0...v4.0.1) (2021-04-23)
156151

157152
## [4.0.0](https://github.com/unjs/defu/compare/v3.2.2...v4.0.0) (2021-04-23)
158153

159-
160154
### ⚠ BREAKING CHANGES
161155

162-
* module exports
156+
- module exports
163157

164158
### Features
165159

166-
* module exports ([42df406](https://github.com/unjs/defu/commit/42df406b6938bc7ffb5f628efaa9447c4e95b211))
160+
- module exports ([42df406](https://github.com/unjs/defu/commit/42df406b6938bc7ffb5f628efaa9447c4e95b211))
167161

168162
### [3.2.2](https://github.com/unjs/defu/compare/v3.2.1...v3.2.2) (2020-11-10)
169163

170-
171164
### Bug Fixes
172165

173-
* switch back to bili for es5 support till fixing in siroc ([07786c2](https://github.com/unjs/defu/commit/07786c270f9bf49529d8203f31b4b9bd696a6ee3))
166+
- switch back to bili for es5 support till fixing in siroc ([07786c2](https://github.com/unjs/defu/commit/07786c270f9bf49529d8203f31b4b9bd696a6ee3))
174167

175168
### [3.2.1](https://github.com/unjs/defu/compare/v3.2.0...v3.2.1) (2020-11-09)
176169

177-
178170
### Bug Fixes
179171

180-
* **types:** correct type inference where merged types are same ([#26](https://github.com/unjs/defu/issues/26)) ([f322607](https://github.com/unjs/defu/commit/f322607515a5bd19b1a2f28d7e3336fee9194520))
172+
- **types:** correct type inference where merged types are same ([#26](https://github.com/unjs/defu/issues/26)) ([f322607](https://github.com/unjs/defu/commit/f322607515a5bd19b1a2f28d7e3336fee9194520))
181173

182174
## [3.2.0](https://github.com/unjs/defu/compare/v3.1.0...v3.2.0) (2020-11-09)
183175

184-
185176
### Features
186177

187-
* add type inference for defu result ([#24](https://github.com/unjs/defu/issues/24)) ([934d736](https://github.com/unjs/defu/commit/934d736da31f4824d9e135d925cece361b73c533))
188-
* pass namespace to custom merger ([#25](https://github.com/unjs/defu/issues/25)) ([6bd7ef5](https://github.com/unjs/defu/commit/6bd7ef59ce3e94b68108355942dba9ac49284523))
178+
- add type inference for defu result ([#24](https://github.com/unjs/defu/issues/24)) ([934d736](https://github.com/unjs/defu/commit/934d736da31f4824d9e135d925cece361b73c533))
179+
- pass namespace to custom merger ([#25](https://github.com/unjs/defu/issues/25)) ([6bd7ef5](https://github.com/unjs/defu/commit/6bd7ef59ce3e94b68108355942dba9ac49284523))
189180

190181
## [3.1.0](https://github.com/unjs/defu/compare/v3.0.1...v3.1.0) (2020-08-04)
191182

192-
193183
### Features
194184

195-
* add defu.arrayFn ([#21](https://github.com/unjs/defu/issues/21)) ([df05ed0](https://github.com/unjs/defu/commit/df05ed04088d6e0f0bc1a8cd9603fae46fb59268))
185+
- add defu.arrayFn ([#21](https://github.com/unjs/defu/issues/21)) ([df05ed0](https://github.com/unjs/defu/commit/df05ed04088d6e0f0bc1a8cd9603fae46fb59268))
196186

197187
### [3.0.1](https://github.com/unjs/defu/compare/v3.0.0...v3.0.1) (2020-07-29)
198188

199-
200189
### Bug Fixes
201190

202-
* recursively pass merger ([ec09394](https://github.com/unjs/defu/commit/ec09394d77533cd0a4753a943a5d6fbd25ef308d))
191+
- recursively pass merger ([ec09394](https://github.com/unjs/defu/commit/ec09394d77533cd0a4753a943a5d6fbd25ef308d))
203192

204193
## [3.0.0](https://github.com/unjs/defu/compare/v2.0.4...v3.0.0) (2020-07-28)
205194

206-
207195
### ⚠ BREAKING CHANGES
208196

209-
* defau will merge arrays too (#18)
197+
- defau will merge arrays too (#18)
210198

211199
### Features
212200

213-
* extend and custom merger ([#19](https://github.com/unjs/defu/issues/19)) ([4932232](https://github.com/unjs/defu/commit/493223278840132a6de2c3291b60f7b00b3fa477))
214-
* merge arrays ([#18](https://github.com/unjs/defu/issues/18)) ([22c631e](https://github.com/unjs/defu/commit/22c631e354d9bc50380ce7beb8914bd44feb2309))
201+
- extend and custom merger ([#19](https://github.com/unjs/defu/issues/19)) ([4932232](https://github.com/unjs/defu/commit/493223278840132a6de2c3291b60f7b00b3fa477))
202+
- merge arrays ([#18](https://github.com/unjs/defu/issues/18)) ([22c631e](https://github.com/unjs/defu/commit/22c631e354d9bc50380ce7beb8914bd44feb2309))
215203

216204
### [2.0.4](https://github.com/unjs/defu/compare/v2.0.3...v2.0.4) (2020-05-22)
217205

218-
219206
### Bug Fixes
220207

221-
* correct path to types ([33d4bf0](https://github.com/unjs/defu/commit/33d4bf0331e70b69a3a2a392f18a8f890d45d4f9))
208+
- correct path to types ([33d4bf0](https://github.com/unjs/defu/commit/33d4bf0331e70b69a3a2a392f18a8f890d45d4f9))
222209

223210
### [2.0.3](https://github.com/unjs/defu/compare/v2.0.2...v2.0.3) (2020-05-22)
224211

225-
226212
### Bug Fixes
227213

228-
* specify type declaration file more precisely ([#15](https://github.com/unjs/defu/issues/15)) ([6aa47d4](https://github.com/unjs/defu/commit/6aa47d4a06a117b34b5e9231b04f8403056c2685))
214+
- specify type declaration file more precisely ([#15](https://github.com/unjs/defu/issues/15)) ([6aa47d4](https://github.com/unjs/defu/commit/6aa47d4a06a117b34b5e9231b04f8403056c2685))
229215

230216
### [2.0.2](https://github.com/unjs/defu/compare/v2.0.1...v2.0.2) (2020-04-19)
231217

232218
### [2.0.1](https://github.com/unjs/defu/compare/v2.0.0...v2.0.1) (2020-04-19)
233219

234220
### Docs
235221

236-
* Add note about `null`
222+
- Add note about `null`
237223

238224
## [2.0.0](https://github.com/unjs/defu/compare/v1.0.0...v2.0.0) (2020-04-19)
239225

240226
### Features
241227

242-
* Support passing multiple defaults ([89ef702](https://github.com/unjs/defu/commit/89ef702736b49cd48ca99a0dc64aa6ef3bd74e2d))
243-
* Typescript rewrite ([9c906e6](https://github.com/unjs/defu/commit/9c906e64459da64d77124224edb66034ce92f20c))
228+
- Support passing multiple defaults ([89ef702](https://github.com/unjs/defu/commit/89ef702736b49cd48ca99a0dc64aa6ef3bd74e2d))
229+
- Typescript rewrite ([9c906e6](https://github.com/unjs/defu/commit/9c906e64459da64d77124224edb66034ce92f20c))
244230

245231
<a name="1.0.0"></a>
246-
# [1.0.0](https://github.com/unjs/defu/compare/v0.0.4...v1.0.0) (2020-02-02)
247-
248232

233+
# [1.0.0](https://github.com/unjs/defu/compare/v0.0.4...v1.0.0) (2020-02-02)
249234

250235
<a name="0.0.4"></a>
251-
## [0.0.4](https://github.com/unjs/defu/compare/v0.0.3...v0.0.4) (2020-01-01)
252236

237+
## [0.0.4](https://github.com/unjs/defu/compare/v0.0.3...v0.0.4) (2020-01-01)
253238

254239
### Bug Fixes
255240

256-
* improve es5 compatibility ([#2](https://github.com/unjs/defu/issues/2), [#9](https://github.com/unjs/defu/issues/9)) ([5a6de7c](https://github.com/unjs/defu/commit/5a6de7c))
257-
258-
241+
- improve es5 compatibility ([#2](https://github.com/unjs/defu/issues/2), [#9](https://github.com/unjs/defu/issues/9)) ([5a6de7c](https://github.com/unjs/defu/commit/5a6de7c))
259242

260243
<a name="0.0.3"></a>
261-
## [0.0.3](https://github.com/unjs/defu/compare/v0.0.1...v0.0.3) (2019-05-25)
262-
263244

245+
## [0.0.3](https://github.com/unjs/defu/compare/v0.0.1...v0.0.3) (2019-05-25)
264246

265247
<a name="0.0.2"></a>
266-
## [0.0.2](https://github.com/jesless/defu/compare/v0.0.1...v0.0.2) (2019-05-25)
267-
268248

249+
## [0.0.2](https://github.com/jesless/defu/compare/v0.0.1...v0.0.2) (2019-05-25)
269250

270251
<a name="0.0.1"></a>
271-
## 0.0.1 (2019-02-07)
272252

253+
## 0.0.1 (2019-02-07)
273254

274255
### Bug Fixes
275256

276-
* imrpove non-object handlers ([f89fa28](https://github.com/jesless/defu/commit/f89fa28))
257+
- imrpove non-object handlers ([f89fa28](https://github.com/jesless/defu/commit/f89fa28))

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -108,19 +108,19 @@ defuFn(
108108
**Example:** Filter some items from defaults (array) and add 20 to the count default value.
109109

110110
```js
111-
import { defuArrayFn } from 'defu'
112-
113-
defuArrayFn({
114-
ignore: (val) => val.filter(i => i !== 'dist'),
115-
count: () => 20
116-
}, {
117-
ignore: [
118-
'node_modules',
119-
'dist'
120-
],
121-
count: 10
122-
})
123-
/*
111+
import { defuArrayFn } from "defu";
112+
113+
defuArrayFn(
114+
{
115+
ignore: (val) => val.filter((i) => i !== "dist"),
116+
count: () => 20,
117+
},
118+
{
119+
ignore: ["node_modules", "dist"],
120+
count: 10,
121+
},
122+
);
123+
/*
124124
{
125125
ignore: ['node_modules'],
126126
count: () => 20

lib/defu.cjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { defu, createDefu, defuFn, defuArrayFn } = require('../dist/defu.cjs');
1+
const { defu, createDefu, defuFn, defuArrayFn } = require("../dist/defu.cjs");
22

33
module.exports = defu;
44

@@ -8,4 +8,3 @@ module.exports.default = defu;
88
module.exports.createDefu = createDefu;
99
module.exports.defuFn = defuFn;
1010
module.exports.defuArrayFn = defuArrayFn;
11-

package.json

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,44 @@
22
"name": "defu",
33
"version": "6.1.4",
44
"description": "Recursively assign default properties. Lightweight and Fast!",
5-
"repository": "unjs/defu",
65
"license": "MIT",
6+
"repository": "unjs/defu",
7+
"files": [
8+
"dist",
9+
"lib"
10+
],
11+
"main": "./lib/defu.cjs",
12+
"module": "./dist/defu.mjs",
13+
"types": "./dist/defu.d.ts",
714
"exports": {
815
".": {
916
"types": "./dist/defu.d.ts",
1017
"import": "./dist/defu.mjs",
1118
"require": "./lib/defu.cjs"
1219
}
1320
},
14-
"main": "./lib/defu.cjs",
15-
"module": "./dist/defu.mjs",
16-
"types": "./dist/defu.d.ts",
17-
"files": [
18-
"dist",
19-
"lib"
20-
],
2121
"scripts": {
2222
"build": "unbuild",
2323
"dev": "vitest",
24-
"lint": "eslint --ext .ts src && prettier -c src test",
25-
"lint:fix": "eslint --ext .ts src --fix && prettier -w src test",
24+
"lint": "oxlint src && oxfmt --check src test",
25+
"lint:fix": "oxlint src --fix && oxfmt src test",
2626
"prepack": "pnpm build",
2727
"release": "pnpm test && changelogen --release && git push --follow-tags && pnpm publish",
2828
"test": "pnpm lint && pnpm vitest run",
29-
"test:types": "tsc --noEmit"
29+
"test:types": "tsgo --noEmit"
3030
},
3131
"devDependencies": {
32-
"@types/node": "^20.10.6",
33-
"@vitest/coverage-v8": "^1.1.3",
34-
"changelogen": "^0.5.5",
35-
"eslint": "^8.56.0",
36-
"eslint-config-unjs": "^0.2.1",
37-
"expect-type": "^0.17.3",
38-
"prettier": "^3.1.1",
39-
"typescript": "^5.3.3",
40-
"unbuild": "^2.0.0",
41-
"vitest": "^1.1.3"
32+
"@types/node": "^25.5.0",
33+
"@typescript/native-preview": "7.0.0-dev.20260401.1",
34+
"@vitest/coverage-v8": "^4.1.2",
35+
"changelogen": "^0.6.2",
36+
"eslint-config-unjs": "^0.6.2",
37+
"expect-type": "^1.3.0",
38+
"oxfmt": "^0.43.0",
39+
"oxlint": "^1.58.0",
40+
"typescript": "^6.0.2",
41+
"unbuild": "^3.6.1",
42+
"vitest": "^4.1.2"
4243
},
43-
"packageManager": "pnpm@8.10.2"
44-
}
44+
"packageManager": "pnpm@10.33.0"
45+
}

0 commit comments

Comments
 (0)