@swagger-api/apidom-parser-adapter-arazzo-yaml-1 1.8.0 → 1.10.0
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
|
+
# [1.10.0](https://github.com/swagger-api/apidom/compare/v1.9.0...v1.10.0) (2026-04-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-arazzo-yaml-1
|
|
9
|
+
|
|
10
|
+
# [1.9.0](https://github.com/swagger-api/apidom/compare/v1.8.0...v1.9.0) (2026-03-30)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-arazzo-yaml-1
|
|
13
|
+
|
|
6
14
|
# [1.8.0](https://github.com/swagger-api/apidom/compare/v1.7.0...v1.8.0) (2026-03-20)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-arazzo-yaml-1
|
|
@@ -19681,7 +19681,8 @@
|
|
|
19681
19681
|
|
|
19682
19682
|
let parser = null;
|
|
19683
19683
|
let parserInitLock = null;
|
|
19684
|
-
|
|
19684
|
+
const activeTrees = new Set();
|
|
19685
|
+
const MAX_ACTIVE_TREES = 5;
|
|
19685
19686
|
const createAnalyze = treeSitterYaml => async source => {
|
|
19686
19687
|
if (parser === null && parserInitLock === null) {
|
|
19687
19688
|
// acquire lock
|
|
@@ -19701,9 +19702,28 @@
|
|
|
19701
19702
|
if (parser === null) {
|
|
19702
19703
|
throw new ApiDOMError('Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.');
|
|
19703
19704
|
}
|
|
19704
|
-
|
|
19705
|
+
|
|
19706
|
+
// prevent WASM OOM during concurrency spikes by evicting oldest trees
|
|
19707
|
+
// when the pool exceeds threshold; tree.delete() is idempotent so
|
|
19708
|
+
// callers that still hold a reference can safely call delete() again
|
|
19709
|
+
if (activeTrees.size >= MAX_ACTIVE_TREES) {
|
|
19710
|
+
const treesToEvict = [...activeTrees];
|
|
19711
|
+
activeTrees.clear();
|
|
19712
|
+
for (const oldTree of treesToEvict) {
|
|
19713
|
+
oldTree.delete();
|
|
19714
|
+
}
|
|
19715
|
+
}
|
|
19716
|
+
const tree = parser.parse(source);
|
|
19717
|
+
activeTrees.add(tree);
|
|
19718
|
+
|
|
19719
|
+
// remove from tracking when caller deletes
|
|
19720
|
+
const originalDelete = tree.delete;
|
|
19721
|
+
tree.delete = function deleteAndUntrack() {
|
|
19722
|
+
activeTrees.delete(this);
|
|
19723
|
+
originalDelete.call(this);
|
|
19724
|
+
};
|
|
19705
19725
|
parser.reset();
|
|
19706
|
-
return
|
|
19726
|
+
return tree;
|
|
19707
19727
|
};
|
|
19708
19728
|
|
|
19709
19729
|
/**
|
|
@@ -20564,13 +20584,16 @@
|
|
|
20564
20584
|
* @public
|
|
20565
20585
|
*/
|
|
20566
20586
|
const detect$1 = async source => {
|
|
20587
|
+
let cst = null;
|
|
20567
20588
|
try {
|
|
20568
|
-
|
|
20569
|
-
|
|
20570
|
-
cst.delete();
|
|
20571
|
-
return isError;
|
|
20589
|
+
cst = await analyze$1(source);
|
|
20590
|
+
return !cst.rootNode.isError;
|
|
20572
20591
|
} catch {
|
|
20573
20592
|
return false;
|
|
20593
|
+
} finally {
|
|
20594
|
+
if (cst !== null) {
|
|
20595
|
+
cst.delete();
|
|
20596
|
+
}
|
|
20574
20597
|
}
|
|
20575
20598
|
};
|
|
20576
20599
|
|
|
@@ -20588,12 +20611,17 @@
|
|
|
20588
20611
|
const parse$1 = async (source, {
|
|
20589
20612
|
sourceMap = false
|
|
20590
20613
|
} = {}) => {
|
|
20591
|
-
|
|
20592
|
-
|
|
20593
|
-
|
|
20594
|
-
|
|
20595
|
-
|
|
20596
|
-
|
|
20614
|
+
let cst = null;
|
|
20615
|
+
try {
|
|
20616
|
+
cst = await analyze$1(source);
|
|
20617
|
+
return analyze(cst, {
|
|
20618
|
+
sourceMap
|
|
20619
|
+
});
|
|
20620
|
+
} finally {
|
|
20621
|
+
if (cst !== null) {
|
|
20622
|
+
cst.delete();
|
|
20623
|
+
}
|
|
20624
|
+
}
|
|
20597
20625
|
};
|
|
20598
20626
|
|
|
20599
20627
|
/**
|