@speclynx/apidom-parser-adapter-asyncapi-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-asyncapi-json-2
@@ -13636,7 +13636,7 @@ __webpack_require__.r(__webpack_exports__);
13636
13636
  /* harmony export */ syntacticAnalysis: () => (/* reexport safe */ _tree_sitter_index_mjs__WEBPACK_IMPORTED_MODULE_5__["default"])
13637
13637
  /* harmony export */ });
13638
13638
  /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55156);
13639
- /* harmony import */ var _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16126);
13639
+ /* harmony import */ var _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20746);
13640
13640
  /* harmony import */ var _native_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38600);
13641
13641
  /* harmony import */ var _tree_sitter_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(34885);
13642
13642
  /* harmony import */ var _tree_sitter_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(19305);
@@ -13681,10 +13681,6 @@ const detect = async (source, {
13681
13681
  * @public
13682
13682
  */
13683
13683
 
13684
- /**
13685
- * @public
13686
- */
13687
-
13688
13684
  /**
13689
13685
  * @public
13690
13686
  */
@@ -19379,6 +19375,9 @@ __webpack_require__.r(__webpack_exports__);
19379
19375
  * @public
19380
19376
  */
19381
19377
  const detect = async source => {
19378
+ if (source.trim().length === 0) {
19379
+ return false;
19380
+ }
19382
19381
  try {
19383
19382
  JSON.parse(source);
19384
19383
  return true;
@@ -19391,9 +19390,12 @@ const detect = async source => {
19391
19390
  * @public
19392
19391
  */
19393
19392
  const parse = async source => {
19393
+ const parseResult = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__["default"]();
19394
+ if (source.trim().length === 0) {
19395
+ return parseResult;
19396
+ }
19394
19397
  const pojo = JSON.parse(source);
19395
19398
  const element = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.refract)(pojo);
19396
- const parseResult = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__["default"]();
19397
19399
  element.classes.push('result');
19398
19400
  parseResult.push(element);
19399
19401
  return parseResult;
@@ -43034,7 +43036,11 @@ const detectionRegExp = /"asyncapi"\s*:\s*"(?<version_json>2\.(?:[1-9]\d*|0)\.(?
43034
43036
  /**
43035
43037
  * @public
43036
43038
  */
43037
- const detect = async source => detectionRegExp.test(source) && (await (0,_speclynx_apidom_parser_adapter_json__WEBPACK_IMPORTED_MODULE_4__.detect)(source));
43039
+ const detect = async (source, options = {}) => detectionRegExp.test(source) && (await (0,_speclynx_apidom_parser_adapter_json__WEBPACK_IMPORTED_MODULE_4__.detect)(source, options));
43040
+
43041
+ /**
43042
+ * @public
43043
+ */
43038
43044
 
43039
43045
  /**
43040
43046
  * @public