include-all
Advanced tools
Comparing version 3.0.1 to 4.0.0
@@ -115,2 +115,9 @@ /** | ||
if (dictionary[keyName] && !options.allowDuplicateKeys) { | ||
var e = new Error('Duplicate filename detected: `include-all` attempted to load two files named `' + keyName + '` (case-insensitive).'); | ||
e.code = 'include-all:DUPLICATE'; | ||
e.duplicateIdentity = keyName; | ||
throw e; | ||
} | ||
// >- | ||
@@ -117,0 +124,0 @@ // Now save the module's contents (or `true`, if the `dontLoad` option is set) |
@@ -62,2 +62,6 @@ /** | ||
* | ||
* @optional {Boolean} allowDuplicateKeys | ||
* When set, duplicate keys will override each other. Otherwise, duplicate keys will result in an error. | ||
* @default false | ||
* | ||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
@@ -218,3 +222,3 @@ * @return {Dictionary} | ||
else { | ||
if (_modules[grandchildKey]) { throw new Error('Attempting to flatten modules but duplicate key detected (`'+grandchildKey+'`). Enable `keepDirectoryPath: true` to enable namepspacing based on hierarchy.'); } | ||
if (_modules[grandchildKey]) { throw new Error('Attempting to flatten modules but duplicate key detected (`'+grandchildKey+'`). Enable `keepDirectoryPath: true` to enable namespacing based on hierarchy.'); } | ||
_modules[grandchildKey] = rhs; | ||
@@ -221,0 +225,0 @@ } |
{ | ||
"name": "include-all", | ||
"version": "3.0.1", | ||
"version": "4.0.0", | ||
"description": "An easy way to include all node.js modules within a directory.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35680
509