@swagger-api/apidom-parser-adapter-api-design-systems-yaml 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-api-design-systems-yaml
|
|
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-api-design-systems-yaml
|
|
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-api-design-systems-yaml
|
|
@@ -18583,7 +18583,8 @@
|
|
|
18583
18583
|
|
|
18584
18584
|
let parser = null;
|
|
18585
18585
|
let parserInitLock = null;
|
|
18586
|
-
|
|
18586
|
+
const activeTrees = new Set();
|
|
18587
|
+
const MAX_ACTIVE_TREES = 5;
|
|
18587
18588
|
const createAnalyze = treeSitterYaml => async source => {
|
|
18588
18589
|
if (parser === null && parserInitLock === null) {
|
|
18589
18590
|
// acquire lock
|
|
@@ -18603,9 +18604,28 @@
|
|
|
18603
18604
|
if (parser === null) {
|
|
18604
18605
|
throw new ApiDOMError('Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.');
|
|
18605
18606
|
}
|
|
18606
|
-
|
|
18607
|
+
|
|
18608
|
+
// prevent WASM OOM during concurrency spikes by evicting oldest trees
|
|
18609
|
+
// when the pool exceeds threshold; tree.delete() is idempotent so
|
|
18610
|
+
// callers that still hold a reference can safely call delete() again
|
|
18611
|
+
if (activeTrees.size >= MAX_ACTIVE_TREES) {
|
|
18612
|
+
const treesToEvict = [...activeTrees];
|
|
18613
|
+
activeTrees.clear();
|
|
18614
|
+
for (const oldTree of treesToEvict) {
|
|
18615
|
+
oldTree.delete();
|
|
18616
|
+
}
|
|
18617
|
+
}
|
|
18618
|
+
const tree = parser.parse(source);
|
|
18619
|
+
activeTrees.add(tree);
|
|
18620
|
+
|
|
18621
|
+
// remove from tracking when caller deletes
|
|
18622
|
+
const originalDelete = tree.delete;
|
|
18623
|
+
tree.delete = function deleteAndUntrack() {
|
|
18624
|
+
activeTrees.delete(this);
|
|
18625
|
+
originalDelete.call(this);
|
|
18626
|
+
};
|
|
18607
18627
|
parser.reset();
|
|
18608
|
-
return
|
|
18628
|
+
return tree;
|
|
18609
18629
|
};
|
|
18610
18630
|
|
|
18611
18631
|
/**
|
|
@@ -19466,13 +19486,16 @@
|
|
|
19466
19486
|
* @public
|
|
19467
19487
|
*/
|
|
19468
19488
|
const detect$1 = async source => {
|
|
19489
|
+
let cst = null;
|
|
19469
19490
|
try {
|
|
19470
|
-
|
|
19471
|
-
|
|
19472
|
-
cst.delete();
|
|
19473
|
-
return isError;
|
|
19491
|
+
cst = await analyze$1(source);
|
|
19492
|
+
return !cst.rootNode.isError;
|
|
19474
19493
|
} catch {
|
|
19475
19494
|
return false;
|
|
19495
|
+
} finally {
|
|
19496
|
+
if (cst !== null) {
|
|
19497
|
+
cst.delete();
|
|
19498
|
+
}
|
|
19476
19499
|
}
|
|
19477
19500
|
};
|
|
19478
19501
|
|
|
@@ -19490,12 +19513,17 @@
|
|
|
19490
19513
|
const parse$1 = async (source, {
|
|
19491
19514
|
sourceMap = false
|
|
19492
19515
|
} = {}) => {
|
|
19493
|
-
|
|
19494
|
-
|
|
19495
|
-
|
|
19496
|
-
|
|
19497
|
-
|
|
19498
|
-
|
|
19516
|
+
let cst = null;
|
|
19517
|
+
try {
|
|
19518
|
+
cst = await analyze$1(source);
|
|
19519
|
+
return analyze(cst, {
|
|
19520
|
+
sourceMap
|
|
19521
|
+
});
|
|
19522
|
+
} finally {
|
|
19523
|
+
if (cst !== null) {
|
|
19524
|
+
cst.delete();
|
|
19525
|
+
}
|
|
19526
|
+
}
|
|
19499
19527
|
};
|
|
19500
19528
|
|
|
19501
19529
|
/**
|