@travetto/manifest 4.0.2 → 4.1.0

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/manifest",
3
- "version": "4.0.2",
3
+ "version": "4.1.0",
4
4
  "description": "Support for project indexing, manifesting, along with file watching",
5
5
  "keywords": [
6
6
  "path",
package/src/module.ts CHANGED
@@ -184,7 +184,8 @@ export class ManifestModuleUtil {
184
184
  * Convert file (by ext) to a known file type and also retrieve its latest timestamp
185
185
  */
186
186
  static async transformFile(moduleFile: string, full: string): Promise<ManifestModuleFile> {
187
- const res: ManifestModuleFile = [moduleFile, this.getFileType(moduleFile), this.#getNewest(await fs.stat(full))];
187
+ const updated = this.#getNewest(await fs.stat(full).catch(() => ({ mtimeMs: 0, ctimeMs: 0 })));
188
+ const res: ManifestModuleFile = [moduleFile, this.getFileType(moduleFile), updated];
188
189
  const role = this.getFileRole(moduleFile);
189
190
  return role ? [...res, role] : res;
190
191
  }
@@ -2,7 +2,9 @@ import type { ManifestModuleFileType, ManifestModuleFolderType, ManifestModuleRo
2
2
  import type { ManifestContext } from './context';
3
3
  import { Package } from './package';
4
4
 
5
- export type ManifestModuleFile = [string, ManifestModuleFileType, number] | [string, ManifestModuleFileType, number, ManifestModuleRole];
5
+ export type ManifestModuleFile =
6
+ [path: string, type: ManifestModuleFileType, updated: number] |
7
+ [path: string, type: ManifestModuleFileType, updated: number, role: ManifestModuleRole];
6
8
 
7
9
  export type ManifestDepCore = {
8
10
  /** Package name */