@contrail/util 1.1.15-alpha-8 → 1.1.15-alpha-9

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.
@@ -17,7 +17,7 @@ exports.withTimingSync = withTimingSync;
17
17
  exports.displayTimingTree = displayTimingTree;
18
18
  exports.startSpan = startSpan;
19
19
  exports.endSpan = endSpan;
20
- const crypto_1 = require("crypto");
20
+ const nanoid_1 = require("nanoid");
21
21
  const DEFAULT_TIMING_PROFILE = {
22
22
  activeSpans: new Map(),
23
23
  spansById: new Map(),
@@ -57,7 +57,7 @@ function withTimingAsync(label, fn, options) {
57
57
  return __awaiter(this, void 0, void 0, function* () {
58
58
  const start = performance.now();
59
59
  const chosenId = options === null || options === void 0 ? void 0 : options.parentNodeId;
60
- const uniqueId = (0, crypto_1.randomUUID)();
60
+ const uniqueId = (0, nanoid_1.nanoid)();
61
61
  const timingNode = {
62
62
  label,
63
63
  durationMs: 0,
@@ -89,7 +89,7 @@ function withTimingAsync(label, fn, options) {
89
89
  function withTimingSync(label, fn, options) {
90
90
  const start = performance.now();
91
91
  const chosenId = options === null || options === void 0 ? void 0 : options.parentNodeId;
92
- const uniqueId = (0, crypto_1.randomUUID)();
92
+ const uniqueId = (0, nanoid_1.nanoid)();
93
93
  const timingNode = {
94
94
  label,
95
95
  durationMs: 0,
@@ -194,7 +194,7 @@ function startSpan(spanName, options) {
194
194
  }
195
195
  const startTime = performance.now();
196
196
  const chosenId = options === null || options === void 0 ? void 0 : options.parentNodeId;
197
- const uniqueId = (0, crypto_1.randomUUID)();
197
+ const uniqueId = (0, nanoid_1.nanoid)();
198
198
  const timingNode = {
199
199
  label: spanName,
200
200
  durationMs: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/util",
3
- "version": "1.1.15-alpha-8",
3
+ "version": "1.1.15-alpha-9",
4
4
  "description": "General JavaScript utilities",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -41,6 +41,7 @@
41
41
  "dependencies": {
42
42
  "@contrail/types": "^3.0.95",
43
43
  "fflate": "^0.8.2",
44
- "lodash": "^4.17.21"
44
+ "lodash": "^4.17.21",
45
+ "nanoid": "^5.1.5"
45
46
  }
46
47
  }