@augment-vir/core 31.26.0 → 31.28.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.
@@ -11,8 +11,11 @@ import { DeferredPromise } from './deferred-promise.js';
11
11
  */
12
12
  export function wait(duration) {
13
13
  const deferredPromise = new DeferredPromise();
14
- const milliseconds = convertDuration(duration, { milliseconds: true }).milliseconds;
15
- if (milliseconds !== Infinity) {
14
+ const isInfinity = Object.values(duration).some((value) => value === Infinity || value === -Infinity);
15
+ const milliseconds = isInfinity
16
+ ? Infinity
17
+ : convertDuration(duration, { milliseconds: true }).milliseconds;
18
+ if (milliseconds !== Infinity && milliseconds !== -Infinity) {
16
19
  setTimeout(() => {
17
20
  deferredPromise.resolve();
18
21
  }, milliseconds <= 0 ? 0 : milliseconds);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/core",
3
- "version": "31.26.0",
3
+ "version": "31.28.0",
4
4
  "description": "Core augment-vir augments. Use @augment-vir/common instead.",
5
5
  "homepage": "https://github.com/electrovir/augment-vir",
6
6
  "bugs": {
@@ -28,13 +28,13 @@
28
28
  "test:update": "npm test"
29
29
  },
30
30
  "dependencies": {
31
- "@date-vir/duration": "^7.3.1",
31
+ "@date-vir/duration": "^7.3.2",
32
32
  "browser-or-node": "^3.0.0",
33
33
  "json5": "^2.2.3",
34
34
  "type-fest": "^4.41.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@types/node": "^24.0.3",
37
+ "@types/node": "^24.1.0",
38
38
  "c8": "^10.1.3",
39
39
  "istanbul-smart-text-reporter": "^1.1.5",
40
40
  "typescript": "^5.8.3"