@travetto/base
Advanced tools
Comparing version 0.0.85 to 0.0.86
@@ -15,6 +15,10 @@ #!/usr/bin/env node | ||
// Delete old cached files | ||
const LOADED = {}; | ||
for (const f of fs.readdirSync(CACHE_DIR)) { | ||
const full = f.replace(CACHE_SEP_RE, '/'); | ||
if (fs.statSync(`${CACHE_DIR}/${f}`).ctimeMs < fs.statSync(full).ctimeMs) { | ||
fs.unlinkSync(`${CACHE_DIR}/${f}`); | ||
const rel = `${CACHE_DIR}/${f}`; | ||
const stat = LOADED[rel] = fs.statSync(rel); | ||
if (stat.ctimeMs < fs.statSync(full).ctimeMs) { | ||
fs.unlinkSync(rel); | ||
delete LOADED[rel]; | ||
} | ||
@@ -27,3 +31,3 @@ } | ||
let content; | ||
if (!fs.existsSync(name)) { | ||
if (!LOADED[name]) { | ||
content = ts.transpile(fs.readFileSync(tsf, 'utf-8'), opts); | ||
@@ -30,0 +34,0 @@ fs.writeFileSync(name, content); |
@@ -22,3 +22,3 @@ { | ||
"scripts": {}, | ||
"version": "0.0.85" | ||
"version": "0.0.86" | ||
} |
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
32007
952