@biffo/cli 0.298.8 → 0.298.9

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/verify.sh +44 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.298.8",
3
+ "version": "0.298.9",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/scripts/verify.sh CHANGED
@@ -600,6 +600,49 @@ skip() {
600
600
  # inconclusive instead. So the check DOES run, and only a genuine
601
601
  # "the binary named in the script is not there" signature in its own output
602
602
  # is reclassified -- a real lint/type/format finding still reads as FAILED.
603
+ #
604
+ # ## Why the signature is pnpm's own diagnosis, not a generic shell phrase
605
+ # (biffo-template#1712)
606
+ #
607
+ # The pattern used to also match a plain `sh: 1: <x>: not found$` / bare
608
+ # `command not found` -- generic shell phrasing ANY subprocess a check shells
609
+ # out to can print verbatim while the check itself fails for a real,
610
+ # unrelated reason (a linter reporting on a missing optional plugin binary in
611
+ # the same run where it also reports a genuine lint violation, say). Because
612
+ # the grep runs over the check's WHOLE captured stdout+stderr, that unrelated
613
+ # line was enough to reclassify a real FAILED as INCONCLUSIVE -- discarding
614
+ # the actual finding (the FAILED branch is the only one that prints the
615
+ # tail) and printing "run pnpm install" as the fix for a toolchain that was
616
+ # never missing.
617
+ #
618
+ # It is tempting to narrow this to pnpm's OWN recursive-exec vocabulary --
619
+ # `ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL` / `Command "<x>" not found` -- on the
620
+ # theory that those strings are pnpm's, not a subprocess's. Measured directly
621
+ # against the pnpm this repo actually pins (`packageManager` in
622
+ # package.json, 9.15.9) that theory is false for the #1497 case this file
623
+ # exists to catch: a plain `pnpm run format:check` in a fresh worktree with
624
+ # no `node_modules` prints neither string. It prints `sh: 1: prettier: not
625
+ # found` (the shell's own generic message, exactly the phrase this section
626
+ # is otherwise removing) followed by a line pnpm itself always adds when a
627
+ # script fails with no local `node_modules`:
628
+ #
629
+ # WARN Local package.json exists, but node_modules missing, did you mean to install?
630
+ #
631
+ # Confirmed by direct experiment, not by reading pnpm's source: this WARN
632
+ # line appears whenever the invoked script exits non-zero AND node_modules
633
+ # is absent -- regardless of *why* the script failed (a missing binary, or a
634
+ # real assertion failure in a script that needed no installed binary at
635
+ # all) -- and it never appears when node_modules is present, or when the
636
+ # script succeeds. So within THIS elif (already gated on a non-zero exit) it
637
+ # is the precise signal for "this failure happened in a directory this file
638
+ # has already decided (see the `have_script` comment above) it will not
639
+ # pre-flight-refuse to attempt" -- unlike `command not found`/`: not found$`,
640
+ # it is pnpm's own text, never a phrase an unrelated subprocess can emit on
641
+ # its own, so it cannot be tripped by noise elsewhere in the captured
642
+ # output. `ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL` and pnpm's own
643
+ # `Command "<x>" not found` are kept alongside it for the recursive-workspace
644
+ # invocation shape neither this repo's checks nor a direct experiment could
645
+ # exercise, but which the original #1497 report described.
603
646
  run_check_js() {
604
647
  name="$1"
605
648
  shift
@@ -612,7 +655,7 @@ run_check_js() {
612
655
  PASSED="$PASSED $name"
613
656
  LAST_CHECK_SECONDS=$(($(date +%s) - start))
614
657
  printf ' \033[32mOK\033[0m %-16s %ss\n' "$name" "$LAST_CHECK_SECONDS"
615
- elif grep -qE 'ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL|Command "[^"]*" not found|: not found$|command not found' \
658
+ elif grep -qE 'ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL|Command "[^"]*" not found|node_modules missing, did you mean to install' \
616
659
  "/tmp/biffo-verify.$$"; then
617
660
  INCONCLUSIVE="$INCONCLUSIVE $name"
618
661
  printf ' \033[33mINCONCLUSIVE\033[0m %-16s %ss - dependencies not installed\n' \