@nxtedition/lib 23.3.26 → 23.3.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "23.3.26",
3
+ "version": "23.3.28",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",
package/trace.js CHANGED
@@ -14,7 +14,7 @@ export function makeTrace({
14
14
  stringify = JSON.stringify,
15
15
  index,
16
16
  batch = 128e3,
17
- limit = 16e6,
17
+ limit = 32e6,
18
18
  destroyers,
19
19
  logger,
20
20
  serviceName,
@@ -36,10 +36,8 @@ export function makeTrace({
36
36
 
37
37
  destroyers?.push(async () => {
38
38
  clearInterval(flushInterval)
39
+ await flushTraces()
39
40
  await client.close()
40
- while (traceData) {
41
- await flushTraces()
42
- }
43
41
  })
44
42
 
45
43
  let traceData = ''
@@ -158,6 +158,7 @@ export default function ({ ds, logger } = {}) {
158
158
  moment: (format, tz) => {
159
159
  // TODO (fix): Validate arguments...
160
160
  return (value) => {
161
+ value = moment(value)
161
162
  if (tz) {
162
163
  value = value.tz(tz)
163
164
  }