@nuxt/utils
Advanced tools
Comparing version 2.6.1 to 2.6.2
/*! | ||
* @nuxt/utils v2.6.1 (c) 2016-2019 | ||
* @nuxt/utils v2.6.2 (c) 2016-2019 | ||
@@ -1861,4 +1861,40 @@ * - All the amazing contributors | ||
function clearRequireCache(id) { | ||
const entry = require.cache[id]; | ||
if (!entry || id.includes('node_modules')) { | ||
return | ||
} | ||
if (entry.parent) { | ||
const i = entry.parent.children.findIndex(e => e.id === id); | ||
if (i > -1) { | ||
entry.parent.children.splice(i, 1); | ||
} | ||
} | ||
for (const child of entry.children) { | ||
clearRequireCache(child.id); | ||
} | ||
delete require.cache[id]; | ||
} | ||
function scanRequireTree(id, files = new Set()) { | ||
const entry = require.cache[id]; | ||
if (!entry || id.includes('node_modules') || files.has(id)) { | ||
return files | ||
} | ||
files.add(entry.id); | ||
for (const child of entry.children) { | ||
scanRequireTree(child.id, files); | ||
} | ||
return files | ||
} | ||
exports.Timer = Timer; | ||
exports.chainFn = chainFn; | ||
exports.clearRequireCache = clearRequireCache; | ||
exports.createLockPath = createLockPath; | ||
@@ -1888,2 +1924,3 @@ exports.createRoutes = createRoutes; | ||
exports.relativeTo = relativeTo; | ||
exports.scanRequireTree = scanRequireTree; | ||
exports.sequence = sequence; | ||
@@ -1890,0 +1927,0 @@ exports.serializeFunction = serializeFunction; |
{ | ||
"name": "@nuxt/utils", | ||
"version": "2.6.1", | ||
"version": "2.6.2", | ||
"repository": "nuxt/nuxt.js", | ||
@@ -11,3 +11,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"consola": "^2.5.8", | ||
"consola": "^2.6.0", | ||
"fs-extra": "^7.0.1", | ||
@@ -14,0 +14,0 @@ "hash-sum": "^1.0.2", |
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
1673
49249
2
Updatedconsola@^2.6.0