@autometa/cli 1.0.0-rc.6 → 1.0.0-rc.7

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/dist/bin.cjs CHANGED
@@ -2427,25 +2427,34 @@ function parseScopeOverrideTag(tags) {
2427
2427
  }
2428
2428
  function resolveFeatureScope(options) {
2429
2429
  const override = parseScopeOverrideTag(options.feature.tags);
2430
+ const fileScope = resolveFileScope(options.featureAbsPath, options.groupIndex);
2431
+ const inferred = (() => {
2432
+ if (fileScope.kind !== "root") {
2433
+ return fileScope;
2434
+ }
2435
+ if (options.hoistedFeatureScopingMode !== "directory") {
2436
+ return fileScope;
2437
+ }
2438
+ return resolveHoistedDirectoryScope({
2439
+ featureAbsPath: options.featureAbsPath,
2440
+ hoistedFeatureRootsAbs: options.hoistedFeatureRootsAbs,
2441
+ groupIndex: options.groupIndex,
2442
+ strict: options.hoistedFeatureScopingStrict
2443
+ });
2444
+ })();
2430
2445
  if (override) {
2431
2446
  if (override.modulePath && override.modulePath.length > 0) {
2432
2447
  return { kind: "module", group: override.group, modulePath: override.modulePath };
2433
2448
  }
2449
+ if (inferred.kind === "module" && inferred.group === override.group) {
2450
+ return inferred;
2451
+ }
2452
+ if (inferred.kind === "group" && inferred.group === override.group) {
2453
+ return inferred;
2454
+ }
2434
2455
  return { kind: "group", group: override.group };
2435
2456
  }
2436
- const fileScope = resolveFileScope(options.featureAbsPath, options.groupIndex);
2437
- if (fileScope.kind !== "root") {
2438
- return fileScope;
2439
- }
2440
- if (options.hoistedFeatureScopingMode !== "directory") {
2441
- return fileScope;
2442
- }
2443
- return resolveHoistedDirectoryScope({
2444
- featureAbsPath: options.featureAbsPath,
2445
- hoistedFeatureRootsAbs: options.hoistedFeatureRootsAbs,
2446
- groupIndex: options.groupIndex,
2447
- strict: options.hoistedFeatureScopingStrict
2448
- });
2457
+ return inferred;
2449
2458
  }
2450
2459
  function isVisibleStepScope(stepScope, featureScope) {
2451
2460
  if (featureScope.kind === "root") {