@wistia/utils 0.17.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +159 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -12
- package/dist/index.cjs +0 -1921
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -1560
- package/dist/index.d.cts.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# @wistia/utils
|
|
2
|
+
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#280](https://github.com/wistia/utils/pull/280) [`4201db5`](https://github.com/wistia/utils/commit/4201db5b2561fa55400a97ae8fd0446d96b0e725) Thanks [@okize](https://github.com/okize)! - feat!: drop commonJS support (ESM only)
|
|
8
|
+
|
|
9
|
+
## 0.17.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#275](https://github.com/wistia/type-guards/pull/275) [`feabe44`](https://github.com/wistia/type-guards/commit/feabe441245825095c43ed58a37bdf2724d23a70) Thanks [@okize](https://github.com/okize)! - Add the `isEmail` utility, ported from the Wistia app
|
|
14
|
+
|
|
15
|
+
## 0.16.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [#273](https://github.com/wistia/type-guards/pull/273) [`1e36fd8`](https://github.com/wistia/type-guards/commit/1e36fd8762af671d8bd24e028787c58589129ac1) Thanks [@okize](https://github.com/okize)! - Add the `noOpFn`, `noOpFnReturningFalse`, `noOpFnReturningNull`, and `asyncNoOpFn` utilities and the `NoOpFn`, `NoOpFnReturningFalse`, `NoOpFnReturningNull`, `AsyncNoOpFn`, and `AsyncOrSyncNoOpFn` types. Each function does nothing; they serve as default or placeholder callbacks
|
|
20
|
+
|
|
21
|
+
## 0.15.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- [#251](https://github.com/wistia/type-guards/pull/251) [`7740fc8`](https://github.com/wistia/type-guards/commit/7740fc8d652831074d429aa207500e226c49f8e5) Thanks [@okize](https://github.com/okize)! - Add the `deepMerge` utility and `DeepMerged` type. Deeply merges objects without mutating them, inferring the return type from the inputs; plain objects merge recursively, arrays concatenate with duplicates removed, and other values are overwritten in argument order
|
|
26
|
+
|
|
27
|
+
## 0.14.0
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- [#247](https://github.com/wistia/type-guards/pull/247) [`e4c822c`](https://github.com/wistia/type-guards/commit/e4c822cde3e776b2985da90cfc20ddbaa03d5435) Thanks [@okize](https://github.com/okize)! - Add the date and time utilities from `@wistia/ui`: `buildTimeDuration`, `dateOnlyISOString`, `dateOnlyString`, `dateOnlyStringForSentence`, `dateOnlyStringNumeric`, `dateTimeRounded`, `dateTimeString`, `dateTimeStringForSentence`, `dateTimeToDate`, `dateTimeToISO`, `dateToDateTime`, `dateUTCOffset`, `dayOfWeekString`, `mediaDurationString`, `millisecondsToDurationISOString`, `monthDayStringNumeric`, `parseDateString`, `sessionDurationString`, `timeAgoString`, and `timeOnlyString`, plus the `DateOnlyStringOptions`, `DateTimeRoundedOverload`, `TimeAgoOptions`, `TimeDuration`, and `WistiaDateTimeObject` types
|
|
32
|
+
|
|
33
|
+
## 0.13.1
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- [#240](https://github.com/wistia/type-guards/pull/240) [`9e86ea9`](https://github.com/wistia/type-guards/commit/9e86ea9b9271da61f3e90dbd41b2e01b347ad0ba) Thanks [@okize](https://github.com/okize)! - fix: narrow `isRecord` to `Record<string, unknown>` instead of `EmptyObject | Record<string, unknown>`
|
|
38
|
+
|
|
39
|
+
The `EmptyObject` union member was redundant — `Record<string, unknown>` already
|
|
40
|
+
accepts `{}` — and it broke the guard's primary use: because `EmptyObject` has no
|
|
41
|
+
index signature, every `value['someKey']` read after a passing `isRecord` check
|
|
42
|
+
failed with TS7053. `isNotRecord`'s declared type is updated to match; its
|
|
43
|
+
resolved type is unchanged.
|
|
44
|
+
|
|
45
|
+
## 0.13.0
|
|
46
|
+
|
|
47
|
+
### Minor Changes
|
|
48
|
+
|
|
49
|
+
- [#235](https://github.com/wistia/type-guards/pull/235) [`6a92f7f`](https://github.com/wistia/type-guards/commit/6a92f7f744b6268308031dadd9ddc0b4c475297c) Thanks [@okize](https://github.com/okize)! - feat: add guards `isRegExp`, `isBigInt`, `isSymbol`, `isPromise`, `isIterable`, `isMap`, `isSet`, `isWeakMap`, `isWeakSet`, `isAsyncFunction`
|
|
50
|
+
|
|
51
|
+
## 0.12.0
|
|
52
|
+
|
|
53
|
+
### Minor Changes
|
|
54
|
+
|
|
55
|
+
- [#233](https://github.com/wistia/type-guards/pull/233) [`ff94757`](https://github.com/wistia/type-guards/commit/ff947573899f4265e68a3a8ab9e7842da8d9fedf) Thanks [@okize](https://github.com/okize)! - feat: add guards `isNonBlankString`, `isNonNaNNumber`, `isFiniteNumber`, `isPlainObject`, `isHtmlElement`, `isHtmlInputElement`, `isHtmlVideoElement`, `isHtmlButtonElement`, `isSvgElement`, `isTextNode`, `readonlyArrayIncludes`, `isMouseEvent` and utilities `getObjectEntries`, `getObjectKeys`, `getObjectValues`, `tupleIncludes`
|
|
56
|
+
|
|
57
|
+
## 0.11.4
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- [#225](https://github.com/wistia/type-guards/pull/225) [`d3b2734`](https://github.com/wistia/type-guards/commit/d3b273448baff8c4e17061846214eb5bbfca9466) Thanks [@okize](https://github.com/okize)! - feat: add `NullableProperties` type
|
|
62
|
+
|
|
63
|
+
## 0.11.3
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- [#217](https://github.com/wistia/type-guards/pull/217) [`0f0b7bb`](https://github.com/wistia/type-guards/commit/0f0b7bba1cd0dd8af8d5d0dda4ff80d88e9e6ee4) Thanks [@okize](https://github.com/okize)! - feat: add llms.txt and llms-full.txt for agent consumption
|
|
68
|
+
|
|
69
|
+
## 0.11.2
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- [#211](https://github.com/wistia/type-guards/pull/211) [`6c2bbcd`](https://github.com/wistia/type-guards/commit/6c2bbcdd41a68886429d9d0ef2ff7784cedc7207) Thanks [@okize](https://github.com/okize)! - fix: split index.ts into per-guard files under `src`
|
|
74
|
+
|
|
75
|
+
## 0.11.1
|
|
76
|
+
|
|
77
|
+
### Patch Changes
|
|
78
|
+
|
|
79
|
+
- [#206](https://github.com/wistia/type-guards/pull/206) [`ec39edd`](https://github.com/wistia/type-guards/commit/ec39edd03204174e1956e16d4567efb2c6122253) Thanks [@okize](https://github.com/okize)! - feat: add `Arrayable` type
|
|
80
|
+
|
|
81
|
+
## 0.11.0
|
|
82
|
+
|
|
83
|
+
### Minor Changes
|
|
84
|
+
|
|
85
|
+
- [#194](https://github.com/wistia/type-guards/pull/194) [`ef44620`](https://github.com/wistia/type-guards/commit/ef446209c3099ac53cbc17a18b18df09d779c0a3) Thanks [@okize](https://github.com/okize)! - feat: add `isDate` type guard
|
|
86
|
+
|
|
87
|
+
## 0.10.0
|
|
88
|
+
|
|
89
|
+
### Minor Changes
|
|
90
|
+
|
|
91
|
+
- [#182](https://github.com/wistia/type-guards/pull/182) [`b1ce2fe`](https://github.com/wistia/type-guards/commit/b1ce2fe8beccb9375cbc25bf534ab57b313bb45c) Thanks [@okize](https://github.com/okize)! - feat: switch build from `tsup` to `tsdown`
|
|
92
|
+
|
|
93
|
+
## 0.9.3
|
|
94
|
+
|
|
95
|
+
### Patch Changes
|
|
96
|
+
|
|
97
|
+
- [#163](https://github.com/wistia/type-guards/pull/163) [`67fe310`](https://github.com/wistia/type-guards/commit/67fe310ce9dd5f14e24694bdd3cd5342476c28cf) Thanks [@okize](https://github.com/okize)! - fix: remove remaining GH links from `package.json`
|
|
98
|
+
|
|
99
|
+
## 0.9.2
|
|
100
|
+
|
|
101
|
+
### Patch Changes
|
|
102
|
+
|
|
103
|
+
- [#161](https://github.com/wistia/type-guards/pull/161) [`966b9ea`](https://github.com/wistia/type-guards/commit/966b9eafdd667ac0a82891aec91ff73d41879eba) Thanks [@okize](https://github.com/okize)! - fix: set license to MIT
|
|
104
|
+
|
|
105
|
+
## 0.9.1
|
|
106
|
+
|
|
107
|
+
### Patch Changes
|
|
108
|
+
|
|
109
|
+
- [#113](https://github.com/wistia/type-guards/pull/113) [`1be4586`](https://github.com/wistia/type-guards/commit/1be458654816bc1b3752fd0648c592d7189e6cb2) Thanks [@okize](https://github.com/okize)! - fix: ensure build emits correct commonjs & esm exports
|
|
110
|
+
|
|
111
|
+
## 0.9.0
|
|
112
|
+
|
|
113
|
+
### Minor Changes
|
|
114
|
+
|
|
115
|
+
- [#109](https://github.com/wistia/type-guards/pull/109) [`6f54871`](https://github.com/wistia/type-guards/commit/6f548712fec133bc9d9c47aab226e3d8ed9568bd) Thanks [@okize](https://github.com/okize)! - feat: add isTruthy type guard
|
|
116
|
+
|
|
117
|
+
## 0.8.0
|
|
118
|
+
|
|
119
|
+
### Minor Changes
|
|
120
|
+
|
|
121
|
+
- [#107](https://github.com/wistia/type-guards/pull/107) [`2bae8ba`](https://github.com/wistia/type-guards/commit/2bae8baff6f069686d76f53cba0e1b396aa456e1) Thanks [@okize](https://github.com/okize)! - feat: add isFalsy type guard
|
|
122
|
+
|
|
123
|
+
## 0.7.0
|
|
124
|
+
|
|
125
|
+
### Minor Changes
|
|
126
|
+
|
|
127
|
+
- [#73](https://github.com/wistia/type-guards/pull/73) [`38c0b23`](https://github.com/wistia/type-guards/commit/38c0b231692a2b16335913d6862387dbc1b0306e) Thanks [@okize](https://github.com/okize)! - feat: add isNotRecord type guard
|
|
128
|
+
|
|
129
|
+
- [#91](https://github.com/wistia/type-guards/pull/91) [`9b2beed`](https://github.com/wistia/type-guards/commit/9b2beeddfbf456007dce87f6afba5e85796f59f1) Thanks [@okize](https://github.com/okize)! - feat: add `isNotVoid` type guard
|
|
130
|
+
|
|
131
|
+
## 0.6.0
|
|
132
|
+
|
|
133
|
+
### Minor Changes
|
|
134
|
+
|
|
135
|
+
- [#69](https://github.com/wistia/type-guards/pull/69) [`cacf785`](https://github.com/wistia/type-guards/commit/cacf785d526a01ed134d5dbd6b7d595012dc20f5) Thanks [@okize](https://github.com/okize)! - feat: add isNotArray type guard
|
|
136
|
+
|
|
137
|
+
## 0.5.0
|
|
138
|
+
|
|
139
|
+
### Minor Changes
|
|
140
|
+
|
|
141
|
+
- [`ab086eb`](https://github.com/wistia/type-guards/commit/ab086eb1d095522cdfa80d3e1f330afea0bb826f) Thanks [@okize](https://github.com/okize)! - feat: add `isNotBoolean` type guard
|
|
142
|
+
|
|
143
|
+
## 0.4.0
|
|
144
|
+
|
|
145
|
+
### Minor Changes
|
|
146
|
+
|
|
147
|
+
- [#61](https://github.com/wistia/type-guards/pull/61) [`41f8d7b`](https://github.com/wistia/type-guards/commit/41f8d7b3d6e18012df2615412df8586ad1872424) Thanks [@okize](https://github.com/okize)! - feat: add `isNotFunction` type guard
|
|
148
|
+
|
|
149
|
+
## 0.3.0
|
|
150
|
+
|
|
151
|
+
### Minor Changes
|
|
152
|
+
|
|
153
|
+
- [#56](https://github.com/wistia/type-guards/pull/56) [`08804e5`](https://github.com/wistia/type-guards/commit/08804e53af325090ff26894f953cdc972fe8c660) Thanks [@okize](https://github.com/okize)! - feat: add `isNotNumber` type guard
|
|
154
|
+
|
|
155
|
+
## 0.2.0
|
|
156
|
+
|
|
157
|
+
### Minor Changes
|
|
158
|
+
|
|
159
|
+
- [`e873b82`](https://github.com/wistia/type-guards/commit/e873b82478bf8868cb99dc0d5ad70e10226f9d40) Thanks [@okize](https://github.com/okize)! - feat: add `isNotString` type guard
|
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"packageManager": "yarn@4.18.1",
|
|
5
5
|
"description": "Type guards",
|
|
6
6
|
"files": [
|
|
@@ -10,20 +10,12 @@
|
|
|
10
10
|
],
|
|
11
11
|
"type": "module",
|
|
12
12
|
"sideEffects": false,
|
|
13
|
-
"main": "dist/index.cjs",
|
|
14
|
-
"module": "dist/index.mjs",
|
|
15
13
|
"types": "dist/index.d.mts",
|
|
16
14
|
"exports": {
|
|
17
15
|
"./package.json": "./package.json",
|
|
18
16
|
".": {
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
"default": "./dist/index.mjs"
|
|
22
|
-
},
|
|
23
|
-
"require": {
|
|
24
|
-
"types": "./dist/index.d.cts",
|
|
25
|
-
"default": "./dist/index.cjs"
|
|
26
|
-
}
|
|
17
|
+
"types": "./dist/index.d.mts",
|
|
18
|
+
"default": "./dist/index.mjs"
|
|
27
19
|
}
|
|
28
20
|
},
|
|
29
21
|
"scripts": {
|
|
@@ -80,4 +72,4 @@
|
|
|
80
72
|
],
|
|
81
73
|
"license": "MIT",
|
|
82
74
|
"author": "Wistia Engineering"
|
|
83
|
-
}
|
|
75
|
+
}
|