@speclynx/apidom-ns-openapi-3-0 4.10.1 → 4.11.1
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,14 @@
|
|
|
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.11.1](https://github.com/speclynx/apidom/compare/v4.11.0...v4.11.1) (2026-06-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @speclynx/apidom-ns-openapi-3-0
|
|
9
|
+
|
|
10
|
+
# [4.11.0](https://github.com/speclynx/apidom/compare/v4.10.1...v4.11.0) (2026-06-10)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @speclynx/apidom-ns-openapi-3-0
|
|
13
|
+
|
|
6
14
|
## [4.10.1](https://github.com/speclynx/apidom/compare/v4.10.0...v4.10.1) (2026-05-20)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @speclynx/apidom-ns-openapi-3-0
|
|
@@ -30422,6 +30422,14 @@ class Path {
|
|
|
30422
30422
|
*/
|
|
30423
30423
|
inList;
|
|
30424
30424
|
|
|
30425
|
+
/**
|
|
30426
|
+
* True when this node is a non-descending revisit of an already-visited node
|
|
30427
|
+
* (only under skipVisited: 'enter-only'). Children are not traversed.
|
|
30428
|
+
* Set on both the enter and the matching leave phase, so it is meaningful
|
|
30429
|
+
* in either phase.
|
|
30430
|
+
*/
|
|
30431
|
+
revisited = false;
|
|
30432
|
+
|
|
30425
30433
|
/**
|
|
30426
30434
|
* Internal state for traversal control.
|
|
30427
30435
|
*/
|
|
@@ -31006,6 +31014,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
31006
31014
|
|
|
31007
31015
|
|
|
31008
31016
|
|
|
31017
|
+
/**
|
|
31018
|
+
* Controls handling of already-visited nodes during traversal.
|
|
31019
|
+
* @public
|
|
31020
|
+
*/
|
|
31009
31021
|
/**
|
|
31010
31022
|
* Options for the traverse function.
|
|
31011
31023
|
* @public
|
|
@@ -31013,6 +31025,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
31013
31025
|
// =============================================================================
|
|
31014
31026
|
// Internal types for generator
|
|
31015
31027
|
// =============================================================================
|
|
31028
|
+
|
|
31029
|
+
const normalizeSkipVisited = v => {
|
|
31030
|
+
if (v === true) return 'skip';
|
|
31031
|
+
if (v === false || v === undefined) return 'never';
|
|
31032
|
+
return v;
|
|
31033
|
+
};
|
|
31016
31034
|
// =============================================================================
|
|
31017
31035
|
// Core generator
|
|
31018
31036
|
// =============================================================================
|
|
@@ -31030,7 +31048,7 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
31030
31048
|
mutationFn
|
|
31031
31049
|
} = options;
|
|
31032
31050
|
const keyMapIsFunction = typeof keyMap === 'function';
|
|
31033
|
-
const visitedNodes = skipVisited ? new WeakSet() : null;
|
|
31051
|
+
const visitedNodes = skipVisited !== 'never' ? new WeakSet() : null;
|
|
31034
31052
|
let stack;
|
|
31035
31053
|
let inArray = Array.isArray(root);
|
|
31036
31054
|
let keys = [root];
|
|
@@ -31045,6 +31063,7 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
31045
31063
|
index += 1;
|
|
31046
31064
|
const isLeaving = index === keys.length;
|
|
31047
31065
|
let key;
|
|
31066
|
+
let revisitNoDescend = false;
|
|
31048
31067
|
const isEdited = isLeaving && edits.length !== 0;
|
|
31049
31068
|
if (isLeaving) {
|
|
31050
31069
|
key = ancestors.length === 0 ? undefined : currentPath?.key;
|
|
@@ -31086,6 +31105,7 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
31086
31105
|
edits = stack.edits;
|
|
31087
31106
|
const parentInArray = stack.inArray;
|
|
31088
31107
|
parentPath = stack.parentPath;
|
|
31108
|
+
revisitNoDescend = stack.revisitNoDescend;
|
|
31089
31109
|
stack = stack.prev;
|
|
31090
31110
|
|
|
31091
31111
|
// Push the edited node to parent's edits for propagation up the tree
|
|
@@ -31117,15 +31137,22 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
31117
31137
|
}
|
|
31118
31138
|
|
|
31119
31139
|
// Skip already-visited nodes (handles DAG structures from cloneShallow)
|
|
31120
|
-
if (skipVisited && !isLeaving) {
|
|
31140
|
+
if (skipVisited !== 'never' && !isLeaving) {
|
|
31121
31141
|
if (visitedNodes.has(node)) {
|
|
31122
|
-
|
|
31142
|
+
if (skipVisited === 'enter-only') {
|
|
31143
|
+
// fire enter/leave for this occurrence, but don't re-descend
|
|
31144
|
+
revisitNoDescend = true;
|
|
31145
|
+
} else {
|
|
31146
|
+
continue;
|
|
31147
|
+
}
|
|
31148
|
+
} else {
|
|
31149
|
+
visitedNodes.add(node);
|
|
31123
31150
|
}
|
|
31124
|
-
visitedNodes.add(node);
|
|
31125
31151
|
}
|
|
31126
31152
|
|
|
31127
31153
|
// Always create Path for the current node (needed for parentPath chain)
|
|
31128
31154
|
currentPath = new _Path_mjs__WEBPACK_IMPORTED_MODULE_2__.Path(node, parent, parentPath, key, inArray);
|
|
31155
|
+
currentPath.revisited = revisitNoDescend;
|
|
31129
31156
|
const visitFn = (0,_visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.getVisitFn)(visitor, nodeTypeGetter(node), isLeaving);
|
|
31130
31157
|
if (visitFn) {
|
|
31131
31158
|
// Assign state to visitor
|
|
@@ -31189,10 +31216,13 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
31189
31216
|
keys,
|
|
31190
31217
|
edits,
|
|
31191
31218
|
parentPath,
|
|
31219
|
+
revisitNoDescend,
|
|
31192
31220
|
prev: stack
|
|
31193
31221
|
};
|
|
31194
31222
|
inArray = Array.isArray(node);
|
|
31195
|
-
if (
|
|
31223
|
+
if (revisitNoDescend) {
|
|
31224
|
+
keys = [];
|
|
31225
|
+
} else if (inArray) {
|
|
31196
31226
|
keys = node;
|
|
31197
31227
|
} else if (keyMapIsFunction) {
|
|
31198
31228
|
keys = keyMap(node);
|
|
@@ -31267,7 +31297,7 @@ const traverse = (root, visitor, options = {}) => {
|
|
|
31267
31297
|
nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
|
|
31268
31298
|
nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
|
|
31269
31299
|
detectCycles: options.detectCycles ?? true,
|
|
31270
|
-
skipVisited: options.skipVisited
|
|
31300
|
+
skipVisited: normalizeSkipVisited(options.skipVisited),
|
|
31271
31301
|
mutable: options.mutable ?? false,
|
|
31272
31302
|
mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
|
|
31273
31303
|
};
|
|
@@ -31299,7 +31329,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
|
|
|
31299
31329
|
nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
|
|
31300
31330
|
nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
|
|
31301
31331
|
detectCycles: options.detectCycles ?? true,
|
|
31302
|
-
skipVisited: options.skipVisited
|
|
31332
|
+
skipVisited: normalizeSkipVisited(options.skipVisited),
|
|
31303
31333
|
mutable: options.mutable ?? false,
|
|
31304
31334
|
mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
|
|
31305
31335
|
};
|
|
@@ -31767,7 +31797,9 @@ mergeVisitors[Symbol.for('nodejs.util.promisify.custom')] = mergeVisitorsAsync;
|
|
|
31767
31797
|
* @internal
|
|
31768
31798
|
*/
|
|
31769
31799
|
function createPathProxy(originalPath, currentNode) {
|
|
31770
|
-
|
|
31800
|
+
const proxy = new _Path_mjs__WEBPACK_IMPORTED_MODULE_4__.Path(currentNode, originalPath.parent, originalPath.parentPath, originalPath.key, originalPath.inList);
|
|
31801
|
+
proxy.revisited = originalPath.revisited;
|
|
31802
|
+
return proxy;
|
|
31771
31803
|
}
|
|
31772
31804
|
|
|
31773
31805
|
/***/ }
|