@swagger-api/apidom-parser-adapter-openapi-yaml-3-1 1.9.0 → 1.10.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
|
+
## [1.10.1](https://github.com/swagger-api/apidom/compare/v1.10.0...v1.10.1) (2026-04-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-openapi-yaml-3-1
|
|
9
|
+
|
|
10
|
+
# [1.10.0](https://github.com/swagger-api/apidom/compare/v1.9.0...v1.10.0) (2026-04-01)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-openapi-yaml-3-1
|
|
13
|
+
|
|
6
14
|
# [1.9.0](https://github.com/swagger-api/apidom/compare/v1.8.0...v1.9.0) (2026-03-30)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-openapi-yaml-3-1
|
|
@@ -6476,7 +6476,7 @@
|
|
|
6476
6476
|
* @name has
|
|
6477
6477
|
* @memberOf SetCache
|
|
6478
6478
|
* @param {*} value The value to search for.
|
|
6479
|
-
* @returns {
|
|
6479
|
+
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
6480
6480
|
*/
|
|
6481
6481
|
|
|
6482
6482
|
var _setCacheHas;
|
|
@@ -20010,7 +20010,8 @@
|
|
|
20010
20010
|
|
|
20011
20011
|
let parser = null;
|
|
20012
20012
|
let parserInitLock = null;
|
|
20013
|
-
|
|
20013
|
+
const activeTrees = new Set();
|
|
20014
|
+
const MAX_ACTIVE_TREES = 10;
|
|
20014
20015
|
const createAnalyze = treeSitterYaml => async source => {
|
|
20015
20016
|
if (parser === null && parserInitLock === null) {
|
|
20016
20017
|
// acquire lock
|
|
@@ -20030,12 +20031,28 @@
|
|
|
20030
20031
|
if (parser === null) {
|
|
20031
20032
|
throw new ApiDOMError('Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.');
|
|
20032
20033
|
}
|
|
20033
|
-
|
|
20034
|
-
|
|
20034
|
+
|
|
20035
|
+
// prevent WASM OOM during concurrency spikes by evicting oldest trees
|
|
20036
|
+
// when the pool exceeds threshold; tree.delete() is idempotent so
|
|
20037
|
+
// callers that still hold a reference can safely call delete() again
|
|
20038
|
+
if (activeTrees.size >= MAX_ACTIVE_TREES) {
|
|
20039
|
+
const treesToEvict = [...activeTrees];
|
|
20040
|
+
activeTrees.clear();
|
|
20041
|
+
for (const oldTree of treesToEvict) {
|
|
20042
|
+
oldTree.delete();
|
|
20043
|
+
}
|
|
20035
20044
|
}
|
|
20036
|
-
|
|
20045
|
+
const tree = parser.parse(source);
|
|
20046
|
+
activeTrees.add(tree);
|
|
20047
|
+
|
|
20048
|
+
// remove from tracking when caller deletes
|
|
20049
|
+
const originalDelete = tree.delete;
|
|
20050
|
+
tree.delete = function deleteAndUntrack() {
|
|
20051
|
+
activeTrees.delete(this);
|
|
20052
|
+
originalDelete.call(this);
|
|
20053
|
+
};
|
|
20037
20054
|
parser.reset();
|
|
20038
|
-
return
|
|
20055
|
+
return tree;
|
|
20039
20056
|
};
|
|
20040
20057
|
|
|
20041
20058
|
/**
|
|
@@ -20896,13 +20913,16 @@
|
|
|
20896
20913
|
* @public
|
|
20897
20914
|
*/
|
|
20898
20915
|
const detect$1 = async source => {
|
|
20916
|
+
let cst = null;
|
|
20899
20917
|
try {
|
|
20900
|
-
|
|
20901
|
-
|
|
20902
|
-
cst.delete();
|
|
20903
|
-
return isError;
|
|
20918
|
+
cst = await analyze$1(source);
|
|
20919
|
+
return !cst.rootNode.isError;
|
|
20904
20920
|
} catch {
|
|
20905
20921
|
return false;
|
|
20922
|
+
} finally {
|
|
20923
|
+
if (cst !== null) {
|
|
20924
|
+
cst.delete();
|
|
20925
|
+
}
|
|
20906
20926
|
}
|
|
20907
20927
|
};
|
|
20908
20928
|
|
|
@@ -20920,12 +20940,17 @@
|
|
|
20920
20940
|
const parse$1 = async (source, {
|
|
20921
20941
|
sourceMap = false
|
|
20922
20942
|
} = {}) => {
|
|
20923
|
-
|
|
20924
|
-
|
|
20925
|
-
|
|
20926
|
-
|
|
20927
|
-
|
|
20928
|
-
|
|
20943
|
+
let cst = null;
|
|
20944
|
+
try {
|
|
20945
|
+
cst = await analyze$1(source);
|
|
20946
|
+
return analyze(cst, {
|
|
20947
|
+
sourceMap
|
|
20948
|
+
});
|
|
20949
|
+
} finally {
|
|
20950
|
+
if (cst !== null) {
|
|
20951
|
+
cst.delete();
|
|
20952
|
+
}
|
|
20953
|
+
}
|
|
20929
20954
|
};
|
|
20930
20955
|
|
|
20931
20956
|
/**
|