@speclynx/apidom-parser-adapter-yaml-1-2 2.2.2 → 2.3.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 +10 -0
- package/dist/apidom-parser-adapter-yaml-1-2.browser.js +16423 -16257
- package/dist/apidom-parser-adapter-yaml-1-2.browser.min.js +1 -1
- package/package.json +6 -6
- package/src/adapter.cjs +1 -5
- package/src/adapter.mjs +2 -6
- package/src/tree-sitter/lexical-analysis/index.cjs +1 -1
- package/src/tree-sitter/lexical-analysis/index.mjs +1 -1
- package/src/yaml/index.cjs +29 -4
- package/src/yaml/index.mjs +31 -6
- package/types/apidom-parser-adapter-yaml-1-2.d.ts +6 -11
- package/dist/167.apidom-parser-adapter-yaml-1-2.browser.js +0 -10
- package/dist/167.apidom-parser-adapter-yaml-1-2.browser.min.js +0 -1
- package/dist/451.apidom-parser-adapter-yaml-1-2.browser.js +0 -10
- package/dist/451.apidom-parser-adapter-yaml-1-2.browser.min.js +0 -1
- package/dist/9786785aaddf11f37840.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@speclynx/apidom-parser-adapter-yaml-1-2",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Parser adapter for parsing YAML documents into base namespace.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/runtime-corejs3": "^7.28.4",
|
|
45
|
-
"@speclynx/apidom-core": "^2.
|
|
46
|
-
"@speclynx/apidom-datamodel": "^2.
|
|
47
|
-
"@speclynx/apidom-error": "^2.
|
|
45
|
+
"@speclynx/apidom-core": "^2.3.0",
|
|
46
|
+
"@speclynx/apidom-datamodel": "^2.3.0",
|
|
47
|
+
"@speclynx/apidom-error": "^2.3.0",
|
|
48
48
|
"ramda": "~0.32.0",
|
|
49
49
|
"ramda-adjunct": "^6.0.0",
|
|
50
50
|
"unraw": "^3.0.0",
|
|
51
|
-
"web-tree-sitter": "=0.
|
|
51
|
+
"web-tree-sitter": "=0.26.3",
|
|
52
52
|
"yaml": "^2.8.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"README.md",
|
|
66
66
|
"CHANGELOG.md"
|
|
67
67
|
],
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "b561fa09e688f1d9b1968b8353f32ddad9a4a803"
|
|
69
69
|
}
|
package/src/adapter.cjs
CHANGED
|
@@ -37,10 +37,6 @@ const detect = async (source, {
|
|
|
37
37
|
return treeSitter.detect(source);
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
/**
|
|
41
|
-
* @public
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
40
|
/**
|
|
45
41
|
* @public
|
|
46
42
|
*/
|
|
@@ -53,7 +49,7 @@ const parse = async (source, {
|
|
|
53
49
|
strict = false
|
|
54
50
|
} = {}) => {
|
|
55
51
|
if (strict && sourceMap) {
|
|
56
|
-
throw new _apidomError.
|
|
52
|
+
throw new _apidomError.UnsupportedOperationError('Cannot use sourceMap with strict parsing. Strict parsing does not support source maps.');
|
|
57
53
|
}
|
|
58
54
|
if (strict) {
|
|
59
55
|
return yaml.parse(source);
|
package/src/adapter.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Namespace } from '@speclynx/apidom-datamodel';
|
|
2
|
-
import {
|
|
2
|
+
import { UnsupportedOperationError } from '@speclynx/apidom-error';
|
|
3
3
|
import * as yaml from "./yaml/index.mjs";
|
|
4
4
|
import * as treeSitter from "./tree-sitter/index.mjs";
|
|
5
5
|
export { lexicalAnalysis, syntacticAnalysis } from "./tree-sitter/index.mjs";
|
|
@@ -32,10 +32,6 @@ export const detect = async (source, {
|
|
|
32
32
|
* @public
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
|
-
/**
|
|
36
|
-
* @public
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
35
|
/**
|
|
40
36
|
* @public
|
|
41
37
|
*/
|
|
@@ -44,7 +40,7 @@ export const parse = async (source, {
|
|
|
44
40
|
strict = false
|
|
45
41
|
} = {}) => {
|
|
46
42
|
if (strict && sourceMap) {
|
|
47
|
-
throw new
|
|
43
|
+
throw new UnsupportedOperationError('Cannot use sourceMap with strict parsing. Strict parsing does not support source maps.');
|
|
48
44
|
}
|
|
49
45
|
if (strict) {
|
|
50
46
|
return yaml.parse(source);
|