@travetto/base
Advanced tools
Comparing version 0.0.84 to 0.0.85
@@ -10,9 +10,10 @@ #!/usr/bin/env node | ||
const CACHE_DIR = `${process.cwd()}/build`; | ||
const CACHE_DIR = (process.env.TS_CACHE_DIR = process.env.TS_CACHE_DIR || `${process.cwd()}/build`); | ||
const CACHE_SEP = (process.env.TS_CACHE_SEP = process.env.TS_CACHE_SEP || `~`); | ||
const CACHE_SEP_RE = new RegExp(CACHE_SEP, 'g'); | ||
// Delete old cached files | ||
for (const f of fs.readdirSync(CACHE_DIR)) { | ||
const full = f.replace(/~/g, '/'); | ||
const full = f.replace(CACHE_SEP_RE, '/'); | ||
if (fs.statSync(`${CACHE_DIR}/${f}`).ctimeMs < fs.statSync(full).ctimeMs) { | ||
console.debug('Removing stale cached file', full); | ||
fs.unlinkSync(`${CACHE_DIR}/${f}`); | ||
@@ -24,3 +25,3 @@ } | ||
require.extensions['.ts'] = function load(m, tsf) { | ||
const name = `${CACHE_DIR}/${tsf.replace(/[\/\\]/g, '~')}`; | ||
const name = `${CACHE_DIR}/${tsf.replace(/[\/\\]/g, CACHE_SEP)}`; | ||
let content; | ||
@@ -27,0 +28,0 @@ if (!fs.existsSync(name)) { |
@@ -22,3 +22,3 @@ { | ||
"scripts": {}, | ||
"version": "0.0.84" | ||
"version": "0.0.85" | ||
} |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
31933
948
6