@ariestools/toolchain 8.7.15 → 8.7.16

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/xy.mjs CHANGED
@@ -24961,6 +24961,24 @@ function getImportedPackages(program, workspaceDir) {
24961
24961
  };
24962
24962
  }
24963
24963
  //#endregion
24964
+ //#region src/actions/api-exposure/analyzer/placement.ts
24965
+ /**
24966
+ * Whether deplint can require a local runtime-section placement for this
24967
+ * assessment. A dependency already listed in a runtime section is locally
24968
+ * owned. Otherwise it is actionable only when this package names it directly,
24969
+ * an override explicitly claims it, or `peerForwarding: "always"` deliberately
24970
+ * forwards its inherited peer contract. Type-checker findings that merely
24971
+ * trace through another package remain useful exposure evidence, but that
24972
+ * provider owns their manifest placement.
24973
+ */
24974
+ function isPlacementActionable({ config, currentSection, dependency, importedPackages, recommendationSource, requiredPeerSources }) {
24975
+ if (currentSection === "dependencies" || currentSection === "dependencies+peerDependencies") return true;
24976
+ if (recommendationSource === "override" || recommendationSource === "workspace-internal") return true;
24977
+ if (importedPackages === void 0) return true;
24978
+ if (importedPackages.value.has(dependency) || importedPackages.typeOnly.has(dependency)) return true;
24979
+ return config.peerForwarding === "always" && requiredPeerSources.has(dependency);
24980
+ }
24981
+ //#endregion
24964
24982
  //#region src/actions/api-exposure/analyzer/program.ts
24965
24983
  function createSharedProgramCache() {
24966
24984
  return { sourceFiles: /* @__PURE__ */ new Map() };
@@ -25258,6 +25276,14 @@ function assessDependency({ config, dependency, importedPackages, isSelfOrIntern
25258
25276
  dependency,
25259
25277
  findings,
25260
25278
  installStrategy,
25279
+ placementActionable: isPlacementActionable({
25280
+ config,
25281
+ currentSection: currentSectionOf(dependency, sections),
25282
+ dependency,
25283
+ importedPackages,
25284
+ recommendationSource,
25285
+ requiredPeerSources
25286
+ }),
25261
25287
  recommendation,
25262
25288
  recommendationSource,
25263
25289
  treeShakingModifier: score.treeShakingModifier
@@ -25379,7 +25405,8 @@ function bandIndex(band) {
25379
25405
  * when both `dependencies` and `peerDependencies` list the package.
25380
25406
  */
25381
25407
  function isMismatch(assessment) {
25382
- const { currentSection, recommendation } = assessment;
25408
+ const { currentSection, placementActionable, recommendation } = assessment;
25409
+ if (placementActionable === false) return false;
25383
25410
  if (recommendation === "review") return false;
25384
25411
  if (recommendation === "peer-with-default") return currentSection !== "dependencies+peerDependencies";
25385
25412
  if (bandIndex(recommendation) > bandIndex("review")) return currentSection !== "peerDependencies";
@@ -25402,7 +25429,8 @@ function renderAssessment(assessment, verbose) {
25402
25429
  const mismatch = isMismatch(assessment) ? ` ${chalk.red("MISMATCH")}` : "";
25403
25430
  const source = assessment.recommendationSource === "score" ? "" : ` [${assessment.recommendationSource}]`;
25404
25431
  const strategy = assessment.installStrategy === void 0 ? "" : chalk.dim(` strategy=${assessment.installStrategy}`);
25405
- console.log(` ${chalk.bold(assessment.dependency)} ${formatScore(assessment)} → ${color(assessment.recommendation)} (currently: ${assessment.currentSection})${source}${strategy}${mismatch}`);
25432
+ const placement = assessment.placementActionable === false ? chalk.dim(" placement=transitive") : "";
25433
+ console.log(` ${chalk.bold(assessment.dependency)} ${formatScore(assessment)} → ${color(assessment.recommendation)} (currently: ${assessment.currentSection})${source}${strategy}${placement}${mismatch}`);
25406
25434
  if (!(verbose || isMismatch(assessment) || assessment.recommendation === "review")) return;
25407
25435
  for (const finding of assessment.findings) {
25408
25436
  const weight = finding.infinite ? " ∞" : `+${finding.weight}`.padStart(4);