@speclynx/apidom-parser-adapter-json 2.13.1 → 3.0.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@speclynx/apidom-parser-adapter-json",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Parser adapter for parsing JSON documents into base namespace.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/runtime-corejs3": "^7.28.4",
|
|
45
|
-
"@speclynx/apidom-core": "
|
|
46
|
-
"@speclynx/apidom-datamodel": "
|
|
47
|
-
"@speclynx/apidom-error": "
|
|
45
|
+
"@speclynx/apidom-core": "3.0.0",
|
|
46
|
+
"@speclynx/apidom-datamodel": "3.0.0",
|
|
47
|
+
"@speclynx/apidom-error": "3.0.0",
|
|
48
48
|
"web-tree-sitter": "=0.26.6"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"README.md",
|
|
62
62
|
"CHANGELOG.md"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "cb94ec84ea789d121801065876e7a91799a363d0"
|
|
65
65
|
}
|
package/src/native/index.cjs
CHANGED
|
@@ -27,8 +27,9 @@ const parse = async source => {
|
|
|
27
27
|
if (source.trim().length === 0) {
|
|
28
28
|
return parseResult;
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
let pojo = JSON.parse(source);
|
|
31
31
|
const element = (0, _apidomDatamodel.refract)(pojo);
|
|
32
|
+
pojo = null; // allow GC to reclaim POJO
|
|
32
33
|
element.classes.push('result');
|
|
33
34
|
parseResult.push(element);
|
|
34
35
|
return parseResult;
|
package/src/native/index.mjs
CHANGED
|
@@ -23,8 +23,9 @@ export const parse = async source => {
|
|
|
23
23
|
if (source.trim().length === 0) {
|
|
24
24
|
return parseResult;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
let pojo = JSON.parse(source);
|
|
27
27
|
const element = refract(pojo);
|
|
28
|
+
pojo = null; // allow GC to reclaim POJO
|
|
28
29
|
element.classes.push('result');
|
|
29
30
|
parseResult.push(element);
|
|
30
31
|
return parseResult;
|