@lwrjs/shared-utils 0.10.0-alpha.18 → 0.10.0-alpha.19

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.
@@ -67,13 +67,13 @@ function replaceStringFromLocation(src, {startOffset, endOffset}, replaceValue)
67
67
  return src.substr(0, startOffset) + replaceValue + src.substr(endOffset, src.length);
68
68
  }
69
69
  function shortestTtl(newTtl, oldTtl) {
70
- if (!newTtl && !oldTtl)
70
+ if (newTtl === void 0 && oldTtl === void 0)
71
71
  return void 0;
72
72
  const newSeconds = typeof newTtl === "string" ? (0, import_ms.default)(newTtl) / 1e3 : newTtl;
73
73
  const oldSeconds = typeof oldTtl === "string" ? (0, import_ms.default)(oldTtl) / 1e3 : oldTtl;
74
- if (!newSeconds)
74
+ if (newSeconds === void 0)
75
75
  return oldSeconds;
76
- if (!oldSeconds)
76
+ if (oldSeconds === void 0)
77
77
  return newSeconds;
78
78
  return newSeconds < oldSeconds ? newSeconds : oldSeconds;
79
79
  }
@@ -50,13 +50,13 @@ export function replaceStringFromLocation(src, { startOffset, endOffset }, repla
50
50
  * @returns - the shorter of the two TTLs IN SECONDS, undefined if both TTLs are missing
51
51
  */
52
52
  export function shortestTtl(newTtl, oldTtl) {
53
- if (!newTtl && !oldTtl)
53
+ if (newTtl === undefined && oldTtl === undefined)
54
54
  return undefined;
55
55
  const newSeconds = typeof newTtl === 'string' ? ms(newTtl) / 1000 : newTtl;
56
56
  const oldSeconds = typeof oldTtl === 'string' ? ms(oldTtl) / 1000 : oldTtl;
57
- if (!newSeconds)
57
+ if (newSeconds === undefined)
58
58
  return oldSeconds;
59
- if (!oldSeconds)
59
+ if (oldSeconds === undefined)
60
60
  return newSeconds;
61
61
  return newSeconds < oldSeconds ? newSeconds : oldSeconds;
62
62
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.10.0-alpha.18",
7
+ "version": "0.10.0-alpha.19",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -62,13 +62,13 @@
62
62
  "rollup": "^2.78.0"
63
63
  },
64
64
  "devDependencies": {
65
- "@lwrjs/diagnostics": "0.10.0-alpha.18",
66
- "@lwrjs/types": "0.10.0-alpha.18",
65
+ "@lwrjs/diagnostics": "0.10.0-alpha.19",
66
+ "@lwrjs/types": "0.10.0-alpha.19",
67
67
  "@types/mime-types": "2.1.1",
68
68
  "@types/path-to-regexp": "^1.7.0"
69
69
  },
70
70
  "engines": {
71
- "node": ">=16.0.0 <20"
71
+ "node": ">=16.0.0"
72
72
  },
73
- "gitHead": "15d09e9a17b6b070e162336234434d6800b2f32d"
73
+ "gitHead": "0bd55139c08ddf5a532978cfa9e037eaf27e78e2"
74
74
  }