Repository navigation
v3.49.0: test-only exports, shallow directories, MCP skills, and safer fix --production
·
127 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Features
- A
test-only-exportrule. It reports an exported value that production code does not use but that a test, story, fixture, bench or test-helper file uses. In a default run, these files keep such an export alive, sounused-exportdoes not report it. The rule isoffby default. Turn it on withrules: { "test-only-exports": "warn" }or the--test-only-exportsselector. Only values are checked in this version, not types. Runfallow explain test-only-exportfor details. (#5252) - Shallow directories in
fallow health. The opt-in--shallow-directoriesflag lists directories whose interface is as large as what they hide. A directory is shallow when files outside it use at least as many of its items as it keeps inside. The section is for information only. It has no weight in the health score and never fails a run. Sethealth.shallowDirectories.minInterface(default 8) andhealth.shallowDirectories.ignorein the config. (#5195) - The MCP server serves the fallow skills.
fallow-mcpsupports the MCP skills extension. A client that supports it, such as Claude Code 2.1.331 or later, can load thefallowandfallow-setupskills at the same version as the tools. SetFALLOW_MCP_SKILLS=offto stop serving the skills.fallow agent installalso installs the skills on disk, so it writesFALLOW_MCP_SKILLS=offinto the MCP entry that it registers. (#5236) - A note for an
overrides[].filesglob that matches no file. Such a glob has no effect.fallow dead-codenow reports it asoverride-files-unmatchedinworkspace_diagnostics. The message names the key that works, for exampleignoreBinaries. Thanks @crystalfp for the report. (#5227) - An
mkdocsplugin for MkDocs and Zensical sites. Localextra_javascriptandextra_cssfiles ofmkdocs.ymlorzensical.tomlare entry points. (#5161) - A
vite-pwa-assets-generatorplugin. When@vite-pwa/assets-generatoris a dependency,pwa-assets.config.*at the project root or a workspace root is no longer an unused file. (#5160)
Bug fixes
fallow fix --productionno longer breaks tests. A production run leaves out test, story, fixture and bench files, so fallow reports an export that only these files import as unused.fix --productionremoved itsexportkeyword, and the test then failed. Nowfix --productionkeeps the export, lists it withskip_reason: "test_importers"and counts it inskipped_test_importers. Infallow dead-code --production --format json, the finding has a newtest_importersfield andauto_fixable: false. (#5251)- The language server no longer runs again for a watched-file event that changes no content. A file watcher can report events for a file that another tool only touches, and each event started a new analysis, so the analysis did not stop. One editor save also started two runs. The server now compares the content of the file with the content that it saw last. The Output channel names the files that start a run. (#5278)
- The VS Code status bar count agrees with the sidebar. It counts the same categories as the sidebar and leaves out the categories that
fallow.issueTypesturns off. The language server also no longer writes INFO lines to stderr, which VS Code labels as[error]. (#5278) - An
@expected-unusedexport that only tests import is no longer a stale suppression. (#5252) - A local with the name of a namespace import no longer hides unused exports. In
import * as e from "./errors", a use of a locale, such asString(e)incatch (e), counted as a use of the whole namespace. Now only a use that resolves to the import gives credit. (#5064) @sveltejs/kitgets credit for$app,$env,$service-workerand./$typesimports, also withoutsvelte.config.js. Before,fallow fixcould remove the package. Thanks @tlq5l for the patch in #5234. (#5019)- Fallow warns when the parse cache is too small for the project. The warning names the share of files that do not fit and a
cache.maxSizeMbvalue that holds them. Thanks @1abdala for the patch in #5222, and @Bertie690 for the report. (#5216) - Nx local executors, generators and plugins are no longer unused files. Fallow reads
executors.json,generators.jsonand the local plugins ofnx.json. Thanks @Bertie690 for the report. (#5201) --type-awarekeeps an exported type that declaration emit of another file needs. Without the export,tsc --declarationfails with TS4029. The pass does this only in a project that emits declaration files. (#4850)- Vue, Svelte and Astro files get correct complexity, parse and credit results.
- Vue
<template>complexity units span the template block, not the whole file. Thanks @1abdala for the patch in #5079. (#4992) - Top-level
returnin Astro frontmatter is no longer a parse error. Thanks @aloneangel45 for the patch in #5175, and @Elia97 for the report. (#5129) - An expression in an attribute of an Astro
<style>or<script>tag counts as a use. Thanks @aloneangel45 for the patch in #5123. (#5098) - A SvelteKit
{data}shorthand attribute counts as a use of the wholedata. Thanks @aloneangel45 for the patch in #5179. (#5171) bind:data,data="{data}"and other plain mentions ofdatain markup also count as a use of the wholedata.unused-load-data-keythen reports no keys for that route. Adatamention inside script text no longer counts. (#5171)- An exported
Propstype in a.astrofile is no longer an unused type. --trace File.svelte:defaultlists the files that import a component. (#5172)
- Vue
unused-store-membercredits more Pinia state reads. It credits reads throughstore.$state, throughthis.$statein an option store, and through a property typed withReturnType<typeof useFooStore>. (#5168, #5203, #5207)- Fallow prints a note for stale config entries. This covers unmatched
ignoreExports,duplicates.ignoreandhealth.ignoreentries, and a misnamed config file such asfallow.jsonc.fallow dupesandfallow healthreport their own ignore globs. A--productionrun reports none of the stale ignore notes. (#5167, #5166, #5202) fallow mutationruns in more projects. Pruned mutants stay out of the instrumented copy, so the baseline passes with TanStack Router code splitting. Thanks @x7ddf74479jn5 for the report. (#5218)fallow mutationfinds Vitest in a Vite+ project. (#5199, #5174)- Agent commands suggest and refresh the right skills.
fallow agent statussuggests--usercommands for skills in the home folder. Thanks @aloneangel45 for the patch in #5102. (#5067)fallow agent installrefreshes a stale.agentsskill. (#5132) - The VS Code fix preview shows the available fixes when the dry run skips a file. Thanks @aloneangel45 for the patch in #5128. (#5126)
- Fallow credits more framework and tooling code. Fallow now credits these items:
- the Vite configs that the Electron Forge
VitePluginnames (#5097); - the
jsPluginsof an imported Oxlint preset (#5101); - the static properties that React reads (#5173);
toJSONand paireddisposeclass members;- a CSS Module default that a barrel re-exports (#5162);
- re-exports on each React Native platform sibling;
- a dependency that a config requires;
@effect/tsgoas the provider of the@effect/language-servicetsconfig plugin (#5163).
- the Vite configs that the Electron Forge
- A root Vitest
test.includeno longer replaces the test patterns of a workspace. (#5094) - A macro import is build time. A devDependency that only a macro module imports is no longer a devDependency in production.
- Crafted input can no longer make the analysis hang. This covers stylesheets with nested color functions, and TypeScript or MDX files with nested
<and parenthesized patterns. A stylesheet past the parse budget gets no CSS analytics. Vue and Svelte files with many unclosed attribute quotes, and package scripts with a very long command word, no longer slow the analysis. A Sass@use " "no longer adds an empty import. - Other fixes.
dynamic-segment-name-conflictaccepts[slug]next to[...rest]. (#5169)- A stale
fallow-ignore-next-linemarker names the cause on the next line. (#5164) - The docs of
duplicates.thresholdand--thresholdsay that0turns the gate off. (#5165) --changed-sincefinds changed and renamed files whendiff.relativeistrue.- Impact matches moved findings one for one, and a passing gate clears a pending failure in the same worktree. The Impact containment total keeps growing after the event list fills.
fallow explain shared-statedescribes the inventory in each format, and the license activation help shows--stdin.- Config fix reports list only the ignore rules that Fallow adds.
- Type coupling counts each signature edge, and a scoped file list keeps the file count of each boundary zone.
fallow trace,fallow trace-error,fallow migrate, watch, doctor,fallow audit,fallow dupes, the walkthroughs, the flag retirement report and CSS health got smaller fixes. The CHANGELOG lists each one.
- Release SBOMs cover every shipped binary and only the crates that it links. (#5131, #5190)
Security
- A repository that you analyze has fewer ways to make Fallow run programs or write files.
- The agent gate and
fallow agent installrun only a fallow binary that the install recorded or that is in the install root. The gate removes unsafePATHentries before the first program runs. - Fallow runs Git without a file system monitor program.
- Fallow refuses a project root that a committed link moves out of its checkout, and a directory that holds the home directory.
- Fallow reads config and manifest files only inside the project, up to a size limit.
- The cache, setup and migrate commands do not write through a link into
.gitornode_modules. - Fallow refuses a user glob that folds to an absolute path.
- The agent gate and
Performance
- Plugin
used_exportsrules no longer slow down monorepos with many workspaces. On a generated monorepo with 75 Next.js workspaces, the CPU time offallow dead-codefell by about 40%. Thanks @Bertie690 for the report. (#5196)
Upgrade notes
- Some extraction and parse cache versions changed, so the first run after the update parses each file again.
- To see more language server detail in the editor Output channel, set
RUST_LOG(for exampleRUST_LOG=fallow_core=info) in the environment of the editor. fallow agent installnow writesFALLOW_MCP_SKILLS=offinto its MCP entry. An older fallow version treats that entry as user-edited and does not replace it without--force.- For a
fallow dupesclone group with merged occurrences, the audit key and baseline entry can change once.
Full Changelog: v3.48.0...v3.49.0