Skip to content

Commit

Permalink
chore: update js-yaml dependency (#61)
Browse files Browse the repository at this point in the history
Fixes #59
  • Loading branch information
snitin315 committed Nov 5, 2021
1 parent b657cea commit 731fa49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/config-array-factory.js
Expand Up @@ -162,7 +162,7 @@ function loadYAMLConfigFile(filePath) {
try {

// empty YAML file can be null, so always use
return yaml.safeLoad(readFile(filePath)) || {};
return yaml.load(readFile(filePath)) || {};
} catch (e) {
debug(`Error reading YAML file: ${filePath}`);
e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
Expand Down Expand Up @@ -208,7 +208,7 @@ function loadLegacyConfigFile(filePath) {
const yaml = require("js-yaml");

try {
return yaml.safeLoad(stripComments(readFile(filePath))) || /* istanbul ignore next */ {};
return yaml.load(stripComments(readFile(filePath))) || /* istanbul ignore next */ {};
} catch (e) {
debug("Error reading YAML file: %s\n%o", filePath, e);
e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -71,7 +71,7 @@
"globals": "^13.9.0",
"ignore": "^4.0.6",
"import-fresh": "^3.2.1",
"js-yaml": "^3.13.1",
"js-yaml": "^4.1.0",
"minimatch": "^3.0.4",
"strip-json-comments": "^3.1.1"
},
Expand Down

0 comments on commit 731fa49

Please sign in to comment.