Skip to content

Commit

Permalink
feat: Disable aliasDuplicateObjects by default (#155)
Browse files Browse the repository at this point in the history
* feat: Disable aliasDuplicateObjects by default

Anchors are created by default to deduplicate parts of the generated YAML, which makes it harder to read.

Removing them makes pipelines more "human readable".
  • Loading branch information
timo-reymann committed Oct 26, 2022
1 parent 29299f2 commit 80c13b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/Config/index.ts
Expand Up @@ -224,11 +224,12 @@ export class Config
*/
stringify(flatten?: boolean, options?: YAML.ToStringOptions): string {
const generatedConfig = this.generate(flatten);
const defaultOptions: YAML.ToStringOptions = {
const defaultOptions: YAML.ToStringOptions & YAML.CreateNodeOptions = {
aliasDuplicateObjects: false,
defaultStringType: YAML.Scalar.PLAIN,
doubleQuotedMinMultiLineLength: 999,
lineWidth: 0,
minContentWidth: 0,
doubleQuotedMinMultiLineLength: 999,
};
return this._prependVersionComment(
YAML.stringify(generatedConfig, options ?? defaultOptions),
Expand Down

0 comments on commit 80c13b9

Please sign in to comment.