resultar 3.5.0 → 3.5.2

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/index.js CHANGED
@@ -302,6 +302,7 @@ var ResultNamespace = class {
302
302
  return forEachResult(items, f, options);
303
303
  }
304
304
  };
305
+ /** Static helpers for creating, combining, and iterating over Result values. */
305
306
  const Result = ResultNamespace;
306
307
  var ResultVariant = class extends Pipeable {
307
308
  filterOrElse(predicate, onFalse) {
@@ -992,11 +993,7 @@ const runConcurrentResultAsyncItems = (options) => Promise.try(async () => {
992
993
  };
993
994
  const schedule = () => {
994
995
  if (settled) return;
995
- if (state.stopScheduling) {
996
- finishIfDone();
997
- return;
998
- }
999
- while (!state.iteratorDone && state.activeCount < concurrency) {
996
+ while (!state.stopScheduling && !state.iteratorDone && state.activeCount < concurrency) {
1000
997
  const next = readNext();
1001
998
  if (next === void 0) return;
1002
999
  if (next.done === true) {
@@ -1019,7 +1016,6 @@ const runConcurrentResultAsyncItems = (options) => Promise.try(async () => {
1019
1016
  if (settled) return;
1020
1017
  state.activeCount -= 1;
1021
1018
  schedule();
1022
- finishIfDone();
1023
1019
  });
1024
1020
  } catch (error) {
1025
1021
  rejectOnce(error);
@@ -1436,6 +1432,7 @@ const callAsyncSideEffect = async (effect) => {
1436
1432
  await effect();
1437
1433
  } catch {}
1438
1434
  };
1435
+ /** Async-disposable wrapper that finalizes a `ResultAsync` exactly once. */
1439
1436
  var DisposableResultAsync = class {
1440
1437
  innerPromise;
1441
1438
  finalizer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resultar",
3
- "version": "3.5.0",
3
+ "version": "3.5.2",
4
4
  "description": "Result pattern for TypeScript",
5
5
  "keywords": [
6
6
  "error-handling",
@@ -41,16 +41,16 @@
41
41
  }
42
42
  },
43
43
  "devDependencies": {
44
- "@stryker-mutator/core": "9.6.1",
45
- "@stryker-mutator/vitest-runner": "9.6.1",
46
- "@types/node": "26.1.0",
47
- "@vitest/coverage-v8": "4.1.9",
48
- "@vitest/ui": "4.1.9",
49
- "fallow": "3.3.0",
50
- "tsx": "4.22.5",
44
+ "@stryker-mutator/core": "10.0.0",
45
+ "@stryker-mutator/vitest-runner": "10.0.0",
46
+ "@types/node": "26.2.0",
47
+ "@vitest/coverage-v8": "4.1.10",
48
+ "@vitest/ui": "4.1.10",
49
+ "fallow": "3.17.0",
50
+ "tsx": "4.23.12",
51
51
  "typescript": "7.0.2",
52
- "vite-plus": "0.2.3",
53
- "vitest": "4.1.9"
52
+ "vite-plus": "0.2.9",
53
+ "vitest": "4.1.10"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "typescript": ">=7.0.0"