@speclynx/apidom-traverse 4.0.3 → 4.0.5

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/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.0.5](https://github.com/speclynx/apidom/compare/v4.0.4...v4.0.5) (2026-03-13)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **traverse:** path.stop() in merged visitor no longer skips subsequent visitors for current node ([#163](https://github.com/speclynx/apidom/issues/163)) ([51a80af](https://github.com/speclynx/apidom/commit/51a80af99ee786e23829f30f1d5ff393a08a5da1))
11
+
12
+ ## [4.0.4](https://github.com/speclynx/apidom/compare/v4.0.3...v4.0.4) (2026-03-12)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **release:** override minimatch 10.2.3 to fix glob pattern regression in lerna publish ([#157](https://github.com/speclynx/apidom/issues/157)) ([c2d65a0](https://github.com/speclynx/apidom/commit/c2d65a06a2187e8563a9dc9db74ba27255450e0b)), closes [lerna/lerna#4305](https://github.com/lerna/lerna/issues/4305) [isaacs/minimatch#284](https://github.com/isaacs/minimatch/issues/284)
17
+
6
18
  ## [4.0.3](https://github.com/speclynx/apidom/compare/v4.0.2...v4.0.3) (2026-03-11)
7
19
 
8
20
  ### Bug Fixes
@@ -1147,9 +1147,9 @@ const mergeVisitors = (visitors, options = {}) => {
1147
1147
  }
1148
1148
 
1149
1149
  // Handle path-based control flow
1150
+ // Note: no break here — other merged visitors must still process this node
1150
1151
  if (proxyPath.shouldStop) {
1151
1152
  skipping[i] = breakSymbol;
1152
- break;
1153
1153
  }
1154
1154
  if (proxyPath.shouldSkip) {
1155
1155
  skipping[i] = currentNode;
@@ -1180,6 +1180,11 @@ const mergeVisitors = (visitors, options = {}) => {
1180
1180
  }
1181
1181
  }
1182
1182
  }
1183
+
1184
+ // stop traversal only when all visitors have stopped
1185
+ if (skipping.every(s => s === breakSymbol)) {
1186
+ path.stop();
1187
+ }
1183
1188
  if (hasChanged) {
1184
1189
  path.replaceWith(currentNode);
1185
1190
  return currentNode;
@@ -1205,9 +1210,9 @@ const mergeVisitors = (visitors, options = {}) => {
1205
1210
  }
1206
1211
 
1207
1212
  // Handle path-based control flow
1213
+ // Note: no break here — other merged visitors must still process this node
1208
1214
  if (proxyPath.shouldStop) {
1209
1215
  skipping[i] = breakSymbol;
1210
- break;
1211
1216
  }
1212
1217
  if (proxyPath.removed) {
1213
1218
  path.remove();
@@ -1227,6 +1232,11 @@ const mergeVisitors = (visitors, options = {}) => {
1227
1232
  skipping[i] = internalSkipSymbol;
1228
1233
  }
1229
1234
  }
1235
+
1236
+ // stop traversal only when all visitors have stopped
1237
+ if (skipping.every(s => s === breakSymbol)) {
1238
+ path.stop();
1239
+ }
1230
1240
  return undefined;
1231
1241
  }
1232
1242
  };
@@ -1255,9 +1265,11 @@ const mergeVisitorsAsync = (visitors, options = {}) => {
1255
1265
  if (typeof visitFn === 'function') {
1256
1266
  const proxyPath = createPathProxy(path, currentNode);
1257
1267
  const result = await visitFn.call(visitors[i], proxyPath);
1268
+
1269
+ // Handle path-based control flow
1270
+ // Note: no break here — other merged visitors must still process this node
1258
1271
  if (proxyPath.shouldStop) {
1259
1272
  skipping[i] = breakSymbol;
1260
- break;
1261
1273
  }
1262
1274
  if (proxyPath.shouldSkip) {
1263
1275
  skipping[i] = currentNode;
@@ -1287,6 +1299,11 @@ const mergeVisitorsAsync = (visitors, options = {}) => {
1287
1299
  }
1288
1300
  }
1289
1301
  }
1302
+
1303
+ // stop traversal only when all visitors have stopped
1304
+ if (skipping.every(s => s === breakSymbol)) {
1305
+ path.stop();
1306
+ }
1290
1307
  if (hasChanged) {
1291
1308
  path.replaceWith(currentNode);
1292
1309
  return currentNode;
@@ -1301,9 +1318,11 @@ const mergeVisitorsAsync = (visitors, options = {}) => {
1301
1318
  if (typeof visitFn === 'function') {
1302
1319
  const proxyPath = createPathProxy(path, currentNode);
1303
1320
  const result = await visitFn.call(visitors[i], proxyPath);
1321
+
1322
+ // Handle path-based control flow
1323
+ // Note: no break here — other merged visitors must still process this node
1304
1324
  if (proxyPath.shouldStop) {
1305
1325
  skipping[i] = breakSymbol;
1306
- break;
1307
1326
  }
1308
1327
  if (proxyPath.removed) {
1309
1328
  path.remove();
@@ -1322,6 +1341,11 @@ const mergeVisitorsAsync = (visitors, options = {}) => {
1322
1341
  skipping[i] = internalSkipSymbol;
1323
1342
  }
1324
1343
  }
1344
+
1345
+ // stop traversal only when all visitors have stopped
1346
+ if (skipping.every(s => s === breakSymbol)) {
1347
+ path.stop();
1348
+ }
1325
1349
  return undefined;
1326
1350
  }
1327
1351
  };