yaml-loader
Advanced tools
Comparing version 0.7.0 to 0.8.0
10
index.js
@@ -48,3 +48,11 @@ const { getOptions } = require('loader-utils') | ||
for (const warn of doc.warnings) this.emitWarning(warn) | ||
for (const err of doc.errors) throw err | ||
for (const err of doc.errors) { | ||
if (err.message.includes('Source contains multiple documents')) { | ||
err.message = err.message.replace( | ||
'YAML.parseAllDocuments()', | ||
'yaml-loader asStream option' | ||
) | ||
} | ||
throw err | ||
} | ||
if (namespace) doc.contents = doc.getIn(namespace.split('.')) | ||
@@ -51,0 +59,0 @@ res = doc.toJS(jsOpt) |
{ | ||
"name": "yaml-loader", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"license": "MIT", | ||
@@ -43,8 +43,8 @@ "description": "YAML loader for Webpack", | ||
"devDependencies": { | ||
"jest": "^27.5.1", | ||
"jest": "^28.0.0", | ||
"prettier": "^2.1.1" | ||
}, | ||
"engines": { | ||
"node": ">= 10.14.2" | ||
"node": ">= 12.13" | ||
} | ||
} |
@@ -65,3 +65,2 @@ # yaml-loader for Webpack | ||
test: /\.ya?ml$/, | ||
type: 'json', // Required by Webpack v4 | ||
oneOf: [ | ||
@@ -71,5 +70,5 @@ { | ||
options: { asStream: true }, | ||
use: 'yaml-loader' | ||
loader: 'yaml-loader' | ||
}, | ||
{ use: 'yaml-loader' } | ||
{ loader: 'yaml-loader' } | ||
] | ||
@@ -76,0 +75,0 @@ } |
6336
61
96