@speclynx/apidom-ns-openapi-3-1 4.10.0 → 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,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.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-1
|
|
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-1
|
|
13
|
+
|
|
14
|
+
## [4.10.1](https://github.com/speclynx/apidom/compare/v4.10.0...v4.10.1) (2026-05-20)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @speclynx/apidom-ns-openapi-3-1
|
|
17
|
+
|
|
6
18
|
# [4.10.0](https://github.com/speclynx/apidom/compare/v4.9.1...v4.10.0) (2026-05-12)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @speclynx/apidom-ns-openapi-3-1
|
|
@@ -36455,6 +36455,14 @@ class Path {
|
|
|
36455
36455
|
*/
|
|
36456
36456
|
inList;
|
|
36457
36457
|
|
|
36458
|
+
/**
|
|
36459
|
+
* True when this node is a non-descending revisit of an already-visited node
|
|
36460
|
+
* (only under skipVisited: 'enter-only'). Children are not traversed.
|
|
36461
|
+
* Set on both the enter and the matching leave phase, so it is meaningful
|
|
36462
|
+
* in either phase.
|
|
36463
|
+
*/
|
|
36464
|
+
revisited = false;
|
|
36465
|
+
|
|
36458
36466
|
/**
|
|
36459
36467
|
* Internal state for traversal control.
|
|
36460
36468
|
*/
|
|
@@ -37039,6 +37047,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
37039
37047
|
|
|
37040
37048
|
|
|
37041
37049
|
|
|
37050
|
+
/**
|
|
37051
|
+
* Controls handling of already-visited nodes during traversal.
|
|
37052
|
+
* @public
|
|
37053
|
+
*/
|
|
37042
37054
|
/**
|
|
37043
37055
|
* Options for the traverse function.
|
|
37044
37056
|
* @public
|
|
@@ -37046,6 +37058,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
37046
37058
|
// =============================================================================
|
|
37047
37059
|
// Internal types for generator
|
|
37048
37060
|
// =============================================================================
|
|
37061
|
+
|
|
37062
|
+
const normalizeSkipVisited = v => {
|
|
37063
|
+
if (v === true) return 'skip';
|
|
37064
|
+
if (v === false || v === undefined) return 'never';
|
|
37065
|
+
return v;
|
|
37066
|
+
};
|
|
37049
37067
|
// =============================================================================
|
|
37050
37068
|
// Core generator
|
|
37051
37069
|
// =============================================================================
|
|
@@ -37063,7 +37081,7 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
37063
37081
|
mutationFn
|
|
37064
37082
|
} = options;
|
|
37065
37083
|
const keyMapIsFunction = typeof keyMap === 'function';
|
|
37066
|
-
const visitedNodes = skipVisited ? new WeakSet() : null;
|
|
37084
|
+
const visitedNodes = skipVisited !== 'never' ? new WeakSet() : null;
|
|
37067
37085
|
let stack;
|
|
37068
37086
|
let inArray = Array.isArray(root);
|
|
37069
37087
|
let keys = [root];
|
|
@@ -37078,6 +37096,7 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
37078
37096
|
index += 1;
|
|
37079
37097
|
const isLeaving = index === keys.length;
|
|
37080
37098
|
let key;
|
|
37099
|
+
let revisitNoDescend = false;
|
|
37081
37100
|
const isEdited = isLeaving && edits.length !== 0;
|
|
37082
37101
|
if (isLeaving) {
|
|
37083
37102
|
key = ancestors.length === 0 ? undefined : currentPath?.key;
|
|
@@ -37119,6 +37138,7 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
37119
37138
|
edits = stack.edits;
|
|
37120
37139
|
const parentInArray = stack.inArray;
|
|
37121
37140
|
parentPath = stack.parentPath;
|
|
37141
|
+
revisitNoDescend = stack.revisitNoDescend;
|
|
37122
37142
|
stack = stack.prev;
|
|
37123
37143
|
|
|
37124
37144
|
// Push the edited node to parent's edits for propagation up the tree
|
|
@@ -37150,15 +37170,22 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
37150
37170
|
}
|
|
37151
37171
|
|
|
37152
37172
|
// Skip already-visited nodes (handles DAG structures from cloneShallow)
|
|
37153
|
-
if (skipVisited && !isLeaving) {
|
|
37173
|
+
if (skipVisited !== 'never' && !isLeaving) {
|
|
37154
37174
|
if (visitedNodes.has(node)) {
|
|
37155
|
-
|
|
37175
|
+
if (skipVisited === 'enter-only') {
|
|
37176
|
+
// fire enter/leave for this occurrence, but don't re-descend
|
|
37177
|
+
revisitNoDescend = true;
|
|
37178
|
+
} else {
|
|
37179
|
+
continue;
|
|
37180
|
+
}
|
|
37181
|
+
} else {
|
|
37182
|
+
visitedNodes.add(node);
|
|
37156
37183
|
}
|
|
37157
|
-
visitedNodes.add(node);
|
|
37158
37184
|
}
|
|
37159
37185
|
|
|
37160
37186
|
// Always create Path for the current node (needed for parentPath chain)
|
|
37161
37187
|
currentPath = new _Path_mjs__WEBPACK_IMPORTED_MODULE_2__.Path(node, parent, parentPath, key, inArray);
|
|
37188
|
+
currentPath.revisited = revisitNoDescend;
|
|
37162
37189
|
const visitFn = (0,_visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.getVisitFn)(visitor, nodeTypeGetter(node), isLeaving);
|
|
37163
37190
|
if (visitFn) {
|
|
37164
37191
|
// Assign state to visitor
|
|
@@ -37222,10 +37249,13 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
37222
37249
|
keys,
|
|
37223
37250
|
edits,
|
|
37224
37251
|
parentPath,
|
|
37252
|
+
revisitNoDescend,
|
|
37225
37253
|
prev: stack
|
|
37226
37254
|
};
|
|
37227
37255
|
inArray = Array.isArray(node);
|
|
37228
|
-
if (
|
|
37256
|
+
if (revisitNoDescend) {
|
|
37257
|
+
keys = [];
|
|
37258
|
+
} else if (inArray) {
|
|
37229
37259
|
keys = node;
|
|
37230
37260
|
} else if (keyMapIsFunction) {
|
|
37231
37261
|
keys = keyMap(node);
|
|
@@ -37300,7 +37330,7 @@ const traverse = (root, visitor, options = {}) => {
|
|
|
37300
37330
|
nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
|
|
37301
37331
|
nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
|
|
37302
37332
|
detectCycles: options.detectCycles ?? true,
|
|
37303
|
-
skipVisited: options.skipVisited
|
|
37333
|
+
skipVisited: normalizeSkipVisited(options.skipVisited),
|
|
37304
37334
|
mutable: options.mutable ?? false,
|
|
37305
37335
|
mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
|
|
37306
37336
|
};
|
|
@@ -37332,7 +37362,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
|
|
|
37332
37362
|
nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
|
|
37333
37363
|
nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
|
|
37334
37364
|
detectCycles: options.detectCycles ?? true,
|
|
37335
|
-
skipVisited: options.skipVisited
|
|
37365
|
+
skipVisited: normalizeSkipVisited(options.skipVisited),
|
|
37336
37366
|
mutable: options.mutable ?? false,
|
|
37337
37367
|
mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
|
|
37338
37368
|
};
|
|
@@ -37800,7 +37830,9 @@ mergeVisitors[Symbol.for('nodejs.util.promisify.custom')] = mergeVisitorsAsync;
|
|
|
37800
37830
|
* @internal
|
|
37801
37831
|
*/
|
|
37802
37832
|
function createPathProxy(originalPath, currentNode) {
|
|
37803
|
-
|
|
37833
|
+
const proxy = new _Path_mjs__WEBPACK_IMPORTED_MODULE_4__.Path(currentNode, originalPath.parent, originalPath.parentPath, originalPath.key, originalPath.inList);
|
|
37834
|
+
proxy.revisited = originalPath.revisited;
|
|
37835
|
+
return proxy;
|
|
37804
37836
|
}
|
|
37805
37837
|
|
|
37806
37838
|
/***/ }
|