Repository navigation
v3.45.0: fallow config --resolved, JSON run notices, a full CLI reference, grouped --help
·
261 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Features
fallow config --resolvedshows 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 dupesor--for healthto see the rules of another command. The newsettings.type_awaremember gives the type-aware value and its source. For--for audit,settings.audit_basegives the base ref and its source, ornullwhen the audit detects the base. (#4853, #4854)- Run notices are part of the JSON output. Fallow now gives a
workspace_diagnosticsentry for these run notices: a flag with no effect, a config that the editor cannot load, two config files in one directory, an unknownsecurity.categoriesentry, and an unreadableFALLOW_PRODUCTION*value.fallow audit --format jsonhas a rootworkspace_diagnosticsarray when such a notice exists. An entry names an environment variable but does not include its value. MCP tools show these notices inwarnings. The human output prints a flag with no effect and an ignored variable as a one-lineNote:, and--quiethides it. (#4853) fallow schema --cli-referenceprints 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 itsfallow explaintext. 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,healthandauditload, 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 theloaded configline. 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
skippedfield. TheProgrammaticHealthRunnertrait has a newrefuses_config_type_awaremethod. A custom runner returnstruewhen it does the type-aware config check itself. (#4818) fallow coverage analyzereadsproductionfrom the config. Before, the command used non-production mode without--production. It now uses theproductionsetting of the config, asfallow dead-codedoes. (#4835)- The base side of
fallow securityand of the programmatic audit reads the config of the base commit.fallow security --gate newly-reachablenow uses the config file of the base commit, asfallow auditdoes. A config change in the pull request then shows as a change in the findings. WhenAnalysisOptions.config_pathnames a file under the root that the change edits,run_auditnow reads the base version of that file. If the base version does not load or validate,fallow securityuses the head config, andrun_auditskips the base pass. (#4835) fallow mutationandfallow plugin-checkprint a config error with the same text as the analysis commands. The error for an invalid rule pack or boundary no longer starts withfailed to load config:. A--configfile that does not load givesfailed to load config '<path>': <cause>. Themessagefield of the JSON error offallow mutation --format jsonchanges the same way. The exit code stays 2. (#4835)- The
--dupes-baselinenote follows--quietand the output format. Whenduplicates.enabled: falsedisables the duplication analysis, the note prints only in the human output and without--quiet. Fallow now prints a note for--productiononfallow trace --path, a re-export chain trace andfallow trace-error, because these commands read the production mode from the config only. (#4853) - The
sourceof a package.json entry point names the field that declares it.fallow list --entry-pointsand its JSONentry_points[].sourcevalue usedpackage.json mainfor every field, orpackage.json exportsin a nested package and for a wildcard target. The label now names the real field, for examplepackage.json moduleorpackage.json bin. The labels fortypes,typings,sourceandbrowserare new values. See the upgrade notes. (#4836) - The language server warns about a
duplicationortypeAwareinitialization 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> --helpgroups 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 fordupes. The defaultfallow schemaoutput lists the flags in the order of--help. The rootfallow --helpkeeps 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 explainsays 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 SARIFfullDescriptionof each rule does not change. (#4860)
Bug fixes
--no-productionnow has priority over a configproduction: trueon every command. Onfallow list,workspaces,fix,watch,viz,flagsandsuppressions, the flag andFALLOW_PRODUCTION=falsenow have priority over the config, as infallow dead-code. The MCPlist_boundariestool now lets an offFALLOW_PRODUCTIONvalue turn off production mode, andfix_preview,fix_applyandsuppressionsnow applyproduction: false.fallow fix,list,viz,flagsandsuppressionsnow also apply--include-entry-exportsand--no-package-baselines. Whenfallow watchreloads an edited config, it now follows aproductionchange.fallow viznow finds duplicates in the files of the duplication production mode. (#4829)fallow auditno longer reports an existing finding on a workspace package import as introduced. The base worktree shares thenode_modulesof 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 --stagedreuses 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 auditwith a sharedFALLOW_CACHE_DIRalso 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]()withaction: "zoomIn" | "zoomOut"now creditsView.zoomInandView.zoomOut. Before, fallow reported every member ofViewas 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;andexport { 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 istsrs@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-analysisproductionsetting 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.productionsetting when the project config does not load. It also keeps the duplication settings of the editor. Whenduplicates.enabledisfalse, the language server no longer runs the duplication analysis. (#4820) - A project package with only a
typesentry now resolves. A package withtypesortypingsand nomainorexportsresolves through that entry. Before, a type import of it was unresolved, and its dependency was unused. (#4813) effect.schemaExportsAsTypesreadsHttpApiSchematransforms inpipe. A schema such asSchema.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 loadssharpby name as the default image service. A config withpassthroughImageServicestill gets the finding. (#4813) - Unusual stylesheets no longer stop
fallow dead-codeorfallow health --css. A math function such asopacity: 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.vueand.sveltescript blocks. (#4804) - Named ES module imports of
@fallow-cli/fallow-nodenow work.import { detectDeadCode } from "@fallow-cli/fallow-node"failed withSyntaxError: 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 CommonJSrequireentry do not change. (#4857) fallow fixremoves the import of a name that it removes from a local export list. Inimport { a } from './a'; export { a, used };, the fix removedafrom the list but kept the import. The next fix run then removed theexportofain./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-cascadelists 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 setsshowCascade: true. (#4836)- The MCP
auditanddecision_surfacetools pick the base in the same order as the CLI. The typedauditanddecision_surfacetools now use thebaseparameter first, thenFALLOW_AUDIT_BASE, then the automatic base.FALLOW_CHANGED_SINCEgives the base only when the audit detects none. (#4854) fallow inspectand the VS Code extension pass the remote extends setting to each run. The child processes offallow inspectdid not get--allow-remote-extends, so a config with anhttps://entry inextendsfailed there. The Health view, the workspace picker, the audit run and the fix run of VS Code now passallowRemoteExtendsto the CLI. (#4835)fallow healthrejects aFALLOW_TYPE_AWAREvalue that is not valid UTF-8.fallow dead-codealready stopped with exit code 2 for such a value. AFALLOW_TYPE_AWARE_REQUIREvalue 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 offallow setup-hooksnow reads only the first line of thefallow --versionoutput. 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 auditprinted 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 andHEAD. (#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 schemalists the missing environment variables and rule keys, and thefallow explaintexts match the behavior.fallow schemanow listsFALLOW_CLOCK_EPOCH,FALLOW_MCP_MAX_OUTPUT_BYTESand the fourFALLOW_GATE_*variables. The complexity andlong-filerows now name theirrules.complexity-*key, the defaulterrorandopt_in: false. Thefallow explaintexts ofunused-class-member,unused-file,unused-dependency,prop-drillingand other rules now match the behavior. The help offallow dupes --tracenames both accepted forms,FILE:LINEanddup:<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, runsetupagain. An npm project must update the companion to the same version asfallow:npm install --save-dev fallow-type-aware@3.45.0. The GitHub Action and the GitLab template install the matching companion, unlessFALLOW_SKIP_INSTALListruein 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 infinding_countsas growth. - A script that matches
"source": "package.json main"must match thepackage.jsonprefix. Thesourceof a package.json entry point now names its real field, sopackage.json mainno longer covers every package.json entry point.
Full Changelog: v3.44.0...v3.45.0