Skip to content

v3.45.0: fallow config --resolved, JSON run notices, a full CLI reference, grouped --help

Choose a tag to compare

@BartWaardenburg BartWaardenburg released this 20 Nov 08:09
· 261 commits to main since this release
Immutable release. Only release title and notes can be modified.
v3.45.0
b802ddc

Features

  • fallow config --resolved shows the settings of a run and where each one comes from. For each analysis, it shows whether it runs and its production mode. It also shows the cause: a flag, an environment variable, a config key with its file, or a default. Use --for audit, --for dead-code, --for dupes or --for health to see the rules of another command. The new settings.type_aware member gives the type-aware value and its source. For --for audit, settings.audit_base gives the base ref and its source, or null when the audit detects the base. (#4853, #4854)
  • Run notices are part of the JSON output. Fallow now gives a workspace_diagnostics entry for these run notices: a flag with no effect, a config that the editor cannot load, two config files in one directory, an unknown security.categories entry, and an unreadable FALLOW_PRODUCTION* value. fallow audit --format json has a root workspace_diagnostics array when such a notice exists. An entry names an environment variable but does not include its value. MCP tools show these notices in warnings. The human output prints a flag with no effect and an ignored variable as a one-line Note:, and --quiet hides it. (#4853)
  • fallow schema --cli-reference prints a full CLI reference as one JSON document. The document lists every command and subcommand, with its usage line, its help and its options. Each option has its value names, aliases, possible values, default and help heading. The document also has the exit codes, the environment variables, the output formats, the MCP tools and each issue type with its fallow explain text. A documentation generator can write the command pages and option tables from this one file. (#4860)

Changed

  • Fallow loads and validates the config one time before the first analysis. The bare run, dead-code, dupes, health and audit load, validate and resolve the config one time for each run. When the config fails validation, fallow stops the run with exit code 2, before it prints the loaded config line. On the bare run, this error also comes before a flag usage error. Fallow prints the workspace discovery notice one time for each run. When the host cannot report its parallelism, fallow now starts one worker thread, not four. (#4823)
  • The Node bindings and the Rust API read the config one time for each call. Before, a config edit during a combined or audit call could give two analyses different settings. The feature flags, mutation and similar-code calls now also check external plugin files. The combined result lists each skipped analysis with its reason in the new skipped field. The ProgrammaticHealthRunner trait has a new refuses_config_type_aware method. A custom runner returns true when it does the type-aware config check itself. (#4818)
  • fallow coverage analyze reads production from the config. Before, the command used non-production mode without --production. It now uses the production setting of the config, as fallow dead-code does. (#4835)
  • The base side of fallow security and of the programmatic audit reads the config of the base commit. fallow security --gate newly-reachable now uses the config file of the base commit, as fallow audit does. A config change in the pull request then shows as a change in the findings. When AnalysisOptions.config_path names a file under the root that the change edits, run_audit now reads the base version of that file. If the base version does not load or validate, fallow security uses the head config, and run_audit skips the base pass. (#4835)
  • fallow mutation and fallow plugin-check print a config error with the same text as the analysis commands. The error for an invalid rule pack or boundary no longer starts with failed to load config:. A --config file that does not load gives failed to load config '<path>': <cause>. The message field of the JSON error of fallow mutation --format json changes the same way. The exit code stays 2. (#4835)
  • The --dupes-baseline note follows --quiet and the output format. When duplicates.enabled: false disables the duplication analysis, the note prints only in the human output and without --quiet. Fallow now prints a note for --production on fallow trace --path, a re-export chain trace and fallow trace-error, because these commands read the production mode from the config only. (#4853)
  • The source of a package.json entry point names the field that declares it. fallow list --entry-points and its JSON entry_points[].source value used package.json main for every field, or package.json exports in a nested package and for a wildcard target. The label now names the real field, for example package.json module or package.json bin. The labels for types, typings, source and browser are new values. See the upgrade notes. (#4836)
  • The language server warns about a duplication or typeAware initialization option that does not parse. Before, the server ran without the option and gave no message. It now writes a warning that names the option to the log of the editor. (#4854)
  • fallow <command> --help groups the options under headings. Each global option has a heading, such as Project, Output, Scope, Baselines or Gates. Each command with more than six options groups them under two to five headings, for example Detection, Output and Gates for dupes. The default fallow schema output lists the flags in the order of --help. The root fallow --help keeps one options block. (#4860)
  • Help, schema and error texts use plain words. Option help and schema descriptions no longer use all-caps words or internal labels. The texts name the runtime coverage add-on, the type-aware companion, the similar-code companion and the mutation runner. The config schema states the facts that a user needs for each key, and gives the defaults of keys that had none. The help of fallow list [PATH] now says that the path limits the listed files and entry points. (#4860)
  • fallow explain says what goes wrong when a finding stays, and more rules have an example. For most rule families, the "Why it matters" section no longer repeats the definition of the rule. Each tainted-sink security category has its own reason and example. Every structure, styling and coverage rule now has an example and a fix, and the complexity rules have an example each. The SARIF fullDescription of each rule does not change. (#4860)

Bug fixes

  • --no-production now has priority over a config production: true on every command. On fallow list, workspaces, fix, watch, viz, flags and suppressions, the flag and FALLOW_PRODUCTION=false now have priority over the config, as in fallow dead-code. The MCP list_boundaries tool now lets an off FALLOW_PRODUCTION value turn off production mode, and fix_preview, fix_apply and suppressions now apply production: false. fallow fix, list, viz, flags and suppressions now also apply --include-entry-exports and --no-package-baselines. When fallow watch reloads an edited config, it now follows a production change. fallow viz now finds duplicates in the files of the duplication production mode. (#4829)
  • fallow audit no longer reports an existing finding on a workspace package import as introduced. The base worktree shares the node_modules of the checkout, so its workspace links point outside the base. The base analysis lost the edge to a package such as @acme/lib, and a finding on that edge looked new. The import now resolves to the workspace package of the base. Thanks @DrJKL for the patch. (#4807)
  • A health baseline no longer accepts a new long file in the slot of a fixed function. A count-mode baseline counted a file-length finding as complexity. File-length findings now have their own baseline categories (file_lines_moderate, file_lines_high, file_lines_critical). A baseline from an earlier release gives the same results as before, and gets the fix when you save it again. Thanks @DrJKL for the patch. (#4808)
  • fallow audit --staged reuses the parse cache of the checkout. Before, each staged audit parsed every file again. A second staged run now parses only the files whose staged content changed. fallow audit with a shared FALLOW_CACHE_DIR also keeps the graph cache of the checkout valid. Thanks @frontendwizard for the report. (#4819)
  • A computed member access credits the class members that its key can name. For example, this.view[action]() with action: "zoomIn" | "zoomOut" now credits View.zoomIn and View.zoomOut. Before, fallow reported every member of View as unused, or no member when the receiver was a local variable. Fallow still counts a key of another type as a use of the whole object. Thanks @neumaennl for the report. (#4822)
  • Type-aware analysis resolves the members of a default-exported class. The fix covers export default class, export default Foo; and export { Foo as default };. Before, fallow kept the unused-member finding for these members when code used them. Thanks @DiefBell for the report. (#4811)
  • The experimental tsrs backend accepts tsrs releases with TypeScript-aligned versions. The supported ranges are now >=0.18.0 <1.0.0 || >=7.1.0 <8.0.0, and the install hint is tsrs@7.1.0-beta.tsrs3. See the upgrade notes. Thanks @PedroMartpico for the report. (#4817)
  • The editor finds duplicates in the same files as fallow dupes. With a per-analysis production setting such as {"deadCode": true, "dupes": false}, the language server ran duplication on the files of the dead-code mode. Duplication now uses its own production mode in the CLI, the language server and the VS Code extension. (#4800)
  • The editor keeps the fallow.production setting when the project config does not load. It also keeps the duplication settings of the editor. When duplicates.enabled is false, the language server no longer runs the duplication analysis. (#4820)
  • A project package with only a types entry now resolves. A package with types or typings and no main or exports resolves through that entry. Before, a type import of it was unresolved, and its dependency was unused. (#4813)
  • effect.schemaExportsAsTypes reads HttpApiSchema transforms in pipe. A schema such as Schema.Struct({...}).pipe(HttpApiSchema.asFormUrlEncoded()) is now a schema, not an unused export. (#4813)
  • An Astro project no longer gets an unused dependency finding for sharp. Astro loads sharp by name as the default image service. A config with passthroughImageService still gets the finding. (#4813)
  • Unusual stylesheets no longer stop fallow dead-code or fallow health --css. A math function such as opacity: max(4%, 5) made the CSS parser panic. Deeply nested math or color functions made the parse hang. An unterminated string before deep nesting overflowed the stack. Fallow now skips the structural parse of a stylesheet with such math or deep nesting, and ends an unterminated string at the newline. A skipped file gets no CSS analytics. (#4804)
  • A Vue class component with @Component({ template }) no longer gets Angular facts. Fallow now skips the Angular component analysis in .vue and .svelte script blocks. (#4804)
  • Named ES module imports of @fallow-cli/fallow-node now work. import { detectDeadCode } from "@fallow-cli/fallow-node" failed with SyntaxError: Named export 'detectDeadCode' not found. The package now has an ES module entry that exports each binding function by name. The default export and the CommonJS require entry do not change. (#4857)
  • fallow fix removes the import of a name that it removes from a local export list. In import { a } from './a'; export { a, used };, the fix removed a from the list but kept the import. The next fix run then removed the export of a in ./a, and the type check failed. When the removed list entries are all the references of an import binding, the fix now removes that binding, and the full declaration when no binding is left. Fallow does not change an import declaration that shares a line with other code. The dry run lists each import removal. Thanks @MikeSpock for the report. (#4859)
  • fallow dead-code --show-cascade lists the hidden findings in the human report. The JSON report listed the unused exports and unused types of unused files, but the human report printed only a count line. The human report and its summary line now list and count them. The same applies when the config sets showCascade: true. (#4836)
  • The MCP audit and decision_surface tools pick the base in the same order as the CLI. The typed audit and decision_surface tools now use the base parameter first, then FALLOW_AUDIT_BASE, then the automatic base. FALLOW_CHANGED_SINCE gives the base only when the audit detects none. (#4854)
  • fallow inspect and the VS Code extension pass the remote extends setting to each run. The child processes of fallow inspect did not get --allow-remote-extends, so a config with an https:// entry in extends failed there. The Health view, the workspace picker, the audit run and the fix run of VS Code now pass allowRemoteExtends to the CLI. (#4835)
  • fallow health rejects a FALLOW_TYPE_AWARE value that is not valid UTF-8. fallow dead-code already stopped with exit code 2 for such a value. A FALLOW_TYPE_AWARE_REQUIRE value that is not valid UTF-8 now also stops each command that reads type-aware settings with exit code 2. (#4854)
  • The commit gate block message no longer includes the verified: line of the npm launcher. The gate script of fallow setup-hooks now reads only the first line of the fallow --version output. The block message and the version floor check use only that version. (#4858)
  • The audit scope line starts the range at the base commit. fallow audit printed the head commit as the start of the range, so the line read as an empty range. The line now prints the merge base of the base ref and HEAD. (#4860)
  • The human duplication report uses the singular for one clone group. The header reads Duplicates (1 clone group). The overflow and corpus total lines also use the singular for one group or one family. (#4860)
  • fallow schema lists the missing environment variables and rule keys, and the fallow explain texts match the behavior. fallow schema now lists FALLOW_CLOCK_EPOCH, FALLOW_MCP_MAX_OUTPUT_BYTES and the four FALLOW_GATE_* variables. The complexity and long-file rows now name their rules.complexity-* key, the default error and opt_in: false. The fallow explain texts of unused-class-member, unused-file, unused-dependency, prop-drilling and other rules now match the behavior. The help of fallow dupes --trace names both accepted forms, FILE:LINE and dup:<fingerprint>. (#4836, #4860)

Upgrade notes

  • The type-aware wire protocol is now 9. Fallow does not use a companion of an earlier release. If you installed the companion with fallow type-aware setup, run setup again. An npm project must update the companion to the same version as fallow: npm install --save-dev fallow-type-aware@3.45.0. The GitHub Action and the GitLab template install the matching companion, unless FALLOW_SKIP_INSTALL is true in GitLab.
  • A health baseline from an earlier release shows growth one time when you save it again. On that save, the shrink-only baseline check reports the new file_lines_* counts in finding_counts as growth.
  • A script that matches "source": "package.json main" must match the package.json prefix. The source of a package.json entry point now names its real field, so package.json main no longer covers every package.json entry point.

Full Changelog: v3.44.0...v3.45.0