@travetto/compiler 8.0.0-alpha.3 → 8.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/compiler",
3
- "version": "8.0.0-alpha.3",
3
+ "version": "8.0.0-alpha.4",
4
4
  "type": "module",
5
5
  "description": "The compiler infrastructure for the Travetto framework",
6
6
  "keywords": [
package/src/compiler.ts CHANGED
@@ -164,7 +164,9 @@ export class Compiler {
164
164
  log.error(`ERROR ${event.file}:${error}`);
165
165
  }
166
166
  // Touch file to ensure recompilation later
167
- await fs.utimes(event.file, new Date(), new Date());
167
+ if (await fs.stat(event.file, { throwIfNoEntry: false })) {
168
+ await fs.utimes(event.file, new Date(), new Date());
169
+ }
168
170
  }
169
171
  metrics.push(event);
170
172
  }
package/src/state.ts CHANGED
@@ -177,7 +177,14 @@ export class CompilerState implements CompilerHost {
177
177
  .filter(d => d.category === ts.DiagnosticCategory.Error)
178
178
  .map(diag => {
179
179
  let message = ts.flattenDiagnosticMessageText(diag.messageText, '\n');
180
- if (message.includes('rootDir') || message.includes('EnvDataCombinedType')) {
180
+ if (
181
+ message.includes("is not under 'rootDir'")
182
+ || message.includes("does not exist on type 'EnvDataCombinedType'")
183
+ || message.startsWith('Could not find a declaration file for module')
184
+ || message.startsWith("Cannot find module '@travetto")
185
+ || message.startsWith("This JSX tag requires the module path '@travetto")
186
+ || message.startsWith("JSX element implicitly has type 'any'")
187
+ ) {
181
188
  return '';
182
189
  }
183
190
  if (diag.file) {