@hublo/sentinel 1.2.0-alpha.32 → 1.2.0-alpha.34

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.
@@ -22,7 +22,7 @@ import {
22
22
  registerAdapters,
23
23
  resolve,
24
24
  resolveBin
25
- } from "../chunk-UULHGNMK.js";
25
+ } from "../chunk-XZLF7FBK.js";
26
26
 
27
27
  // bin/sentinel.ts
28
28
  import { program } from "commander";
@@ -5641,13 +5641,15 @@ function rewriteVitestScript(command) {
5641
5641
  });
5642
5642
  }
5643
5643
  function testTarget(options) {
5644
- const { configFiles, outputs } = options;
5644
+ const { configFiles, outputs, dependsOn, configurations } = options;
5645
5645
  const cached = outputs !== void 0 && outputs.length > 0;
5646
5646
  return {
5647
5647
  [TEST_SCRIPT_NAME]: {
5648
5648
  cache: cached,
5649
5649
  inputs: ["default", "^default", ...configFiles.map((name) => `{projectRoot}/${name}`)],
5650
- ...cached ? { outputs: [...outputs] } : {}
5650
+ ...cached ? { outputs: [...outputs] } : {},
5651
+ ...dependsOn !== void 0 && dependsOn.length > 0 ? { dependsOn: [...dependsOn] } : {},
5652
+ ...configurations !== void 0 && Object.keys(configurations).length > 0 ? { configurations: { ...configurations } } : {}
5651
5653
  }
5652
5654
  };
5653
5655
  }
@@ -5771,7 +5773,17 @@ function ownedTestDependencies(cwd, declared) {
5771
5773
  ["devDependencies", entry.name]
5772
5774
  ]).filter(([section]) => section !== void 0);
5773
5775
  }
5776
+ var DEFERRED = {
5777
+ svelte: `the svelte modules here carry no svelte test at all, so adopting them would prove nothing about svelte, and their owners have a framework migration under way that moves these versions anyway`
5778
+ };
5774
5779
  function plan3(context) {
5780
+ const deferred = DEFERRED[context.preset];
5781
+ if (deferred !== void 0) {
5782
+ return {
5783
+ operations: [],
5784
+ skipped: `the test role defers ${context.preset} for now. It defers because ${deferred}.`
5785
+ };
5786
+ }
5775
5787
  const configFile = testConfigFile(context.cwd);
5776
5788
  const adoption = readTestAdoption(context.cwd);
5777
5789
  if (configFile === void 0) {
@@ -5801,6 +5813,16 @@ function plan3(context) {
5801
5813
  }
5802
5814
  const existing = projectTargets(context.cwd)?.[TEST_SCRIPT_NAME];
5803
5815
  const outputs = existing?.outputs ?? [];
5816
+ const dependsOn = existing?.dependsOn ?? [];
5817
+ const configurations = existing?.configurations ?? {};
5818
+ if (dependsOn.length > 0) {
5819
+ notes.push(`carried \`dependsOn\` from the replaced target: ${dependsOn.join(", ")}.`);
5820
+ }
5821
+ if (Object.keys(configurations).length > 0) {
5822
+ notes.push(
5823
+ `carried the \`${Object.keys(configurations).join("`, `")}\` configuration(s): CI invokes \`--configuration=ci\`, and a target that no longer offers it fails the caller, not the module.`
5824
+ );
5825
+ }
5804
5826
  if (outputs.length === 0) {
5805
5827
  notes.push(
5806
5828
  `this target declares no \`outputs\`, so it is left UNCACHED. Caching a run that restores nothing is the defect where nx reports a hit and the coverage directory is empty; if this module writes coverage, declare where and the target can cache.`
@@ -5826,7 +5848,7 @@ function plan3(context) {
5826
5848
  operations.push(
5827
5849
  ...nxTargetOperations({
5828
5850
  cwd: context.cwd,
5829
- targets: testTarget({ configFiles: [configFile], outputs })
5851
+ targets: testTarget({ configFiles: [configFile], outputs, dependsOn, configurations })
5830
5852
  })
5831
5853
  );
5832
5854
  const owned = ownedTestDependencies(context.cwd, adoption.ownDeclarations);
@@ -6945,6 +6967,12 @@ async function dispatch(opts) {
6945
6967
  }
6946
6968
  const detected = resolveFlavour(opts);
6947
6969
  const resolutionPreset = opts.preset ?? declaredPresetFor(opts.target, opts.cwd) ?? detected;
6970
+ if (resolutionPreset === "tools") {
6971
+ const message = `tools modules are not adopted one at a time: they sometimes hold configuration shared with the workspace root, so they move WITH the root, as one reviewed change owned by the tooling team rather than by the module's team.`;
6972
+ process.stderr.write(` ${palette(process.stderr).dim(`${opts.target}: ${message}`)}
6973
+ `);
6974
+ return 0;
6975
+ }
6948
6976
  const adapter = resolve(opts.target, resolutionPreset, opts.runner);
6949
6977
  const preset = opts.preset ?? adapter.declaredPreset?.(opts.cwd) ?? detected;
6950
6978
  if (opts.preset !== void 0) {
@@ -7030,4 +7058,4 @@ export {
7030
7058
  detectFramework,
7031
7059
  dispatch
7032
7060
  };
7033
- //# sourceMappingURL=chunk-UULHGNMK.js.map
7061
+ //# sourceMappingURL=chunk-XZLF7FBK.js.map
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  registerAdapters,
8
8
  resolve,
9
9
  setDefaultRunner
10
- } from "./chunk-UULHGNMK.js";
10
+ } from "./chunk-XZLF7FBK.js";
11
11
  export {
12
12
  BaseAdapter,
13
13
  all,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hublo/sentinel",
3
- "version": "1.2.0-alpha.32",
3
+ "version": "1.2.0-alpha.34",
4
4
  "description": "One CLI that guards code health across Hublo repos: shared lint/typescript/build/test presets, static & dynamic analysis, and architecture checks.",
5
5
  "type": "module",
6
6
  "license": "MIT",