@noego/trust 0.5.1-dev.3 → 0.5.1-dev.4

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.
@@ -5371,6 +5371,7 @@ var DEFAULT_RULE_SETTINGS = Object.freeze({
5371
5371
  "dropped-result": "off",
5372
5372
  "trusted-state": "off",
5373
5373
  "redundant-guard": "off",
5374
+ "finally-return": "off",
5374
5375
  "result-lookalike": "strict",
5375
5376
  untrustedCallbacks: "inline"
5376
5377
  });
@@ -5397,6 +5398,7 @@ var RULE_VALUES = {
5397
5398
  "dropped-result": ["on", "off"],
5398
5399
  "trusted-state": ["on", "off"],
5399
5400
  "redundant-guard": ["on", "off"],
5401
+ "finally-return": ["on", "off"],
5400
5402
  "result-lookalike": ["off", "strict", "on"],
5401
5403
  untrustedCallbacks: ["off", "inline", "all"]
5402
5404
  };
@@ -5842,6 +5844,11 @@ var REDUNDANT_GUARD_ORIGIN = "redundant";
5842
5844
  var REDUNDANT_GUARD_MESSAGES = {
5843
5845
  redundant: '`{{guard}}` guards nothing that can fail: {{calls}}. It invents a failure path callers must unwrap for nothing. Call it directly and return its value; a trusted origin\'s failure is a programmer error, not a failure path. If the call can fail, remove its origin from "trust" in trust.config.json instead.'
5844
5846
  };
5847
+ var FINALLY_RETURN_RULE = "finally-return";
5848
+ var FINALLY_RETURN_ORIGIN = "return";
5849
+ var FINALLY_RETURN_MESSAGES = {
5850
+ return: "`return` inside `finally` overwrites any Result (Err or StatedOk) or throw leaving `try` / `catch`. Do not return from `finally`; use `Trust.using(acquire, use, release)` when cleanup returns a Result."
5851
+ };
5845
5852
  var BOUNDARY_RULE = "boundary-result";
5846
5853
  var BOUNDARY_MESSAGES = {
5847
5854
  "returns-ok-result": 'Boundary "{{member}}" returns a Result object: a Result must not cross the edge, even one that cannot fail. Return plain data (read the value, and give several outcomes their own discriminant), or leave it out by adding "{{member}}" to "exclude" of {{item}}.',
@@ -7065,6 +7072,9 @@ export {
7065
7072
  REDUNDANT_GUARD_RULE,
7066
7073
  REDUNDANT_GUARD_ORIGIN,
7067
7074
  REDUNDANT_GUARD_MESSAGES,
7075
+ FINALLY_RETURN_RULE,
7076
+ FINALLY_RETURN_ORIGIN,
7077
+ FINALLY_RETURN_MESSAGES,
7068
7078
  BOUNDARY_RULE,
7069
7079
  BOUNDARY_MESSAGES,
7070
7080
  formatFailureKinds,
@@ -7104,4 +7114,4 @@ export {
7104
7114
  readBaseline,
7105
7115
  describeBaselineDelta
7106
7116
  };
7107
- //# sourceMappingURL=chunk-VJGGEY4G.js.map
7117
+ //# sourceMappingURL=chunk-4XGOH7JE.js.map