@travetto/manifest 3.3.1 → 3.3.2

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/README.md CHANGED
@@ -85,7 +85,7 @@ Once the manifest is created, the application runtime can now read this manifest
85
85
  * Providing contextual information when provided a filename, import name, etc (e.g. logging, testing output)
86
86
 
87
87
  ## Path Normalization
88
- By default, all paths within the framework are assumed to be in a POSIX style, and all input paths are converted to the POSIX style. This works appropriately within a Unix and a Windows environment. This module offers up [path](https://github.com/travetto/travetto/tree/main/module/manifest/src/path.ts#L8) as an equivalent to [Node](https://nodejs.org)'s [http](https://nodejs.org/api/path.html) library. This allows for consistent behavior across all file-interactions, and also allows for easy analysis if [Node](https://nodejs.org)'s [http](https://nodejs.org/api/path.html) library is ever imported.
88
+ By default, all paths within the framework are assumed to be in a POSIX style, and all input paths are converted to the POSIX style. This works appropriately within a Unix and a Windows environment. This module offers up [path](https://github.com/travetto/travetto/tree/main/module/manifest/src/path.ts#L21) as an equivalent to [Node](https://nodejs.org)'s [http](https://nodejs.org/api/path.html) library. This allows for consistent behavior across all file-interactions, and also allows for easy analysis if [Node](https://nodejs.org)'s [http](https://nodejs.org/api/path.html) library is ever imported.
89
89
 
90
90
  ## File Watching
91
91
  The module also leverages [@parcel/watcher](https://www.npmjs.com/package/@parcel/watcher), to expose a single function of `watchFolders`. Only the [Compiler](https://github.com/travetto/travetto/tree/main/module/compiler#readme "The compiler infrastructure for the Travetto framework") module packages [@parcel/watcher](https://www.npmjs.com/package/@parcel/watcher) as a direct dependency. This means, that in production, by default all watch operations will fail with a missing dependency.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/manifest",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "Support for project indexing, manifesting, along with file watching",
5
5
  "keywords": [
6
6
  "path",
package/src/watch.ts CHANGED
@@ -158,6 +158,9 @@ async function watchFolderRecursive(queue: Queue<WatchEvent>, options: WatchFold
158
158
  await fs.mkdir(options.src, { recursive: true });
159
159
  const ignore = (await fs.readdir(options.src)).filter(x => x.startsWith('.') && x.length > 2);
160
160
  const cleanup = await lib.subscribe(options.src, async (err, events) => {
161
+ if (err) {
162
+ process.send?.({ type: 'log', message: `Watch error: ${err}` });
163
+ }
161
164
  for (const ev of events) {
162
165
  const finalEv = { action: ev.type, file: path.toPosix(ev.path), folder: target };
163
166
  if (ev.type !== 'delete') {