enablement-build-monorepo-version 8.4.1 → 8.4.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.mjs +9 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enablement-build-monorepo-version",
3
- "version": "8.4.1",
3
+ "version": "8.4.2",
4
4
  "description": "This detects changes in the children packages of a monorepo.",
5
5
  "type": "module",
6
6
  "module": "./src/index.mjs",
package/src/index.mjs CHANGED
@@ -196,7 +196,13 @@ async function main(options) {
196
196
  let children = options.children.replace(/\s/g, ",");
197
197
  children.split(',').forEach((packageFolder) => {
198
198
  scanlist.push(new Promise((resolve, reject) => {
199
- hashElement(path.join(options.prefixPath, packageFolder), hashOptions).then(async hash => {
199
+ const folderPath = path.join(options.prefixPath, packageFolder);
200
+ if (!existsSync(folderPath)) {
201
+ console.log('\x1b[33m%s\x1b[0m', `Warning: workspace folder "${packageFolder}" does not exist, skipping`);
202
+ resolve("OK");
203
+ return;
204
+ }
205
+ hashElement(folderPath, hashOptions).then(async hash => {
200
206
  const children = hash.children;
201
207
  if (options.debug) console.log("HASH", JSON.stringify(children));
202
208
 
@@ -257,7 +263,8 @@ async function main(options) {
257
263
  resolve("OK");
258
264
  })
259
265
  .catch(error => {
260
- return console.error('hashing failed:', error);
266
+ console.error('hashing failed:', error);
267
+ resolve("OK");
261
268
  });
262
269
  }));
263
270
  });