@travetto/compiler
Advanced tools
Comparing version 0.4.5 to 0.4.6
@@ -13,5 +13,5 @@ { | ||
"dependencies": { | ||
"@travetto/base": "^0.4.4", | ||
"@travetto/base": "^0.4.7", | ||
"@types/source-map-support": "^0.4.1", | ||
"source-map-support": "^0.5.6", | ||
"source-map-support": "^0.5.9", | ||
"string-hash": "^1.1.3" | ||
@@ -37,3 +37,4 @@ }, | ||
}, | ||
"version": "0.4.5" | ||
} | ||
"version": "0.4.6", | ||
"gitHead": "57ee4da983bfa3f2a7e3dac6a24ed0f4af5f71c2" | ||
} |
@@ -14,5 +14,10 @@ import * as path from 'path'; | ||
files = new Map<string, { version: number }>(); | ||
seen = new Set(); | ||
seen = new Set<string>(); | ||
watchSpaces = new Set<string>(); | ||
constructor(private cwd: string, private listener: Listener, private excludeFiles: RegExp[], private watch: boolean = Env.watch) { | ||
this.watchSpaces.add('src'); | ||
if (Env.e2e) { | ||
this.watchSpaces.add('e2e'); | ||
} | ||
} | ||
@@ -72,5 +77,4 @@ | ||
console.debug('Watching files', rootFiles.length); | ||
this.buildWatcher(path.join(this.cwd, 'src'), [{ testFile: x => this.validFile(x) && x.endsWith('.ts') }]); | ||
if (Env.e2e) { | ||
this.buildWatcher(path.join(this.cwd, 'e2e'), [{ testFile: x => this.validFile(x) && x.endsWith('.ts') }]); | ||
for (const p of this.watchSpaces) { | ||
this.buildWatcher(path.join(this.cwd, p), [{ testFile: x => this.validFile(x) && x.endsWith('.ts') }]); | ||
} | ||
@@ -100,5 +104,6 @@ }, 1000); | ||
if (this.watch) { | ||
// Only watch workspace files, not node_modules | ||
if (this.watch && !name.includes('node_modules')) { | ||
// Already known to be a used file, just don't watch node modules | ||
const topLevel = path.dirname(name); | ||
if (!this.fileWatchers[topLevel]) { | ||
@@ -109,2 +114,3 @@ this.fileWatchers[topLevel] = this.buildWatcher(topLevel, []); | ||
} | ||
this.files.set(name, { version: 0 }); | ||
@@ -111,0 +117,0 @@ this.listener.added(name); |
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
37560
939
Updated@travetto/base@^0.4.7
Updatedsource-map-support@^0.5.9