@speclynx/apidom-parser-adapter-openapi-json-2 2.2.3 → 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 CHANGED
@@ -3,6 +3,12 @@
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
+ # [2.3.0](https://github.com/speclynx/apidom/compare/v2.2.3...v2.3.0) (2026-01-27)
7
+
8
+ ### Features
9
+
10
+ - support strict parsing mode through out the packages ([#46](https://github.com/speclynx/apidom/issues/46)) ([e6b47d9](https://github.com/speclynx/apidom/commit/e6b47d9cfdede7103cada67362b316fd8e5b787f)), closes [#23](https://github.com/speclynx/apidom/issues/23)
11
+
6
12
  ## [2.2.3](https://github.com/speclynx/apidom/compare/v2.2.2...v2.2.3) (2026-01-26)
7
13
 
8
14
  **Note:** Version bump only for package @speclynx/apidom-parser-adapter-openapi-json-2
@@ -20773,7 +20773,7 @@ __webpack_require__.r(__webpack_exports__);
20773
20773
  /* harmony export */ syntacticAnalysis: () => (/* reexport safe */ _tree_sitter_index_mjs__WEBPACK_IMPORTED_MODULE_5__["default"])
20774
20774
  /* harmony export */ });
20775
20775
  /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5156);
20776
- /* harmony import */ var _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6126);
20776
+ /* harmony import */ var _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(746);
20777
20777
  /* harmony import */ var _native_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8600);
20778
20778
  /* harmony import */ var _tree_sitter_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4885);
20779
20779
  /* harmony import */ var _tree_sitter_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9305);
@@ -20818,10 +20818,6 @@ const detect = async (source, {
20818
20818
  * @public
20819
20819
  */
20820
20820
 
20821
- /**
20822
- * @public
20823
- */
20824
-
20825
20821
  /**
20826
20822
  * @public
20827
20823
  */
@@ -28796,6 +28792,9 @@ __webpack_require__.r(__webpack_exports__);
28796
28792
  * @public
28797
28793
  */
28798
28794
  const detect = async source => {
28795
+ if (source.trim().length === 0) {
28796
+ return false;
28797
+ }
28799
28798
  try {
28800
28799
  JSON.parse(source);
28801
28800
  return true;
@@ -28808,9 +28807,12 @@ const detect = async source => {
28808
28807
  * @public
28809
28808
  */
28810
28809
  const parse = async source => {
28810
+ const parseResult = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__["default"]();
28811
+ if (source.trim().length === 0) {
28812
+ return parseResult;
28813
+ }
28811
28814
  const pojo = JSON.parse(source);
28812
28815
  const element = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.refract)(pojo);
28813
- const parseResult = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__["default"]();
28814
28816
  element.classes.push('result');
28815
28817
  parseResult.push(element);
28816
28818
  return parseResult;
@@ -32886,7 +32888,11 @@ const detectionRegExp = /"swagger"\s*:\s*"(?<version_json>2\.0)"/;
32886
32888
  /**
32887
32889
  * @public
32888
32890
  */
32889
- const detect = async source => detectionRegExp.test(source) && (await (0,_speclynx_apidom_parser_adapter_json__WEBPACK_IMPORTED_MODULE_4__.detect)(source));
32891
+ const detect = async (source, options = {}) => detectionRegExp.test(source) && (await (0,_speclynx_apidom_parser_adapter_json__WEBPACK_IMPORTED_MODULE_4__.detect)(source, options));
32892
+
32893
+ /**
32894
+ * @public
32895
+ */
32890
32896
 
32891
32897
  /**
32892
32898
  * @public