@swagger-api/apidom-core
Advanced tools
Comparing version 0.69.1 to 0.69.2
@@ -6,2 +6,8 @@ # Change Log | ||
## [0.69.2](https://github.com/swagger-api/apidom/compare/v0.69.1...v0.69.2) (2023-04-03) | ||
### Bug Fixes | ||
- **core:** fix issues in YAML 1.2 serialization ([#2669](https://github.com/swagger-api/apidom/issues/2669)) ([6cc91fb](https://github.com/swagger-api/apidom/commit/6cc91fb0edd6b47fe3e8656539f0f655a5f79c3f)) | ||
## [0.69.1](https://github.com/swagger-api/apidom/compare/v0.69.0...v0.69.1) (2023-03-28) | ||
@@ -8,0 +14,0 @@ |
@@ -11,9 +11,7 @@ import stampit from 'stampit'; | ||
init({ | ||
signature = '', | ||
indent = 0, | ||
indentChar = ' ' | ||
directive = false, | ||
indent = 0 | ||
} = {}) { | ||
this.result = signature; | ||
this.result = directive ? '%YAML 1.2\n---\n' : ''; | ||
this.indent = indent; | ||
this.indentChard = indentChar; | ||
}, | ||
@@ -49,3 +47,3 @@ methods: { | ||
} = visitor; | ||
this.result += result.startsWith('\n') ? `\n${indent}-${visitor.result}` : `\n${indent}- ${visitor.result}`; | ||
this.result += result.startsWith('\n') ? `\n${indent}-${result}` : `\n${indent}- ${result}`; | ||
}); | ||
@@ -81,6 +79,7 @@ return false; | ||
}); | ||
const serializer = element => { | ||
const signature = '%YAML 1.2\n---\n'; | ||
const serializer = (element, { | ||
directive = false | ||
} = {}) => { | ||
const visitor = YamlVisitor({ | ||
signature | ||
directive | ||
}); | ||
@@ -87,0 +86,0 @@ visit(element, visitor); |
{ | ||
"name": "@swagger-api/apidom-core", | ||
"version": "0.69.1", | ||
"version": "0.69.2", | ||
"description": "Tools for manipulating ApiDOM structures.", | ||
@@ -64,3 +64,3 @@ "publishConfig": { | ||
], | ||
"gitHead": "977837b2e93c600fe09ded688cd67c5ee2a782d5" | ||
"gitHead": "fcd0f16e6cddd1593e3d74c79be4f27fa49d4f1b" | ||
} |
@@ -249,3 +249,5 @@ /// <reference path="./minim.d.ts" /> | ||
*/ | ||
declare const toYAML: (element: Element) => string; | ||
declare const toYAML: (element: Element, { directive }?: { | ||
directive?: boolean | undefined; | ||
}) => string; | ||
/** | ||
@@ -252,0 +254,0 @@ * Creates a refract representation of an Element. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1313422
28436