Repository navigation
v3.47.0: namespace-escapes rule, export * as Name checks, Effect Schema members, React Router open redirects
Features
-
The new
namespace-escapesrule reports a namespace import that hides exports from the unused-export check. When code usesimport * as Nsas a whole value, fallow cannot see which members it reads. Examples are a cast, an assignment, a call argument, a spread, a computed read,Object.keys(Ns)andexport { Ns }. Fallow then credits every export of the target module and of the modules that it re-exports from. Sounused-exportsandunused-typesdo not check them. The rule reports each such binding with the target module and the count of hidden exports. Fallow does not report a binding that hides no export. The rule isoffby default:- Enable it in
rules. - Select it with
--namespace-escapes. - Suppress one finding with
// fallow-ignore-next-line namespace-escape.
JSON output has the new
namespace_escapesarray. The other report formats, the CI integrations, the LSP andfallow explainalso show the findings. (#5065) - Enable it in
-
fallow securityreports a non-literal target of React Routerredirect,redirectDocumentandreplace. The newreact-router-open-redirectcategory (CWE-601) is active when the project declaresreact-routeror@react-router/dev. The callee must be an import fromreact-router, so a local function namedredirectgives no candidate. Thanks @cr101 for the report and the reproduction. (#5001)
Changed
- Fallow exits with code 2 for many global options that have no effect on a command. One table now states which global options each command accepts. Examples are
fallow viz --output-file(use--out) and--output-fileon commands that print to stdout. Another example is a global--dupes-*option on a command other than barefallow. For that case, the message names the config key or thefallow dupesoption to use.fallow schema --cli-referenceexports the table in the newcommand_supportfield of each global option. CHANGELOG.md lists every rejected combination. (#4999) - Fallow rejects a
--type-aware-projectpath that does not exist whenFALLOW_TYPE_AWAREortypeAware.enabledenables type-aware analysis. When type-aware analysis is off for the run, fallow rejects the option with "has no effect". (#4999) - An empty
HOME,XDG_CONFIG_HOMEorPATHcounts as unset. Commands that need a home folder useUSERPROFILEin that case. Sofallow agentandsetup-hooks --userwork on native Windows withoutHOME. AHOMEthat is not valid UTF-8 now resolves. (#5015) - Fallow rebuilds the duplication token cache once. Tokens of
export * as name, namespace imports and type-only imports or exports now include the name or thetypekeyword. A clone group that holds one of these statements can change once. (#5044)
Bug fixes
Unused code
-
export * as Namein an entry file credits only the members that other code reads. WithincludeEntryExportson, such a line credited every export of the target module. It now works likeimport * as Name, also for nested chains such asName.Inner.member. A namespace that code passes as a value, spreads or reads with a computed key keeps full credit. An entry file that a dynamicimport()orrequire()loads also keeps full credit. Outside entry files, fallow no longer reports a false unused export for a nested chain or a namespace that code passes as a value. (#5063) -
effect.schemaExportsAsTypesaccepts more schema forms. With the option on, an export is a schema when each value that it can have is a schema. These forms now count:- conditional expressions with a schema in each branch;
- members of a namespace import;
- calls of a function that returns its schema argument;
- members of a local
constliteral that no code changes; - each lowercase
Schemamember whose return type is a schema in effect 3 or effect 4, for exampleSchema.optional,Schema.mutableandSchema.tag.
An unused export of these forms moves from
unused-exporttounused-type. A schema method that code reads without a call, such asUser.annotations, is a function and no longer a schema. PascalCase values that are no schema, such asSchema.TypeId, keep theirunused-exportfinding. (#5062, #5076) -
Every dependency check reads a
package.jsonwith a leading byte order mark. Before, several checks skipped such a manifest and missed unused dependencies of that workspace. (#5068) -
Settings that a tsconfig inherits through
extendscount everywhere. For example,jsxfrom a base config now creditsreact. Only a config that contains the importing file decides itspaths. (#5022) -
A tsconfig
pathsalias resolves with the one pattern that TypeScript selects. Apathstarget also resolves against the folder of the config that setspaths, as in TypeScript 7.baseUrlnow resolves an import that nopathspattern resolves. (#5022, #5035) -
An expression in Vue, Svelte or Astro markup goes to the graph and to
fallow securitylike the same code in a script. Adispatch("save")call in Svelte markup now counts forunused-svelte-event. A Vuebus.emit("close")call no longer marks a declaredcloseevent as used. A component with a non-HTML root<template>reports nounused-component-emitfinding. Template sinks can now give new security candidates. (#5013)
fallow fix
fallow fixchecks each edit before it writes it. It drops an edit that breaks the parse or loses a kept member. (#5020)fallow fixremovesexportfrom each overload signature. Before, it removedexportonly from the implementation, and the type check failed. (#5020)fallow fixreplaces a re-export with a bare import when it removes the last name.export { Widget } from './widget'becomesimport './widget';, so the module still runs. Remove the bare import yourself when the module has no side effects. (#5074)
Audit and CI
fallow auditcounts one paste as one clone finding. A small edit in every copy of an old clone no longer fails theintroduced-clone-groupgate. JSON output addsduplication.clone_regions[], aregionindex on each clone group, and the gradeinherited-edited. Theduplication_*attribution counts now count regions. (#5000)fallow auditgives correct base findings for sparse checkouts and for renamed files with%or:in the path. The audit also runs the base analysis when a change can alter the findings without a token change. (#5030, #5032, #5044)fallow audit --briefreports only new public exports when dead code and health use different production modes. (#5032)fallow auditkeeps the styling findings of changed files. (#5056)fallow security --gate newfails when a change adds an import that lets client code reach a server-only module or a secret reader. (#5057)- Fallow now anchors review comments on files with brackets in their path. An example is
app/[id]/page.tsx. (#5032) - Fallow creates a sticky PR or MR comment when only an enforced gate fails.
fallow audit --format codeclimatenow applies the report path prefix. (#5028) - The
dedup-lookup-failedoutput of the GitHub Action and the GitLab marker report a failed lookup again.fallow ci post-pr-commentandfallow ci post-reviewgive the new error codeFALLOW_CI_DEDUP_LOOKUP_FAILED. A CI gate on these outputs can now fail. With a pinned fallow version that does not have this code, the outputs stayfalse. (#5033) - The GitHub Action finds the type-aware config through
extendsand parent folders. The Action also starts the type-aware sidecar on Windows. (#5029) - Fallow exits with code 2 when two save or report flags name one file. An example is
--output-file out.sarif --sarif-file out.sarif. A device or a named pipe, such as/dev/null, is still allowed for more than one flag. (#5043)
Other fixes
fallow tracekeeps every hop inside--depth. It also gives empty chains for a name that the file does not export. (#5036)- Fallow judges a barrel hop in a boundary chain by its own re-export kind. Same-named
autoDiscoverzones with differentrootvalues keep each root. (#5034) - A recursive workspace pattern no longer follows a link out of the project or into a loop. (#5038)
- A deep package cycle always gets a
package-cyclefinding. (#5039) - Concurrent
fallow mutationruns no longer delete the journal or the run directory of another run. (#5040) fallow mutation --verdictsupdates the function of the judged mutant.fallow mutation --kill-matrixno longer calls a test with a duplicate id redundant. (#5025)fallow health --save-snapshotno longer overwrites a snapshot that it saved in the same second.--hotspots --ownershipreads the configuredcodeownerspath. Barefallowscopes health duplication likefallow health. (#5031)fallow health --complexity-breakdowngives Vue, Svelte and Astro contributions the lines of the file. (#5037)- The typed decision surface reads a moved
package.jsonunder its base path. This applies to thedecision_surfaceMCP tool too. (#5032) - An
@plugininside a comment or a string no longer stops the theme token checks. (#5056) - The VS Code extension keeps a verified binary through a failed upgrade. A second window no longer deletes the download of the first window.
Fallow: Fixsaves only after you confirm. (#5051) - The editor action that dismisses a security candidate type keeps the hashbang on the first line. (#5071)
fallow watchapplies a changedignorePatternsor root.gitignore. (#5027)- Smaller fixes in
fallow flags, thefallow agentfollow-up commands, theignoreFindingsnote, the local similar-code setup, the type-aware sidecar wildcard exports and the Impact store. (#5052, #5059, #5061, #5070, #5072) - On Windows, JSON output keeps the brackets of a route path. A finding in
app/blog/[id]/page.tsxshowed asapp/blog/%5Bid%5D/page.tsxin--format json. SARIF and CodeClimate URIs still encode the brackets. (#5077) - On Windows,
fallow mutationreplaces a stale run directory while another process reads a file in it. Before, the run failed with os error 145. (#5077) - The
urldependency is at 2.5.9 for RUSTSEC-2026-0592. (#5042)
Upgrade notes
- Some command lines that gave an option with no effect now exit with code 2. Remove the option. When the message names a config key or another option, use it. (#4999)
- The functions of
@fallow-cli/fallow-nodenow return a rejected promise for an invalid option or a similar-code companion that is not ready. Before, they threw.awaitin atryblock works as before. Code that caught the throw withoutawaitmust handle the rejection. (#5048) fallow flags --flag-stateexits with code 2 when two keys name one flag. (#5052)fallow cloud logoutexits with code 2 when the keychain does not confirm the delete. (#5060)fallow coverage upload-inventoryandupload-static-findingsfail on a 404, 409, 410 or 422 response, also with--ignore-upload-errors. A 413 response toupload-inventoryexits with the payload-too-large code. A git-SHA keyed upload without--git-shastops whengit statusfails, unless you pass--allow-dirty. (#5058)- A compact
re-export-cycle:line has a line field after the path. A script that splits the line on:must read one more field. (#5014) - The
css-dead-surfaceandcss-broken-referencefindings for unused scoped classes and undefined@keyframespoint at the class or rule, not at line 1. Move a suppression comment from line 1 to the line above the class or rule. Their CodeClimate fingerprints change, so CI shows them as new one time. JSON output adds alinefield tocss_analytics.scoped_unused[]andcss_analytics.undefined_keyframes[]. (#5014) - The extraction, graph and duplication caches rebuild once on the first run.
Full Changelog: v3.46.0...v3.47.0