Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion legacy/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const loadCacheFile = file => {
*/
const loadLandoFile = file => {
try {
return yaml.safeLoad(fs.readFileSync(file));
return yaml.load(fs.readFileSync(file));
} catch (e) {
throw new Error(`There was a problem with parsing ${file}. Ensure it is valid YAML! ${e}`);
}
Expand Down
2 changes: 1 addition & 1 deletion legacy/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ exports.loadFiles = files => _(files)
.filter(source => fs.existsSync(source) || fs.existsSync(source.file))
// If the file is just a string lets map it to an object
.map(source => {
return _.isString(source) ? {file: source, data: yaml.safeLoad(fs.readFileSync(source))} : source;
return _.isString(source) ? {file: source, data: yaml.load(fs.readFileSync(source))} : source;
})
// Add on the root directory for mapping purposes
.map(source => _.merge({}, source, {root: path.dirname(source.file)}))
Expand Down
4 changes: 2 additions & 2 deletions legacy/yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = class Yaml {
*/
load(file) {
try {
return yaml.safeLoad(fs.readFileSync(file));
return yaml.load(fs.readFileSync(file));
} catch (e) {
this.log.error('Problem parsing %s with %s', file, e.message);
}
Expand All @@ -49,7 +49,7 @@ module.exports = class Yaml {
// Remove any properties that might be bad and dump
data = JSON.parse(JSON.stringify(data));
// And dump
fs.writeFileSync(file, yaml.safeDump(data));
fs.writeFileSync(file, yaml.dump(data));
// Log and return filename
return file;
}
Expand Down