Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@travetto/base

Package Overview
Dependencies
Maintainers
1
Versions
357
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/base - npm Package Compare versions

Comparing version 0.0.83 to 0.0.84

21

bin/travetto.js

@@ -10,4 +10,23 @@ #!/usr/bin/env node

const CACHE_DIR = `${process.cwd()}/build`;
// Delete old cached files
for (const f of fs.readdirSync(CACHE_DIR)) {
const full = f.replace(/~/g, '/');
if (fs.statSync(`${CACHE_DIR}/${f}`).ctimeMs < fs.statSync(full).ctimeMs) {
console.debug('Removing stale cached file', full);
fs.unlinkSync(`${CACHE_DIR}/${f}`);
}
}
// Cache on require
require.extensions['.ts'] = function load(m, tsf) {
const content = ts.transpile(fs.readFileSync(tsf, 'utf-8'), opts);
const name = `${CACHE_DIR}/${tsf.replace(/[\/\\]/g, '~')}`;
let content;
if (!fs.existsSync(name)) {
content = ts.transpile(fs.readFileSync(tsf, 'utf-8'), opts);
fs.writeFileSync(name, content);
} else {
content = fs.readFileSync(name).toString();
}
return m._compile(content, tsf.replace(/\.ts$/, '.js'));

@@ -14,0 +33,0 @@ };

2

package.json

@@ -22,3 +22,3 @@ {

"scripts": {},
"version": "0.0.83"
"version": "0.0.84"
}

@@ -11,6 +11,7 @@ import * as fs from 'fs';

testDir: x => {
return !x.includes('node_modules') || (
x.endsWith('node_modules') ||
x.includes('@travetto')
)
return x !== 'build' &&
(!x.includes('node_modules') || (
x.endsWith('node_modules') ||
x.includes('@travetto'))
)
}

@@ -17,0 +18,0 @@ }, process.cwd())

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc