Skip to content

Commit 7512b1b

Browse files
committed
refactor: update yaml api
1 parent 9718a9d commit 7512b1b

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/debian-repository.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ export default class DebianRepository {
506506
"filter": path => path === "./control",
507507
"onentry": entry => {
508508
entry.on( "data", data => {
509-
const control = yaml.parse( data );
509+
const control = yaml.fromYaml( data );
510510

511511
const match = control.Version.match( /^(?:(\d+):)?([\d.]+)(?:-(\d+))?$/ );
512512

lib/get-text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export default class GetText {
159159
this.#parseEjs( template );
160160
};
161161

162-
yaml.parse( content, { "all": true, locale, ejs } );
162+
yaml.fromYaml( content, { "all": true, locale, ejs } );
163163
}
164164

165165
#parseEjs ( content, { start } = {} ) {

lib/package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ export default class Package {
14221422
200,
14231423
new File( {
14241424
"path": "/.github/" + filename,
1425-
"buffer": yaml.stringify( config ),
1425+
"buffer": yaml.toYaml( config ),
14261426
} )
14271427
);
14281428
}

lib/package/docs/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export default class Options {
182182
let config;
183183

184184
try {
185-
config = yaml.parse( await res.text() );
185+
config = yaml.fromYaml( await res.text() );
186186
}
187187
catch {
188188
throw `Unable to parse: ${ url.href }`;

0 commit comments

Comments
 (0)