@swagger-api/apidom-ns-api-design-systems 1.0.0-alpha.1 → 1.0.0-alpha.10

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,44 @@
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
+ # [1.0.0-alpha.10](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2024-10-21)
7
+
8
+ **Note:** Version bump only for package @swagger-api/apidom-ns-api-design-systems
9
+
10
+ # [1.0.0-alpha.9](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2024-08-14)
11
+
12
+ **Note:** Version bump only for package @swagger-api/apidom-ns-api-design-systems
13
+
14
+ # [1.0.0-alpha.8](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2024-08-08)
15
+
16
+ **Note:** Version bump only for package @swagger-api/apidom-ns-api-design-systems
17
+
18
+ # [1.0.0-alpha.7](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2024-08-05)
19
+
20
+ **Note:** Version bump only for package @swagger-api/apidom-ns-api-design-systems
21
+
22
+ # [1.0.0-alpha.6](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2024-07-09)
23
+
24
+ **Note:** Version bump only for package @swagger-api/apidom-ns-api-design-systems
25
+
26
+ # [1.0.0-alpha.5](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2024-05-29)
27
+
28
+ **Note:** Version bump only for package @swagger-api/apidom-ns-api-design-systems
29
+
30
+ # [1.0.0-alpha.4](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2024-05-29)
31
+
32
+ **Note:** Version bump only for package @swagger-api/apidom-ns-api-design-systems
33
+
34
+ # [1.0.0-alpha.3](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2024-05-21)
35
+
36
+ **Note:** Version bump only for package @swagger-api/apidom-ns-api-design-systems
37
+
38
+ # [1.0.0-alpha.2](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2024-05-20)
39
+
40
+ ### Features
41
+
42
+ - **ast:** add support for mutable node replacements ([#4121](https://github.com/swagger-api/apidom/issues/4121)) ([b37ecd2](https://github.com/swagger-api/apidom/commit/b37ecd2dba83aaa3813bb539ae64e98b290f0292)), closes [#4120](https://github.com/swagger-api/apidom/issues/4120)
43
+
6
44
  # [1.0.0-alpha.1](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.0...v1.0.0-alpha.1) (2024-05-15)
7
45
 
8
46
  **Note:** Version bump only for package @swagger-api/apidom-ns-api-design-systems
@@ -6956,6 +6956,7 @@ var createMethod = function (IS_INCLUDES) {
6956
6956
  return function ($this, el, fromIndex) {
6957
6957
  var O = toIndexedObject($this);
6958
6958
  var length = lengthOfArrayLike(O);
6959
+ if (length === 0) return !IS_INCLUDES && -1;
6959
6960
  var index = toAbsoluteIndex(fromIndex, length);
6960
6961
  var value;
6961
6962
  // Array#includes uses SameValueZero equality algorithm
@@ -7151,16 +7152,16 @@ module.exports = function (target, key, value, options) {
7151
7152
 
7152
7153
  "use strict";
7153
7154
 
7154
- var global = __webpack_require__(1063);
7155
+ var globalThis = __webpack_require__(8900);
7155
7156
 
7156
7157
  // eslint-disable-next-line es/no-object-defineproperty -- safe
7157
7158
  var defineProperty = Object.defineProperty;
7158
7159
 
7159
7160
  module.exports = function (key, value) {
7160
7161
  try {
7161
- defineProperty(global, key, { value: value, configurable: true, writable: true });
7162
+ defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
7162
7163
  } catch (error) {
7163
- global[key] = value;
7164
+ globalThis[key] = value;
7164
7165
  } return value;
7165
7166
  };
7166
7167
 
@@ -7188,10 +7189,10 @@ module.exports = !fails(function () {
7188
7189
 
7189
7190
  "use strict";
7190
7191
 
7191
- var global = __webpack_require__(1063);
7192
+ var globalThis = __webpack_require__(8900);
7192
7193
  var isObject = __webpack_require__(262);
7193
7194
 
7194
- var document = global.document;
7195
+ var document = globalThis.document;
7195
7196
  // typeof document.createElement is 'object' in old IE
7196
7197
  var EXISTS = isObject(document) && isObject(document.createElement);
7197
7198
 
@@ -7246,26 +7247,50 @@ module.exports = {
7246
7247
 
7247
7248
  /***/ }),
7248
7249
 
7249
- /***/ 7868:
7250
+ /***/ 9683:
7250
7251
  /***/ ((module) => {
7251
7252
 
7252
7253
  "use strict";
7253
7254
 
7254
- module.exports = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
7255
+ // IE8- don't enum bug keys
7256
+ module.exports = [
7257
+ 'constructor',
7258
+ 'hasOwnProperty',
7259
+ 'isPrototypeOf',
7260
+ 'propertyIsEnumerable',
7261
+ 'toLocaleString',
7262
+ 'toString',
7263
+ 'valueOf'
7264
+ ];
7265
+
7266
+
7267
+ /***/ }),
7268
+
7269
+ /***/ 3531:
7270
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7271
+
7272
+ "use strict";
7273
+
7274
+ var globalThis = __webpack_require__(8900);
7275
+
7276
+ var navigator = globalThis.navigator;
7277
+ var userAgent = navigator && navigator.userAgent;
7278
+
7279
+ module.exports = userAgent ? String(userAgent) : '';
7255
7280
 
7256
7281
 
7257
7282
  /***/ }),
7258
7283
 
7259
- /***/ 4432:
7284
+ /***/ 5547:
7260
7285
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7261
7286
 
7262
7287
  "use strict";
7263
7288
 
7264
- var global = __webpack_require__(1063);
7265
- var userAgent = __webpack_require__(7868);
7289
+ var globalThis = __webpack_require__(8900);
7290
+ var userAgent = __webpack_require__(3531);
7266
7291
 
7267
- var process = global.process;
7268
- var Deno = global.Deno;
7292
+ var process = globalThis.process;
7293
+ var Deno = globalThis.Deno;
7269
7294
  var versions = process && process.versions || Deno && Deno.version;
7270
7295
  var v8 = versions && versions.v8;
7271
7296
  var match, version;
@@ -7290,25 +7315,6 @@ if (!version && userAgent) {
7290
7315
  module.exports = version;
7291
7316
 
7292
7317
 
7293
- /***/ }),
7294
-
7295
- /***/ 9683:
7296
- /***/ ((module) => {
7297
-
7298
- "use strict";
7299
-
7300
- // IE8- don't enum bug keys
7301
- module.exports = [
7302
- 'constructor',
7303
- 'hasOwnProperty',
7304
- 'isPrototypeOf',
7305
- 'propertyIsEnumerable',
7306
- 'toLocaleString',
7307
- 'toString',
7308
- 'valueOf'
7309
- ];
7310
-
7311
-
7312
7318
  /***/ }),
7313
7319
 
7314
7320
  /***/ 3885:
@@ -7381,7 +7387,7 @@ module.exports = !fails(function () {
7381
7387
 
7382
7388
  "use strict";
7383
7389
 
7384
- var global = __webpack_require__(1063);
7390
+ var globalThis = __webpack_require__(8900);
7385
7391
  var apply = __webpack_require__(7013);
7386
7392
  var uncurryThis = __webpack_require__(9344);
7387
7393
  var isCallable = __webpack_require__(2769);
@@ -7391,6 +7397,8 @@ var path = __webpack_require__(8099);
7391
7397
  var bind = __webpack_require__(4572);
7392
7398
  var createNonEnumerableProperty = __webpack_require__(3999);
7393
7399
  var hasOwn = __webpack_require__(701);
7400
+ // add debugging info
7401
+ __webpack_require__(3753);
7394
7402
 
7395
7403
  var wrapConstructor = function (NativeConstructor) {
7396
7404
  var Wrapper = function (a, b, c) {
@@ -7427,7 +7435,7 @@ module.exports = function (options, source) {
7427
7435
  var STATIC = options.stat;
7428
7436
  var PROTO = options.proto;
7429
7437
 
7430
- var nativeSource = GLOBAL ? global : STATIC ? global[TARGET] : global[TARGET] && global[TARGET].prototype;
7438
+ var nativeSource = GLOBAL ? globalThis : STATIC ? globalThis[TARGET] : globalThis[TARGET] && globalThis[TARGET].prototype;
7431
7439
 
7432
7440
  var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];
7433
7441
  var targetPrototype = target.prototype;
@@ -7453,7 +7461,7 @@ module.exports = function (options, source) {
7453
7461
  if (!FORCED && !PROTO && typeof targetProperty == typeof sourceProperty) continue;
7454
7462
 
7455
7463
  // bind methods to global for calling from export context
7456
- if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, global);
7464
+ if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, globalThis);
7457
7465
  // wrap global constructors for prevent changes in this version
7458
7466
  else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);
7459
7467
  // make static versions for prototype methods
@@ -7664,7 +7672,7 @@ module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
7664
7672
  "use strict";
7665
7673
 
7666
7674
  var path = __webpack_require__(8099);
7667
- var global = __webpack_require__(1063);
7675
+ var globalThis = __webpack_require__(8900);
7668
7676
  var isCallable = __webpack_require__(2769);
7669
7677
 
7670
7678
  var aFunction = function (variable) {
@@ -7672,8 +7680,8 @@ var aFunction = function (variable) {
7672
7680
  };
7673
7681
 
7674
7682
  module.exports = function (namespace, method) {
7675
- return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
7676
- : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
7683
+ return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(globalThis[namespace])
7684
+ : path[namespace] && path[namespace][method] || globalThis[namespace] && globalThis[namespace][method];
7677
7685
  };
7678
7686
 
7679
7687
 
@@ -7741,7 +7749,7 @@ module.exports = function (V, P) {
7741
7749
 
7742
7750
  /***/ }),
7743
7751
 
7744
- /***/ 1063:
7752
+ /***/ 8900:
7745
7753
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
7746
7754
 
7747
7755
  "use strict";
@@ -7903,7 +7911,7 @@ module.exports = function (O, options) {
7903
7911
  "use strict";
7904
7912
 
7905
7913
  var NATIVE_WEAK_MAP = __webpack_require__(1314);
7906
- var global = __webpack_require__(1063);
7914
+ var globalThis = __webpack_require__(8900);
7907
7915
  var isObject = __webpack_require__(262);
7908
7916
  var createNonEnumerableProperty = __webpack_require__(3999);
7909
7917
  var hasOwn = __webpack_require__(701);
@@ -7912,8 +7920,8 @@ var sharedKey = __webpack_require__(4275);
7912
7920
  var hiddenKeys = __webpack_require__(5241);
7913
7921
 
7914
7922
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
7915
- var TypeError = global.TypeError;
7916
- var WeakMap = global.WeakMap;
7923
+ var TypeError = globalThis.TypeError;
7924
+ var WeakMap = globalThis.WeakMap;
7917
7925
  var set, get, has;
7918
7926
 
7919
7927
  var enforce = function (it) {
@@ -8510,7 +8518,8 @@ var NullProtoObjectViaActiveX = function (activeXDocument) {
8510
8518
  activeXDocument.write(scriptTag(''));
8511
8519
  activeXDocument.close();
8512
8520
  var temp = activeXDocument.parentWindow.Object;
8513
- activeXDocument = null; // avoid memory leak
8521
+ // eslint-disable-next-line no-useless-assignment -- avoid memory leak
8522
+ activeXDocument = null;
8514
8523
  return temp;
8515
8524
  };
8516
8525
 
@@ -8832,7 +8841,8 @@ exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
8832
8841
 
8833
8842
  /* eslint-disable no-proto -- safe */
8834
8843
  var uncurryThisAccessor = __webpack_require__(3574);
8835
- var anObject = __webpack_require__(7235);
8844
+ var isObject = __webpack_require__(262);
8845
+ var requireObjectCoercible = __webpack_require__(5426);
8836
8846
  var aPossiblePrototype = __webpack_require__(1966);
8837
8847
 
8838
8848
  // `Object.setPrototypeOf` method
@@ -8849,8 +8859,9 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
8849
8859
  CORRECT_SETTER = test instanceof Array;
8850
8860
  } catch (error) { /* empty */ }
8851
8861
  return function setPrototypeOf(O, proto) {
8852
- anObject(O);
8862
+ requireObjectCoercible(O);
8853
8863
  aPossiblePrototype(proto);
8864
+ if (!isObject(O)) return O;
8854
8865
  if (CORRECT_SETTER) setter(O, proto);
8855
8866
  else O.__proto__ = proto;
8856
8867
  return O;
@@ -9022,13 +9033,20 @@ module.exports = function (key) {
9022
9033
 
9023
9034
  "use strict";
9024
9035
 
9025
- var global = __webpack_require__(1063);
9036
+ var IS_PURE = __webpack_require__(4871);
9037
+ var globalThis = __webpack_require__(8900);
9026
9038
  var defineGlobalProperty = __webpack_require__(7525);
9027
9039
 
9028
9040
  var SHARED = '__core-js_shared__';
9029
- var store = global[SHARED] || defineGlobalProperty(SHARED, {});
9041
+ var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
9030
9042
 
9031
- module.exports = store;
9043
+ (store.versions || (store.versions = [])).push({
9044
+ version: '3.38.1',
9045
+ mode: IS_PURE ? 'pure' : 'global',
9046
+ copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
9047
+ license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',
9048
+ source: 'https://github.com/zloirock/core-js'
9049
+ });
9032
9050
 
9033
9051
 
9034
9052
  /***/ }),
@@ -9038,18 +9056,11 @@ module.exports = store;
9038
9056
 
9039
9057
  "use strict";
9040
9058
 
9041
- var IS_PURE = __webpack_require__(4871);
9042
9059
  var store = __webpack_require__(3753);
9043
9060
 
9044
- (module.exports = function (key, value) {
9045
- return store[key] || (store[key] = value !== undefined ? value : {});
9046
- })('versions', []).push({
9047
- version: '3.35.1',
9048
- mode: IS_PURE ? 'pure' : 'global',
9049
- copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
9050
- license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
9051
- source: 'https://github.com/zloirock/core-js'
9052
- });
9061
+ module.exports = function (key, value) {
9062
+ return store[key] || (store[key] = value || {});
9063
+ };
9053
9064
 
9054
9065
 
9055
9066
  /***/ }),
@@ -9105,11 +9116,11 @@ module.exports = {
9105
9116
  "use strict";
9106
9117
 
9107
9118
  /* eslint-disable es/no-symbol -- required for testing */
9108
- var V8_VERSION = __webpack_require__(4432);
9119
+ var V8_VERSION = __webpack_require__(5547);
9109
9120
  var fails = __webpack_require__(1203);
9110
- var global = __webpack_require__(1063);
9121
+ var globalThis = __webpack_require__(8900);
9111
9122
 
9112
- var $String = global.String;
9123
+ var $String = globalThis.String;
9113
9124
 
9114
9125
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
9115
9126
  module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
@@ -9381,10 +9392,10 @@ module.exports = DESCRIPTORS && fails(function () {
9381
9392
 
9382
9393
  "use strict";
9383
9394
 
9384
- var global = __webpack_require__(1063);
9395
+ var globalThis = __webpack_require__(8900);
9385
9396
  var isCallable = __webpack_require__(2769);
9386
9397
 
9387
- var WeakMap = global.WeakMap;
9398
+ var WeakMap = globalThis.WeakMap;
9388
9399
 
9389
9400
  module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
9390
9401
 
@@ -9396,14 +9407,14 @@ module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
9396
9407
 
9397
9408
  "use strict";
9398
9409
 
9399
- var global = __webpack_require__(1063);
9410
+ var globalThis = __webpack_require__(8900);
9400
9411
  var shared = __webpack_require__(8141);
9401
9412
  var hasOwn = __webpack_require__(701);
9402
9413
  var uid = __webpack_require__(1268);
9403
9414
  var NATIVE_SYMBOL = __webpack_require__(4603);
9404
9415
  var USE_SYMBOL_AS_UID = __webpack_require__(7460);
9405
9416
 
9406
- var Symbol = global.Symbol;
9417
+ var Symbol = globalThis.Symbol;
9407
9418
  var WellKnownSymbolsStore = shared('wks');
9408
9419
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
9409
9420
 
@@ -9635,7 +9646,7 @@ module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
9635
9646
  var target = state.target;
9636
9647
  var index = state.index++;
9637
9648
  if (!target || index >= target.length) {
9638
- state.target = undefined;
9649
+ state.target = null;
9639
9650
  return createIterResultObject(undefined, true);
9640
9651
  }
9641
9652
  switch (state.kind) {
@@ -9669,12 +9680,12 @@ if (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {
9669
9680
 
9670
9681
  /* eslint-disable no-unused-vars -- required for functions `.length` */
9671
9682
  var $ = __webpack_require__(9098);
9672
- var global = __webpack_require__(1063);
9683
+ var globalThis = __webpack_require__(8900);
9673
9684
  var apply = __webpack_require__(7013);
9674
9685
  var wrapErrorConstructorWithCause = __webpack_require__(6453);
9675
9686
 
9676
9687
  var WEB_ASSEMBLY = 'WebAssembly';
9677
- var WebAssembly = global[WEB_ASSEMBLY];
9688
+ var WebAssembly = globalThis[WEB_ASSEMBLY];
9678
9689
 
9679
9690
  // eslint-disable-next-line es/no-error-cause -- feature detection
9680
9691
  var FORCED = new Error('e', { cause: 7 }).cause !== 7;
@@ -9785,12 +9796,12 @@ __webpack_require__(5695);
9785
9796
 
9786
9797
  __webpack_require__(7447);
9787
9798
  var DOMIterables = __webpack_require__(1100);
9788
- var global = __webpack_require__(1063);
9799
+ var globalThis = __webpack_require__(8900);
9789
9800
  var setToStringTag = __webpack_require__(1811);
9790
9801
  var Iterators = __webpack_require__(6625);
9791
9802
 
9792
9803
  for (var COLLECTION_NAME in DOMIterables) {
9793
- setToStringTag(global[COLLECTION_NAME], COLLECTION_NAME);
9804
+ setToStringTag(globalThis[COLLECTION_NAME], COLLECTION_NAME);
9794
9805
  Iterators[COLLECTION_NAME] = Iterators.Array;
9795
9806
  }
9796
9807
 
@@ -12326,10 +12337,8 @@ __webpack_require__.r(__webpack_exports__);
12326
12337
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12327
12338
  /* harmony export */ "default": () => (/* binding */ _isPlaceholder)
12328
12339
  /* harmony export */ });
12329
- /* harmony import */ var _placeholder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(231);
12330
-
12331
12340
  function _isPlaceholder(a) {
12332
- return a === _placeholder_js__WEBPACK_IMPORTED_MODULE_0__["default"];
12341
+ return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;
12333
12342
  }
12334
12343
 
12335
12344
  /***/ }),
@@ -12499,20 +12508,6 @@ function _pipe(f, g) {
12499
12508
 
12500
12509
  /***/ }),
12501
12510
 
12502
- /***/ 231:
12503
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12504
-
12505
- "use strict";
12506
- __webpack_require__.r(__webpack_exports__);
12507
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12508
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
12509
- /* harmony export */ });
12510
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
12511
- '@@functional/placeholder': true
12512
- });
12513
-
12514
- /***/ }),
12515
-
12516
12511
  /***/ 9569:
12517
12512
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12518
12513
 
@@ -13024,7 +13019,7 @@ __webpack_require__.r(__webpack_exports__);
13024
13019
  * @since v0.1.4
13025
13020
  * @category List
13026
13021
  * @sig [a] -> a | Undefined
13027
- * @sig String -> String
13022
+ * @sig String -> String | Undefined
13028
13023
  * @param {*} list
13029
13024
  * @return {*}
13030
13025
  * @see R.init, R.head, R.tail
@@ -13034,7 +13029,7 @@ __webpack_require__.r(__webpack_exports__);
13034
13029
  * R.last([]); //=> undefined
13035
13030
  *
13036
13031
  * R.last('abc'); //=> 'c'
13037
- * R.last(''); //=> ''
13032
+ * R.last(''); //=> undefined
13038
13033
  */
13039
13034
  var last = /*#__PURE__*/(0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (list) {
13040
13035
  return (0,_internal_nth_js__WEBPACK_IMPORTED_MODULE_1__["default"])(-1, list);
@@ -14164,7 +14159,7 @@ const cloneNode = node => Object.create(Object.getPrototypeOf(node), Object.getO
14164
14159
  * parallel. Each visitor will be visited for each node before moving on.
14165
14160
  *
14166
14161
  * If a prior visitor edits a node, no following visitors will see that node.
14167
- * `exposeEdits=true` can be used to exoise the edited node from the previous visitors.
14162
+ * `exposeEdits=true` can be used to expose the edited node from the previous visitors.
14168
14163
  */
14169
14164
 
14170
14165
  const mergeAll = (visitors, {
@@ -14178,14 +14173,21 @@ const mergeAll = (visitors, {
14178
14173
  const skipSymbol = Symbol('skip');
14179
14174
  const skipping = new Array(visitors.length).fill(skipSymbol);
14180
14175
  return {
14181
- enter(node, ...rest) {
14176
+ enter(node, key, parent, path, ancestors, link) {
14182
14177
  let currentNode = node;
14183
14178
  let hasChanged = false;
14179
+ const linkProxy = {
14180
+ ...link,
14181
+ replaceWith(newNode, replacer) {
14182
+ link.replaceWith(newNode, replacer);
14183
+ currentNode = newNode;
14184
+ }
14185
+ };
14184
14186
  for (let i = 0; i < visitors.length; i += 1) {
14185
14187
  if (skipping[i] === skipSymbol) {
14186
14188
  const visitFn = visitFnGetter(visitors[i], nodeTypeGetter(currentNode), false);
14187
14189
  if (typeof visitFn === 'function') {
14188
- const result = visitFn.call(visitors[i], currentNode, ...rest);
14190
+ const result = visitFn.call(visitors[i], currentNode, key, parent, path, ancestors, linkProxy);
14189
14191
 
14190
14192
  // check if the visitor is async
14191
14193
  if (typeof (result === null || result === void 0 ? void 0 : result.then) === 'function') {
@@ -14195,7 +14197,7 @@ const mergeAll = (visitors, {
14195
14197
  });
14196
14198
  }
14197
14199
  if (result === skipVisitingNodeSymbol) {
14198
- skipping[i] = node;
14200
+ skipping[i] = currentNode;
14199
14201
  } else if (result === breakSymbol) {
14200
14202
  skipping[i] = breakSymbol;
14201
14203
  } else if (result === deleteNodeSymbol) {
@@ -14213,12 +14215,20 @@ const mergeAll = (visitors, {
14213
14215
  }
14214
14216
  return hasChanged ? currentNode : undefined;
14215
14217
  },
14216
- leave(node, ...rest) {
14218
+ leave(node, key, parent, path, ancestors, link) {
14219
+ let currentNode = node;
14220
+ const linkProxy = {
14221
+ ...link,
14222
+ replaceWith(newNode, replacer) {
14223
+ link.replaceWith(newNode, replacer);
14224
+ currentNode = newNode;
14225
+ }
14226
+ };
14217
14227
  for (let i = 0; i < visitors.length; i += 1) {
14218
14228
  if (skipping[i] === skipSymbol) {
14219
- const visitFn = visitFnGetter(visitors[i], nodeTypeGetter(node), true);
14229
+ const visitFn = visitFnGetter(visitors[i], nodeTypeGetter(currentNode), true);
14220
14230
  if (typeof visitFn === 'function') {
14221
- const result = visitFn.call(visitors[i], node, ...rest);
14231
+ const result = visitFn.call(visitors[i], currentNode, key, parent, path, ancestors, linkProxy);
14222
14232
 
14223
14233
  // check if the visitor is async
14224
14234
  if (typeof (result === null || result === void 0 ? void 0 : result.then) === 'function') {
@@ -14233,7 +14243,7 @@ const mergeAll = (visitors, {
14233
14243
  return result;
14234
14244
  }
14235
14245
  }
14236
- } else if (skipping[i] === node) {
14246
+ } else if (skipping[i] === currentNode) {
14237
14247
  skipping[i] = skipSymbol;
14238
14248
  }
14239
14249
  }
@@ -14252,17 +14262,24 @@ const mergeAllAsync = (visitors, {
14252
14262
  const skipSymbol = Symbol('skip');
14253
14263
  const skipping = new Array(visitors.length).fill(skipSymbol);
14254
14264
  return {
14255
- async enter(node, ...rest) {
14265
+ async enter(node, key, parent, path, ancestors, link) {
14256
14266
  let currentNode = node;
14257
14267
  let hasChanged = false;
14268
+ const linkProxy = {
14269
+ ...link,
14270
+ replaceWith(newNode, replacer) {
14271
+ link.replaceWith(newNode, replacer);
14272
+ currentNode = newNode;
14273
+ }
14274
+ };
14258
14275
  for (let i = 0; i < visitors.length; i += 1) {
14259
14276
  if (skipping[i] === skipSymbol) {
14260
14277
  const visitFn = visitFnGetter(visitors[i], nodeTypeGetter(currentNode), false);
14261
14278
  if (typeof visitFn === 'function') {
14262
14279
  // eslint-disable-next-line no-await-in-loop
14263
- const result = await visitFn.call(visitors[i], currentNode, ...rest);
14280
+ const result = await visitFn.call(visitors[i], currentNode, key, parent, path, ancestors, linkProxy);
14264
14281
  if (result === skipVisitingNodeSymbol) {
14265
- skipping[i] = node;
14282
+ skipping[i] = currentNode;
14266
14283
  } else if (result === breakSymbol) {
14267
14284
  skipping[i] = breakSymbol;
14268
14285
  } else if (result === deleteNodeSymbol) {
@@ -14280,20 +14297,28 @@ const mergeAllAsync = (visitors, {
14280
14297
  }
14281
14298
  return hasChanged ? currentNode : undefined;
14282
14299
  },
14283
- async leave(node, ...rest) {
14300
+ async leave(node, key, parent, path, ancestors, link) {
14301
+ let currentNode = node;
14302
+ const linkProxy = {
14303
+ ...link,
14304
+ replaceWith(newNode, replacer) {
14305
+ link.replaceWith(newNode, replacer);
14306
+ currentNode = newNode;
14307
+ }
14308
+ };
14284
14309
  for (let i = 0; i < visitors.length; i += 1) {
14285
14310
  if (skipping[i] === skipSymbol) {
14286
- const visitFn = visitFnGetter(visitors[i], nodeTypeGetter(node), true);
14311
+ const visitFn = visitFnGetter(visitors[i], nodeTypeGetter(currentNode), true);
14287
14312
  if (typeof visitFn === 'function') {
14288
14313
  // eslint-disable-next-line no-await-in-loop
14289
- const result = await visitFn.call(visitors[i], node, ...rest);
14314
+ const result = await visitFn.call(visitors[i], currentNode, key, parent, path, ancestors, linkProxy);
14290
14315
  if (result === breakSymbol) {
14291
14316
  skipping[i] = breakSymbol;
14292
14317
  } else if (result !== undefined && result !== skipVisitingNodeSymbol) {
14293
14318
  return result;
14294
14319
  }
14295
14320
  }
14296
- } else if (skipping[i] === node) {
14321
+ } else if (skipping[i] === currentNode) {
14297
14322
  skipping[i] = skipSymbol;
14298
14323
  }
14299
14324
  }
@@ -14489,8 +14514,22 @@ visitor, {
14489
14514
  for (const [stateKey, stateValue] of Object.entries(state)) {
14490
14515
  visitor[stateKey] = stateValue;
14491
14516
  }
14517
+ const link = {
14518
+ // eslint-disable-next-line @typescript-eslint/no-loop-func
14519
+ replaceWith(newNode, replacer) {
14520
+ if (typeof replacer === 'function') {
14521
+ replacer(newNode, node, key, parent, path, ancestors);
14522
+ } else if (parent) {
14523
+ parent[key] = newNode;
14524
+ }
14525
+ if (!isLeaving) {
14526
+ node = newNode;
14527
+ }
14528
+ }
14529
+ };
14530
+
14492
14531
  // retrieve result
14493
- result = visitFn.call(visitor, node, key, parent, path, ancestors);
14532
+ result = visitFn.call(visitor, node, key, parent, path, ancestors, link);
14494
14533
  }
14495
14534
 
14496
14535
  // check if the visitor is async
@@ -14647,9 +14686,22 @@ visitor, {
14647
14686
  for (const [stateKey, stateValue] of Object.entries(state)) {
14648
14687
  visitor[stateKey] = stateValue;
14649
14688
  }
14689
+ const link = {
14690
+ // eslint-disable-next-line @typescript-eslint/no-loop-func
14691
+ replaceWith(newNode, replacer) {
14692
+ if (typeof replacer === 'function') {
14693
+ replacer(newNode, node, key, parent, path, ancestors);
14694
+ } else if (parent) {
14695
+ parent[key] = newNode;
14696
+ }
14697
+ if (!isLeaving) {
14698
+ node = newNode;
14699
+ }
14700
+ }
14701
+ };
14650
14702
 
14651
14703
  // retrieve result
14652
- result = await visitFn.call(visitor, node, key, parent, path, ancestors); // eslint-disable-line no-await-in-loop
14704
+ result = await visitFn.call(visitor, node, key, parent, path, ancestors, link); // eslint-disable-line no-await-in-loop
14653
14705
  }
14654
14706
  if (result === breakSymbol) {
14655
14707
  break;