diff --git a/CHANGELOG.md b/CHANGELOG.md index 5989289..d64938a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +4.0.1 / 2021-08-20 +================== + * Debug version to investigate issue with `js-yaml` & `js-yaml-js-types` + 4.0.0 / 2021-07-04 ================== * Dropped support of CoffeeScript **(breaking change)** diff --git a/lib/readfile.js b/lib/readfile.js index 2985331..f8b4f73 100644 --- a/lib/readfile.js +++ b/lib/readfile.js @@ -14,7 +14,11 @@ module.exports = function(file) { if (ext.match(/ya?ml/)) { var res = fs.readFileSync(file, 'utf8'); var yaml = require('js-yaml'); - var schema = yaml.DEFAULT_SCHEMA.extend(require('js-yaml-js-types').regexp); + var REGEXP_TYPE = require('js-yaml-js-types').regexp; + if (!(REGEXP_TYPE instanceof yaml.Type)) { + console.warn('Invalid js-yaml extension type type:', REGEXP_TYPE); + } + var schema = yaml.DEFAULT_SCHEMA.extend(REGEXP_TYPE); return yaml.load(res, { schema: schema }); } diff --git a/package.json b/package.json index 12d4c21..fac8a68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "load-grunt-config", - "version": "4.0.0", + "version": "4.0.1", "description": "Grunt plugin that lets you break up your Gruntfile config by task", "main": "index.js", "scripts": {