enablement-build-monorepo-version 8.4.0 → 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.
- package/package.json +1 -1
- package/src/index.mjs +9 -2
- package/src/version.mjs +5 -10
package/package.json
CHANGED
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
|
-
|
|
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
|
-
|
|
266
|
+
console.error('hashing failed:', error);
|
|
267
|
+
resolve("OK");
|
|
261
268
|
});
|
|
262
269
|
}));
|
|
263
270
|
});
|
package/src/version.mjs
CHANGED
|
@@ -134,18 +134,13 @@ function readCommitMessagesSinceTag(imageName, lastVersion, args, options) {
|
|
|
134
134
|
|
|
135
135
|
const baseTag = findBaseTag(imageName, lastVersion);
|
|
136
136
|
if (!baseTag) {
|
|
137
|
+
// No release tag to diff against — scanning full project history would pick up
|
|
138
|
+
// unrelated feat/refactor commits from long before the last release and cause
|
|
139
|
+
// an incorrect minor/major jump. Default to a patch bump instead.
|
|
137
140
|
if (options.debug) {
|
|
138
|
-
console.log('\x1b[33m%s\x1b[0m', `No matching base tag found for ${imageName}@${lastVersion};
|
|
139
|
-
}
|
|
140
|
-
const fallbackCmd = hasScope
|
|
141
|
-
? `git log HEAD --pretty=%B --no-merges -- "${scopePath}"`
|
|
142
|
-
: `git log HEAD --pretty=%B --no-merges`;
|
|
143
|
-
|
|
144
|
-
try {
|
|
145
|
-
return execSync(fallbackCmd, { encoding: 'utf8' }).trim();
|
|
146
|
-
} catch {
|
|
147
|
-
return '';
|
|
141
|
+
console.log('\x1b[33m%s\x1b[0m', `No matching base tag found for ${imageName}@${lastVersion}; defaulting to patch bump.`);
|
|
148
142
|
}
|
|
143
|
+
return '';
|
|
149
144
|
}
|
|
150
145
|
|
|
151
146
|
const cmd = hasScope
|