enablement-build-manifest 1.8.0 → 1.8.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enablement-build-manifest",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "T8is builds a dependency tree.",
5
5
  "type": "module",
6
6
  "module": "./index.mjs",
package/src/hashFile.mjs CHANGED
@@ -279,7 +279,12 @@ function prep(fs) {
279
279
  }
280
280
 
281
281
  async function hashSymLinkPromise(name, dir, options, isRootElement = false) {
282
- const target = await fs.promises.readlink(path.join(dir, name));
282
+ const linkPath = path.join(dir, name);
283
+ if (ignore(name, linkPath, options.folders) || ignore(name, linkPath, options.files)) {
284
+ log.symlink(`excluding symbolic link ${linkPath}`);
285
+ return undefined;
286
+ }
287
+ const target = await fs.promises.readlink(linkPath);
283
288
  log.symlink(`handling symbolic link ${name} -> ${target}`);
284
289
  if (options.symbolicLinks.include) {
285
290
  if (options.symbolicLinks.ignoreTargetContent) {
package/src/workspace.mjs CHANGED
@@ -28,15 +28,20 @@ export function parseWorkspacePatterns(content) {
28
28
  return patterns;
29
29
  }
30
30
 
31
- // Extract unique top-level directory names from workspace glob patterns.
31
+ // Extract unique literal directory prefixes from workspace glob patterns,
32
+ // keeping every leading path segment up to (but not including) the first
33
+ // segment that contains a glob character.
32
34
  // e.g. ['packages/*', 'apps/**'] → ['packages', 'apps']
35
+ // e.g. ['ux/apps/*', 'ux/components/*'] → ['ux/apps', 'ux/components']
33
36
  export function extractDirsFromPatterns(patterns) {
34
37
  const dirs = new Set();
35
38
  for (const pattern of patterns) {
36
- const dir = pattern
37
- .split("/")[0]
38
- .replace(/[*?[\]{}]/g, "")
39
- .trim();
39
+ const literalSegments = [];
40
+ for (const segment of pattern.split("/")) {
41
+ if (/[*?[\]{}]/.test(segment)) break;
42
+ literalSegments.push(segment.trim());
43
+ }
44
+ const dir = literalSegments.join("/").trim();
40
45
  if (dir) dirs.add(dir);
41
46
  }
42
47
  return [...dirs];
@@ -68,8 +68,13 @@ describe('extractDirsFromPatterns', () => {
68
68
  expect(extractDirsFromPatterns(['*'])).toEqual([]);
69
69
  });
70
70
 
71
- it('handles deep globs by taking only the first segment', () => {
72
- expect(extractDirsFromPatterns(['components/ui/**'])).toEqual(['components']);
71
+ it('preserves the full literal prefix for a deep glob', () => {
72
+ expect(extractDirsFromPatterns(['components/ui/**'])).toEqual(['components/ui']);
73
+ });
74
+
75
+ it('preserves nested literal prefixes and dedupes per full prefix', () => {
76
+ const result = extractDirsFromPatterns(['ux/apps/*', 'ux/components/*', 'ux/apps/**']);
77
+ expect(result).toEqual(['ux/apps', 'ux/components']);
73
78
  });
74
79
  });
75
80