@vidavidorra/bunyan-pretty-stream 6.0.0 → 6.0.1
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/dist/formatter/time.js +6 -3
- package/package.json +2 -2
package/dist/formatter/time.js
CHANGED
@@ -28,10 +28,13 @@ class Formatter {
|
|
28
28
|
toIso8601(dateTime, preset) {
|
29
29
|
const includeOffset = preset === 'TIME_ISO_8601_OFFSET' ||
|
30
30
|
preset === 'DATETIME_ISO_8601_OFFSET';
|
31
|
-
|
32
|
-
|
31
|
+
const value = preset === 'TIME_ISO_8601_OFFSET' || preset === 'TIME_ISO_8601'
|
32
|
+
? dateTime.toISOTime({ includeOffset })
|
33
|
+
: dateTime.toISO({ includeOffset });
|
34
|
+
if (value === null) {
|
35
|
+
throw new Error('invalid Luxon DateTime');
|
33
36
|
}
|
34
|
-
return
|
37
|
+
return value;
|
35
38
|
}
|
36
39
|
toLocaleString(dateTime) {
|
37
40
|
const presetToFormatOptions = new Map([
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vidavidorra/bunyan-pretty-stream",
|
3
|
-
"version": "6.0.
|
3
|
+
"version": "6.0.1",
|
4
4
|
"description": "Highly configurable Bunyan stream with pretty output",
|
5
5
|
"type": "module",
|
6
6
|
"exports": "./dist/index.js",
|
@@ -50,7 +50,7 @@
|
|
50
50
|
"@semantic-release/exec": "6.0.3",
|
51
51
|
"@semantic-release/git": "10.0.1",
|
52
52
|
"@types/bunyan": "1.8.8",
|
53
|
-
"@types/luxon": "3.
|
53
|
+
"@types/luxon": "3.3.0",
|
54
54
|
"@types/node": "18.15.0",
|
55
55
|
"@vidavidorra/commitlint-config": "4.0.17",
|
56
56
|
"ava": "5.2.0",
|