simple-nunjucks-loader
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -34,3 +34,9 @@ "use strict"; | ||
if (part.startsWith('"')) { | ||
return (0, _loaderUtils.stringifyRequest)(loaderContext, part.replace(/^"|"$/g, '')); | ||
let nextPart = (0, _loaderUtils.stringifyRequest)(loaderContext, part.replace(/^"|"$/g, '')); | ||
if (!nextPart.endsWith('/"') && part.endsWith('/"')) { | ||
nextPart = nextPart.replace(/"$/, '/"'); | ||
} | ||
return nextPart; | ||
} | ||
@@ -37,0 +43,0 @@ |
@@ -19,3 +19,3 @@ "use strict"; | ||
function loadAddon([name, importPath]) { | ||
return Promise.resolve().then(() => _interopRequireWildcard(require(`${importPath}`))).then(function (instance) { | ||
return Promise.resolve(`${importPath}`).then(s => _interopRequireWildcard(require(s))).then(function (instance) { | ||
return [name, importPath, (0, _getModule.getModule)(instance)]; | ||
@@ -22,0 +22,0 @@ }); |
@@ -17,4 +17,8 @@ "use strict"; | ||
const filePath = _path.default.resolve(searchPath, (0, _unquote.unquote)(firstPart)); | ||
let filePath = _path.default.resolve(searchPath, (0, _unquote.unquote)(firstPart)); | ||
if (firstPart.endsWith('/"') && !filePath.endsWith('/')) { | ||
filePath = `${filePath}/`; | ||
} | ||
return restParts.length > 0 ? `${[`"${filePath}"`, ...restParts].join(' + ')}` : filePath; | ||
@@ -21,0 +25,0 @@ } |
{ | ||
"name": "simple-nunjucks-loader", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Webpack loader for Nunjucks", | ||
@@ -15,3 +15,3 @@ "main": "lib/cjs/loader.js", | ||
"postversion": "git push && git push --tags", | ||
"prepublishOnly": "npm run build" | ||
"prepack": "npm run build" | ||
}, | ||
@@ -18,0 +18,0 @@ "repository": { |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
62897
2851
1401
0