@travetto/manifest 8.0.0-alpha.2 → 8.0.0-alpha.3
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 +3 -3
- package/src/delta.ts +1 -1
- package/src/module.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/manifest",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Support for project indexing, manifesting, along with file watching",
|
|
6
6
|
"keywords": [
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
],
|
|
23
23
|
"main": "__index__.ts",
|
|
24
24
|
"engines": {
|
|
25
|
-
"node": ">=25.
|
|
25
|
+
"node": ">=25.7.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@types/node": "^25.
|
|
28
|
+
"@types/node": "^25.4.0"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"url": "git+https://github.com/travetto/travetto.git",
|
package/src/delta.ts
CHANGED
|
@@ -48,7 +48,7 @@ export class ManifestDeltaUtil {
|
|
|
48
48
|
for (const file of Object.keys(left.files)) {
|
|
49
49
|
const output = ManifestModuleUtil.withOutputExtension(`${outputFolder}/${left.outputFolder}/${file}`);
|
|
50
50
|
const [, , leftTimestamp] = left.files[file];
|
|
51
|
-
const stat = await fs.stat(output
|
|
51
|
+
const stat = await fs.stat(output, { throwIfNoEntry: false });
|
|
52
52
|
right.delete(ManifestModuleUtil.withoutSourceExtension(file));
|
|
53
53
|
|
|
54
54
|
if (!stat) {
|
package/src/module.ts
CHANGED
|
@@ -70,7 +70,7 @@ export class ManifestModuleUtil {
|
|
|
70
70
|
return this.#scanCache[key];
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
if (!await fs.stat(folder
|
|
73
|
+
if (!await fs.stat(folder, { throwIfNoEntry: false })) {
|
|
74
74
|
return [];
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -94,7 +94,7 @@ export class ManifestModuleUtil {
|
|
|
94
94
|
const [top, depth] = popped;
|
|
95
95
|
|
|
96
96
|
// Don't navigate into sub-folders with package.json's
|
|
97
|
-
if (top !== folder && await fs.stat(`${top}/package.json
|
|
97
|
+
if (top !== folder && await fs.stat(`${top}/package.json`, { throwIfNoEntry: false })) {
|
|
98
98
|
continue;
|
|
99
99
|
} else if (exclude.has(top)) {
|
|
100
100
|
continue;
|
|
@@ -197,7 +197,7 @@ export class ManifestModuleUtil {
|
|
|
197
197
|
* Convert file (by ext) to a known file type and also retrieve its latest timestamp
|
|
198
198
|
*/
|
|
199
199
|
static async transformFile(moduleFile: string, full: string): Promise<ManifestModuleFile> {
|
|
200
|
-
const updated = this.#getNewest(await fs.stat(full)
|
|
200
|
+
const updated = this.#getNewest(await fs.stat(full, { throwIfNoEntry: false }) ?? { mtimeMs: 0, ctimeMs: 0 });
|
|
201
201
|
const moduleFileTuple: ManifestModuleFile = [moduleFile, this.getFileType(moduleFile), updated];
|
|
202
202
|
const role = this.getFileRole(moduleFile);
|
|
203
203
|
return role ? [...moduleFileTuple, role] : moduleFileTuple;
|