We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7949590 commit a79f0d4Copy full SHA for a79f0d4
loadSync.js
@@ -100,7 +100,7 @@ function _import (file) {
100
// How do we handle file by type
101
const mapping = {
102
'.json': fs.readJsonSync,
103
- '.yml' : yaml.load.bind(yaml),
+ '.yml' : _loadYml,
104
'.js' : require,
105
'.node': require
106
};
@@ -118,6 +118,10 @@ function _import (file) {
118
return result;
119
}
120
121
+function _loadYml(file){
122
+ return yaml.parse(fs.readFileSync(file, {encoding:'utf8'}));
123
+}
124
+
125
function importCircularReferenceException (importedYamlFile, yamlFile) {
126
let err = new Error(`Circular reference detected importing ${importedYamlFile} in ${yamlFile}`);
127
err.name = 'importCircularReferenceException';
0 commit comments