@smallpen/cli 0.1.0-alpha.2 → 0.1.0-alpha.5

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.
@@ -1,5 +1,10 @@
1
1
  // Presentation only: the core warning list and mutation semantics stay unchanged.
2
- export function warningOutput(warnings, detail, { confirmUnmatched = false } = {}) {
2
+ // validate checks Package validity only; say so, so advice on a valid write
3
+ // does not read as a defect that validate failed to report.
4
+ const ADVISORY_NOTE =
5
+ "Design advice only: the write is valid and was not gated. validate does not repeat this advice.";
6
+
7
+ export function warningOutput(warnings, detail, { confirmUnmatched = false, suppressed } = {}) {
3
8
  const rank = (warning) => warning.match === "exact"
4
9
  ? 0
5
10
  : warning.suggestions.length > 0 ? 1 : 2;
@@ -16,6 +21,8 @@ export function warningOutput(warnings, detail, { confirmUnmatched = false } = {
16
21
  total: warnings.length,
17
22
  counts,
18
23
  contextScope: warnings[0]?.contextScope,
24
+ ...(suppressed ? { suppressed } : {}),
25
+ ...(warnings.length > 0 ? { note: ADVISORY_NOTE } : {}),
19
26
  };
20
27
  if (detail === "full") {
21
28
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smallpen/cli",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -15,8 +15,8 @@
15
15
  "bin"
16
16
  ],
17
17
  "dependencies": {
18
- "@smallpen/core": "0.1.0-alpha.2",
19
- "@smallpen/local-package": "0.1.0-alpha.2"
18
+ "@smallpen/core": "0.1.0-alpha.5",
19
+ "@smallpen/local-package": "0.1.0-alpha.5"
20
20
  },
21
21
  "repository": {
22
22
  "type": "git",