@swagger-api/apidom-parser-adapter-yaml-1-2 0.70.3 → 0.71.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,17 @@
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
+ # [0.71.0](https://github.com/swagger-api/apidom/compare/v0.70.4...v0.71.0) (2023-07-13)
7
+
8
+
9
+ ### Features
10
+
11
+ * add better YAML syntax error messages ([#2931](https://github.com/swagger-api/apidom/issues/2931)) ([5a1d14a](https://github.com/swagger-api/apidom/commit/5a1d14a179da60df666a18e6ae04155c1065bddd)), closes [#2914](https://github.com/swagger-api/apidom/issues/2914) [#2889](https://github.com/swagger-api/apidom/issues/2889)
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.70.3](https://github.com/swagger-api/apidom/compare/v0.70.2...v0.70.3) (2023-06-27)
7
18
 
8
19
  ### Bug Fixes
@@ -232,7 +232,7 @@ const CstVisitor = (0, _stampit.default)({
232
232
  enter(node) {
233
233
  var _node$firstNamedChild;
234
234
  const position = toPosition(node);
235
- const version = (node === null || node === void 0 ? void 0 : (_node$firstNamedChild = node.firstNamedChild) === null || _node$firstNamedChild === void 0 ? void 0 : _node$firstNamedChild.text) || null;
235
+ const version = (node === null || node === void 0 || (_node$firstNamedChild = node.firstNamedChild) === null || _node$firstNamedChild === void 0 ? void 0 : _node$firstNamedChild.text) || null;
236
236
  return (0, _apidomAst.YamlDirective)({
237
237
  position,
238
238
  name: '%YAML',
@@ -158,7 +158,7 @@ const YamlAstVisitor = (0, _stampit.default)({
158
158
  return null;
159
159
  };
160
160
  this.error = function error(node, key, parent, path) {
161
- const message = node.isUnexpected ? `(Unexpected ${node.value})` : `(Error ${node.value})`;
161
+ const message = node.isUnexpected ? '(Unexpected YAML syntax error)' : '(Error YAML syntax error)';
162
162
  const element = new _apidomCore.AnnotationElement(message);
163
163
  element.classes.push('error');
164
164
  maybeAddSourceMap(node, element);