enablement-build-manifest 1.4.0 → 1.7.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enablement-build-manifest",
3
- "version": "1.4.0",
3
+ "version": "1.7.0",
4
4
  "description": "This builds a dependency tree.",
5
5
  "type": "module",
6
6
  "module": "./index.mjs",
package/src/hashFile.mjs CHANGED
@@ -6,8 +6,7 @@ import { minimatch } from 'minimatch';
6
6
 
7
7
  // ─── hash.json file handling ─────────────────────────────────────────────────
8
8
  //
9
- // Hashes are always stored in a hash.json file, keyed by short package folder
10
- // name. When the requested --hashFile path points at a manifest.json (legacy
9
+ // Hashes are always stored in a hash.json file, keyed by full package name. When the requested --hashFile path points at a manifest.json (legacy
11
10
  // "manifest mode"), storage is redirected to a sibling hash.json instead of
12
11
  // writing hash data into the manifest.
13
12
  //
@@ -40,7 +39,7 @@ export function ensureHashFileExists(changeConfig, options = {}) {
40
39
  }
41
40
  }
42
41
 
43
- // Load previously-recorded hashes, keyed by short package folder name, as
42
+ // Load previously-recorded hashes, keyed by full package name, as
44
43
  // { name: { hash } }. Understands both the current format (hash values under
45
44
  // a "hash" property) and the legacy flat format, so callers never need to
46
45
  // know which one is on disk.
package/src/manifest.mjs CHANGED
@@ -379,7 +379,7 @@ export const generateManifest = async (options) => {
379
379
  const hashesToMigrate = {};
380
380
  Object.keys(cicd).forEach(pkgName => {
381
381
  if (cicd[pkgName] && cicd[pkgName].hash && cicd[pkgName].folderName) {
382
- hashesToMigrate[cicd[pkgName].folderName] = { hash: cicd[pkgName].hash };
382
+ hashesToMigrate[pkgName] = { hash: cicd[pkgName].hash };
383
383
  }
384
384
  });
385
385
  if (Object.keys(hashesToMigrate).length > 0) {
@@ -280,11 +280,11 @@ describe('generateManifest schema version and migration', () => {
280
280
  const tmpRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'manifest-tests-'));
281
281
  const oldCwd = process.cwd();
282
282
  try {
283
- writeJson(path.join(tmpRoot, 'packages/lib-a/package.json'), { name: 'lib-a', version: '1.0.0', main: 'index.js' });
283
+ writeJson(path.join(tmpRoot, 'packages/lib-a/package.json'), { name: '@scope/lib-a', version: '1.0.0', main: 'index.js' });
284
284
  writeJson(path.join(tmpRoot, '.cicd/manifest.json'), {
285
285
  version: 5,
286
286
  templated: { 'build.yml': { PACKAGES: { 'lib-a': 'job.yml' } } },
287
- cicd: { 'lib-a': { hash: 'abc123', folderName: 'lib-a', packageFolder: 'packages' } },
287
+ cicd: { '@scope/lib-a': { hash: 'abc123', folderName: 'lib-a', packageFolder: 'packages' } },
288
288
  });
289
289
 
290
290
  process.chdir(tmpRoot);