@swagger-api/apidom-parser-adapter-openapi-yaml-3-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-openapi-yaml-3-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-openapi-yaml-3-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-openapi-yaml-3-1
|
|
@@ -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 = 5;
|
|
20014
20015
|
const createAnalyze = treeSitterYaml => async source => {
|
|
20015
20016
|
if (parser === null && parserInitLock === null) {
|
|
20016
20017
|
// acquire lock
|
|
@@ -20030,9 +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
|
+
|
|
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
|
+
}
|
|
20044
|
+
}
|
|
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
|
+
};
|
|
20034
20054
|
parser.reset();
|
|
20035
|
-
return
|
|
20055
|
+
return tree;
|
|
20036
20056
|
};
|
|
20037
20057
|
|
|
20038
20058
|
/**
|
|
@@ -20893,13 +20913,16 @@
|
|
|
20893
20913
|
* @public
|
|
20894
20914
|
*/
|
|
20895
20915
|
const detect$1 = async source => {
|
|
20916
|
+
let cst = null;
|
|
20896
20917
|
try {
|
|
20897
|
-
|
|
20898
|
-
|
|
20899
|
-
cst.delete();
|
|
20900
|
-
return isError;
|
|
20918
|
+
cst = await analyze$1(source);
|
|
20919
|
+
return !cst.rootNode.isError;
|
|
20901
20920
|
} catch {
|
|
20902
20921
|
return false;
|
|
20922
|
+
} finally {
|
|
20923
|
+
if (cst !== null) {
|
|
20924
|
+
cst.delete();
|
|
20925
|
+
}
|
|
20903
20926
|
}
|
|
20904
20927
|
};
|
|
20905
20928
|
|
|
@@ -20917,12 +20940,17 @@
|
|
|
20917
20940
|
const parse$1 = async (source, {
|
|
20918
20941
|
sourceMap = false
|
|
20919
20942
|
} = {}) => {
|
|
20920
|
-
|
|
20921
|
-
|
|
20922
|
-
|
|
20923
|
-
|
|
20924
|
-
|
|
20925
|
-
|
|
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
|
+
}
|
|
20926
20954
|
};
|
|
20927
20955
|
|
|
20928
20956
|
/**
|