@poe-platform/safe-js 0.1.212 → 0.1.213

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.
@@ -27,7 +27,7 @@ import {
27
27
  validateMigrationSemantics,
28
28
  validateSnapshotData,
29
29
  validateSnapshotMigration
30
- } from "./chunk-T34A2ZQF.js";
30
+ } from "./chunk-X6T66CDS.js";
31
31
 
32
32
  // packages/safe-js/src/migrate.ts
33
33
  import { createHash } from "node:crypto";
@@ -8249,4 +8249,4 @@ export {
8249
8249
  parseMcpConfig,
8250
8250
  makeMcpModule
8251
8251
  };
8252
- //# sourceMappingURL=chunk-FOLK4TOQ.js.map
8252
+ //# sourceMappingURL=chunk-LQN7F4MV.js.map
@@ -33421,6 +33421,7 @@ var ASUnreachableScanner = class {
33421
33421
  }
33422
33422
  filename;
33423
33423
  diagnostics = [];
33424
+ breakTargets = /* @__PURE__ */ new Map();
33424
33425
  scan(source) {
33425
33426
  this.visitModule(parseModule(source, this.filename));
33426
33427
  return this.diagnostics;
@@ -33486,6 +33487,11 @@ var ASUnreachableScanner = class {
33486
33487
  this.visitThrowStatement(node);
33487
33488
  return true;
33488
33489
  case "BreakStatement":
33490
+ if (node.label !== void 0) {
33491
+ const target = this.breakTargets.get(node.label);
33492
+ if (target !== void 0) target.reached = true;
33493
+ }
33494
+ return true;
33489
33495
  case "ContinueStatement":
33490
33496
  return true;
33491
33497
  case "ExportNamedDeclaration":
@@ -33501,7 +33507,11 @@ var ASUnreachableScanner = class {
33501
33507
  }
33502
33508
  }
33503
33509
  visitBlock(node) {
33504
- return this.visitStatements(node.body);
33510
+ const target = { reached: false };
33511
+ for (const label of node.labels ?? []) this.breakTargets.set(label, target);
33512
+ const terminated = this.visitStatements(node.body);
33513
+ for (const label of node.labels ?? []) this.breakTargets.delete(label);
33514
+ return terminated && !target.reached;
33505
33515
  }
33506
33516
  visitIfStatement(node) {
33507
33517
  this.visitExpression(node.test);
@@ -33634,11 +33644,17 @@ var ASUnreachableScanner = class {
33634
33644
  }
33635
33645
  }
33636
33646
  visitArrowFunction(node) {
33637
- if (node.body.type === "BlockStatement") {
33638
- this.visitBlock(node.body);
33639
- return;
33647
+ const outerTargets = this.breakTargets;
33648
+ this.breakTargets = /* @__PURE__ */ new Map();
33649
+ try {
33650
+ if (node.body.type === "BlockStatement") {
33651
+ this.visitBlock(node.body);
33652
+ return;
33653
+ }
33654
+ this.visitExpression(node.body);
33655
+ } finally {
33656
+ this.breakTargets = outerTargets;
33640
33657
  }
33641
- this.visitExpression(node.body);
33642
33658
  }
33643
33659
  visitArrayExpression(node) {
33644
33660
  for (const element of node.elements) {
@@ -37946,4 +37962,4 @@ export {
37946
37962
  FileSnapshotBackend,
37947
37963
  run
37948
37964
  };
37949
- //# sourceMappingURL=chunk-T34A2ZQF.js.map
37965
+ //# sourceMappingURL=chunk-X6T66CDS.js.map