@orioro/util 0.13.1 → 0.14.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 +12 -0
- package/dist/index.js +6 -2
- package/dist/index.mjs +6 -2
- package/package.json +3 -9
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1491,8 +1491,12 @@ function syntheticJson(str) {
|
|
|
1491
1491
|
// Step 3: Parse as JSON
|
|
1492
1492
|
try {
|
|
1493
1493
|
return JSON.parse(normalized);
|
|
1494
|
-
} catch (
|
|
1495
|
-
|
|
1494
|
+
} catch (err1) {
|
|
1495
|
+
try {
|
|
1496
|
+
return JSON.parse(str);
|
|
1497
|
+
} catch (err2) {
|
|
1498
|
+
throw new Error("Invalid synthetic JSON: ".concat(str));
|
|
1499
|
+
}
|
|
1496
1500
|
}
|
|
1497
1501
|
}
|
|
1498
1502
|
|
package/dist/index.mjs
CHANGED
|
@@ -1489,8 +1489,12 @@ function syntheticJson(str) {
|
|
|
1489
1489
|
// Step 3: Parse as JSON
|
|
1490
1490
|
try {
|
|
1491
1491
|
return JSON.parse(normalized);
|
|
1492
|
-
} catch (
|
|
1493
|
-
|
|
1492
|
+
} catch (err1) {
|
|
1493
|
+
try {
|
|
1494
|
+
return JSON.parse(str);
|
|
1495
|
+
} catch (err2) {
|
|
1496
|
+
throw new Error("Invalid synthetic JSON: ".concat(str));
|
|
1497
|
+
}
|
|
1494
1498
|
}
|
|
1495
1499
|
}
|
|
1496
1500
|
|
package/package.json
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orioro/util",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"packageManager": "yarn@4.0.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
|
-
".":
|
|
10
|
-
|
|
11
|
-
"require": "./dist/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./*": {
|
|
14
|
-
"import": "./dist/*.mjs",
|
|
15
|
-
"require": "./dist/*.js"
|
|
16
|
-
}
|
|
9
|
+
".": "./dist/index.mjs",
|
|
10
|
+
"./*": "./dist/*"
|
|
17
11
|
},
|
|
18
12
|
"files": [
|
|
19
13
|
"dist"
|