enablement-build-monorepo-version 8.2.0 → 8.3.1
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 +2 -2
- package/src/index.mjs +2 -1
- package/tests/index.test.mjs +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "enablement-build-monorepo-version",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.1",
|
|
4
4
|
"description": "This detects changes in the children packages of a monorepo.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./src/index.mjs",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"enablement-build-manifest": "1.
|
|
17
|
+
"enablement-build-manifest": "1.8.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"jest": "^30.4.2"
|
package/src/index.mjs
CHANGED
|
@@ -65,7 +65,8 @@ async function collectPackageEntries(prefixPath, scanFolder, packageFolder, hash
|
|
|
65
65
|
|
|
66
66
|
const versionInfo = getCurrentVersion(prefixPath, scanFolder, name);
|
|
67
67
|
if (versionInfo.fullName) {
|
|
68
|
-
|
|
68
|
+
const packageHash = await hashElement(childPath, hashOptions);
|
|
69
|
+
current[name] = { hash: packageHash.hash, ...versionInfo, packageFolder };
|
|
69
70
|
continue;
|
|
70
71
|
}
|
|
71
72
|
|
package/tests/index.test.mjs
CHANGED
|
@@ -228,11 +228,8 @@ describe("index CLI nested workspace roots", () => {
|
|
|
228
228
|
"utf8",
|
|
229
229
|
);
|
|
230
230
|
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
[cliPath, "--hash", "--changed", "--children", "ux", "--prefixPath", root],
|
|
234
|
-
{ cwd: repoRoot, encoding: "utf8" },
|
|
235
|
-
);
|
|
231
|
+
const args = [cliPath, "--hash", "--changed", "--children", "ux", "--prefixPath", root];
|
|
232
|
+
const stdout = execFileSync("node", args, { cwd: repoRoot, encoding: "utf8" });
|
|
236
233
|
|
|
237
234
|
const changedMatch = stdout.match(/CHANGED - (\[[^\n]*\])/);
|
|
238
235
|
expect(changedMatch).not.toBeNull();
|
|
@@ -241,6 +238,10 @@ describe("index CLI nested workspace roots", () => {
|
|
|
241
238
|
const hashJson = JSON.parse(readFileSync(path.join(root, ".cicd", "hash.json"), "utf8"));
|
|
242
239
|
expect(hashJson.hash["@scope/profile"]).toBeTruthy();
|
|
243
240
|
expect(hashJson.hash.undefined).toBeUndefined();
|
|
241
|
+
|
|
242
|
+
const secondOutput = execFileSync("node", args, { cwd: repoRoot, encoding: "utf8" });
|
|
243
|
+
const secondChanged = secondOutput.match(/CHANGED - (\[[^\n]*\])/);
|
|
244
|
+
expect(JSON.parse(secondChanged[1])).toEqual([]);
|
|
244
245
|
} finally {
|
|
245
246
|
rmSync(root, { recursive: true, force: true });
|
|
246
247
|
}
|