Repository navigation
chore(deps): update dependency fallow to v3.45.0 - #1001
Merged
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1001 +/- ##
=======================================
Coverage 94.91% 94.91%
=======================================
Files 10 10
Lines 747 747
Branches 235 235
=======================================
Hits 709 709
Misses 35 35
Partials 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.44.0→3.45.0Release Notes
fallow-rs/fallow (fallow)
v3.45.0Compare Source
Added
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, with the cause: a flag, an environment variable, a config key with its file, or a default. It also shows the thread count, the cache directory and the other run settings. Use--for audit,--for dead-code,--for dupesor--for healthto see the rules of another command, and--only,--skipand--production-dead-code,--production-health,--production-dupesto see the effect of those flags. Environment variables show by name only; a variable with a value that fallow cannot read is underenv.ignored, and the human format prints its note on stderr.--onlyand--skipapply to--for combinedand--for auditonly, and exit 2 with another--forcommand. The JSON goes to stdout for each output format; a config that does not resolve exits 2 with a structured error.docs/output-schema.jsondescribes the JSON as theResolvedRunViewdefinition.fallow configwithout--resolveddoes not change.Run notices are part of the JSON output. When a flag has no effect, when the config does not load in the editor, when two config files exist in one directory, when
security.categoriesnames an unknown category, or when aFALLOW_PRODUCTION*variable has a value that fallow cannot read, the JSON output now has aworkspace_diagnosticsentry for it. The new kinds areinert-flag,config-load-fell-back,config-file-shadowed,unknown-security-categoryandenv-value-ignored. An entry names an environment variable and never holds its value.fallow audit --format jsonhas a rootworkspace_diagnosticsarray when such a notice exists. MCP tools show these notices inwarnings, and the degraded-run warning now counts the diagnostics of every section of an audit. The language server writes them to its log. The human output prints a flag without effect and an ignored variable as oneNote:line, and--quiethides it.fallow config --resolvedshows the base ref of an audit. For--for audit,settings.audit_basegives the base that--baseorFALLOW_AUDIT_BASEnames, with its source, and isnullwhen the audit detects the base.fallow config --resolvedshows the type-aware setting. The newsettings.type_awaremember gives the on or off value and its source: a flag or an option,FALLOW_TYPE_AWARE,audit.typeAware, ortypeAware.enabled. It isnullwhenFALLOW_TYPE_AWAREorFALLOW_TYPE_AWARE_REQUIREhas a value that the run cannot use.fallow schema --cli-referenceprints a full CLI reference as one JSON document.The document lists every command and subcommand at each depth, in the
order and the groups of
fallow --help, with its usage line, its full helpand its options. Each option has its value name, aliases, possible values,
default, help heading, conflicts and the
--x/--no-xpair. Hiddencommands and options stay in the document with
hidden: true. The documentalso has the exit codes with a name for each code, the exit codes whose
meaning a command defines itself, the environment variables with a group
and a default, the output formats, the MCP tools and resources, and each
issue type with a sentence-case
display_labeland the text offallow explain <id> --format json. A documentation generator can writethe command pages, the option tables and the issue type pages from this
one file. The repository commits the output as
docs/cli-reference.json.In the default
fallow schemaoutput, the row of theschemacommandgains the
--cli-referenceflag.fallow dupes --helpgroups its options under Detection, Output and Gates.The flags of the
dupesrow in the defaultfallow schemaoutput followthe same order, so
--thresholdnow comes after--trace.Changed
The Node bindings and the Rust API read the config once for each call. A combined or audit call used to load the config for each analysis, so a config edit during a call could give two analyses different settings. The feature flags, mutation and similar-code calls now also check external plugin files, as the other calls do. A config that does not load gives the same error text on each call. The combined result lists each skipped analysis with its reason in the new
skippedmember. TheProgrammaticHealthRunnertrait has a newrefuses_config_type_awaremethod. A custom runner returnstruewhen it does the type-aware config check itself, andrun_health_with_runnerthen does not read the config for that check.fallowchecks the config once before the first analysis. The bare run,dead-code,dupes,healthandauditload, validate and resolve the config one time for each run. A config that fails validation 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, such as--baseline-basewithout--fail-on-baseline-growth. Anauditthat selects no sub-analysis prints only its error, with noloaded configline before it. The workspace discovery notice prints one time for each run. When the host cannot report its parallelism, fallow now starts one worker thread, not four.fallow coverage analyzereadsproductionfrom the config. Without--production, the command analyzed in non-production mode. It now uses theproductionsetting of the config, asfallow dead-codedoes.fallow securityreads the base config from the base commit. Whenfallow security --gate newly-reachablecompares with a base ref, the base side now uses the config file of that commit, as the second base pass offallow auditdoes. A config change in the pull request then shows as a change in the findings. When the base version of the config does not load or does not validate, the base side reads the config file of the head run.fallow mutationandfallow plugin-checkprint a config error with the same text as the analysis commands. An invalid rule pack or boundary now givesinvalid rule pack:orinvalid boundary configuration:without thefailed to load config:prefix. A--configfile that does not load givesfailed to load config '<path>': <cause>, with the path as given. Themessagefield of the JSON error offallow mutation --format jsonchanges the same way. The exit code stays 2.The programmatic audit reads the base version of an explicit config file on the base side. When
AnalysisOptions.config_pathnames a file under the root and the change edits that file, the second base pass ofrun_auditnow reads the base version of that file, asfallow audit --configdoes. Before, that pass read the config file that discovery found in the base checkout. When the base version does not load or does not validate, the audit skips that pass.The
--dupes-baselinenote follows--quietand the output format. Whenduplicates.enabled: falseturns the duplication analysis off, the note now prints only in the human output and without--quiet.--productiononfallow trace --path, a re-export chain trace andfallow trace-errornow prints a note, because these commands read the production mode from the config only.The
sourceof a package.json entry point names the field that declares it.fallow list --entry-points, its JSONentry_points[].sourcevalue and theentry weight listing used the label
package.json mainfor each field of theroot package and of a workspace package, and
package.json exportsfor eachfield of a nested package. A wildcard target such as
"main": "./src/*.ts"used
package.json exportsin each package. The label now names the realfield:
package.json main,package.json module,package.json types,package.json typings,package.json source,package.json browser,package.json binorpackage.json exports. The four labelstypes,typings,sourceandbrowserare new values. A script that matches"source": "package.json main"to find every package.json entry point mustmatch the
package.jsonprefix instead.(Closes #4831)
The language server warns about a
duplicationortypeAwareinitialization option that does not parse. Before, the server ran without the option and said nothing. It now writes a warning that names the option to the log of the editor, for example whenduplication.nearis a string.fallow <command> --helpgroups the options under headings.Each global option has a heading: Project, Output, Scope, Baselines,
Gates, Duplication, Type-aware or Performance. Each command with more than
six options of its own groups them under two to five headings, for example
Issue types, Tracing, Scope and Output for
dead-code, and Scope,Baselines, Coverage, Gates and Review for
audit. A command heading and aglobal heading with the same name print as one section. The
help_headingfield of
fallow schema --cli-referencecarries each heading. In thedefault
fallow schemaoutput,--topofdead-code,healthandflags,--sortofhealth, and the global--no-cache,--threadsand
--performanceflags move, so that each list follows the order of--help. The rootfallow --helpkeeps one options block.Help and schema texts use plain case. Option help, config schema
descriptions and output schema descriptions no longer use all-caps words
for emphasis. The
includeEntryExportsdescription now says that fallowchecks the other exports of an entry file when a plugin
usedExportsrulematches the file, also without the setting. The unused class member
heading now says that a use through
thiscounts as a use. Theenvironment registry of
fallow schemagives the default2.85.0forFALLOW_GATE_MIN_VERSION.fallow explainsays what goes wrong when a finding stays. The "Why itmatters" section of dead-code, dependency, component, suppression, styling,
test reachability, duplication, runtime coverage and flag rules no longer
repeats the definition of the rule. Each tainted-sink security category has
its own reason and its own example line with a sink of that category. The
three complexity rules,
untested-fileanduntested-exporthave oneexample each, and
feature-flagandflag-retirement-candidatehave anexample and a fix. The SARIF
fullDescriptionof each rule does not change.Fixed
The editor finds duplicates in the same files as
fallow dupes. With a per-analysisproductionsetting such as{"deadCode": true, "dupes": false}, the language server and the VS Code extension ran duplication on the files of the dead-code mode. Duplicates in files that production mode leaves out, such as files undertests/, then did not show in the editor, butfallow dupesreported them. The reverse setting showed duplicates thatfallow dupesdid not report. Duplication now uses its own production mode on every surface. (Closes #4784)A stylesheet with an unusual math function no longer stops
fallow dead-codeorfallow health --css. The CSS parser panicked on a math function that does not reduce to one percentage where it expects a percentage, for exampleopacity: max(4%, 5),opacity: calc(4% + 5)orcolor: lab(max(4, nan) 1 1), and the panic ended the run. Fallow now checks the math functions of a stylesheet before the structural CSS parse and skips that parse when a math function would make it panic. CSS Modules classes in such a file come from the plain class scan, and the file gets no CSS analytics.A crafted stylesheet can no longer make
fallow dead-codeorfallow health --csshang. The CSS parse time doubled with each level of nested math functions such ascalc(calc(...)), and the check for nested color functions missed some nesting behind a stray}or inside aurl(. Fallow now reads the stylesheet with the CSS tokenizer before the parse and skips the structural parse of a stylesheet that nests more than 6 math functions or more than 8 color functions. Real stylesheets are not affected.A stylesheet with an unterminated string no longer crashes fallow with a stack overflow. A string that a newline ends hid the nesting after it from the stack estimate when it held
/*, so a deeply nested stylesheet after it overflowed the stack of the CSS parser. Fallow now ends such a string at the newline, as CSS does.A Vue class component with
@Component({ template })no longer gets Angular facts. Fallow read the@Componentdecorator of a.vueor.sveltescript block as an Angular component, so its Vuetemplatestring counted as an Angular template. The decorator in these files comes from a Vue class-component library, so fallow now skips the Angular component analysis there.The experimental tsrs backend accepts tsrs releases with TypeScript-aligned versions. From
7.1.0-beta.tsrs2, tsrs uses the version of the TypeScript release that it ports, and7.1.0-beta.tsrs3is the npmlatesttag. The backend (FALLOW_TYPE_AWARE_BACKEND=tsrs) accepted only>=0.18.0 <1.0.0, so the companion and the CLI rejected these releases. The supported ranges are now>=0.18.0 <1.0.0 || >=7.1.0 <8.0.0. A project can now use the tsrs that the rest of its toolchain installs. The tested version and the install hint are nowtsrs@7.1.0-beta.tsrs3. The type-aware wire protocol is now 9, so Fallow does not use a companion of an earlier release, which still rejects these tsrs releases. A companion fromfallow type-aware setupneeds a newsetuprun. Thanks @PedroMartpico for the report. (Closes #4803)A project package with only a
typesentry now resolves. A package whosepackage.jsonhastypesortypingsand nomainorexportsresolves through that entry. A type import of such a package was an unresolved import, and its dependency was unused.effect.schemaExportsAsTypesreadsHttpApiSchematransforms inpipe. A schema such asSchema.Struct({...}).pipe(HttpApiSchema.asFormUrlEncoded())is now a schema. It stayed an unused export.An Astro project no longer gets an unused dependency finding for
sharp. Astro loads it by name as the default image service ofastro:assets. A config that usespassthroughImageServicedoes not loadsharp, so fallow still reports it there.The editor keeps the
fallow.productionsetting when the project config does not load. The language server then analyzes with the default config, as before, but it now also keeps the production setting and the duplication settings of the editor. An invalid external plugin file in the config now also gives this fallback and a warning.The editor does no duplication work when
duplicates.enabledisfalse. The diagnostics stay the same. Before, the language server ran the duplication analysis and then dropped its result.fallow audit --stagedreuses the parse cache of the checkout. Thestaged audit analyzes a new temporary worktree on each run, so it read an
empty cache and parsed every file again. The run now starts from the parse
cache of the checkout and writes the updated cache back, so a second staged
run parses only the files whose staged content changed. The cache keys each
entry by its content hash, so a staged file that differs from the working
tree is still parsed from the index. Thanks
@frontendwizard for the report.
(Closes #4763)
fallow auditwith a sharedFALLOW_CACHE_DIRkeeps the caches of thecheckout valid. The base pass and the staged pass analyze temporary
worktrees. They wrote their module graph cache into the shared directory,
so the next run of the checkout rejected the graph cache with
root-mismatchand built the graph again. These passes now keep theircaches in their own worktree.
fallow auditno longer reports an existing finding on a workspace package import as introduced. The base worktree shares thenode_modulesof the checkout under review, so its workspace links point at the packages of that checkout, outside the base. The base analysis classified an import such as@acme/libas an npm package and lost the edge, and a boundary violation or another finding on that edge looked introduced in the head. The import now resolves to the workspace package of the base. Thanks @DrJKL for the patch in #4807.A health baseline no longer accepts a new long file in the slot of a fixed function. A count-mode health baseline counted a file-length finding as complexity, so when a function finding that the baseline accepted was fixed, a file that crossed
health.maxFileLinesused its slot andfallow health --baselineandfallow auditwithaudit.healthBaselinedid not report it. File-length findings now have their own baseline categories (file_lines_moderate,file_lines_high,file_lines_critical), and a save marks the file withfile_lines_categories: true. A baseline saved before this release gives the same results as before, and gets the fix when it is saved again. On that save, the shrink-only baseline check reports the newfile_lines_*counts infinding_countsas growth once. Thanks @DrJKL for the patch in #4808.--no-productionnow turns off a configproduction: trueon every command. Onfallow list,workspaces,fix,watch,viz,flagsandsuppressions, a config withproduction: truewon over--no-productionand overFALLOW_PRODUCTION=false. These commands now use the same order asfallow dead-code: the flag, then the environment variable, then the config. The MCPlist_boundariestool now also lets an offFALLOW_PRODUCTIONvalue turn off production mode, and the MCPfix_preview,fix_applyandsuppressionstools now applyproduction: false.fallow viznow finds duplicates in the files of the duplication production mode.fallow fix,list,viz,flagsandsuppressionsnow apply the global--include-entry-exportsand--no-package-baselinesflags. Whenfallow watchreloads an edited config, it now follows aproductionchange in both directions, and it keeps the type-aware flags. The combined analysis run of the VS Code sidebar now passes theallowRemoteExtendssetting to the CLI. The Health view and the workspace picker do not pass it yet.A computed member access credits the class members that its key can name. With a class field
view: Viewandaction: "zoomIn" | "zoomOut",this.view[action]()gave no credit, so fallow reported every member ofViewas unused. Withconst view = new View(),view[action]()counted as a use of the whole object, so fallow reported no member ofView, also a member that no code reads. A key that is a string literal, a conditional of string literals, or a parameter or variable typed as a union of string literals now credits those members. A key of another type keeps the whole-object use. Thanks @neumaennl for the report. (Closes #4799)Type-aware analysis resolves the members of a default-exported class. A member of
export default class Foo {},export default class {}, or a class thatexport default Foo;orexport { Foo as default };exports, stayed unresolved, so fallow kept the unused-member finding when code used the member. The type-aware companion now finds these members. Thanks @DiefBell for the report. (Closes #4792)fallow inspectnow applies--allow-remote-extendsto each part of the bundle. The child processes that collect the evidence did not get the flag, so a config with anhttps://entry inextendsfailed there. The type-aware evidence of a symbol now also reads the flag and theFALLOW_PRODUCTION*variables, as the child processes do.The VS Code extension passes the
allowRemoteExtendssetting in each run. The Health view, the workspace picker, the audit run and the fix run now pass the setting to the CLI, as the combined analysis run does.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
with the flag, but the human report still left them out and printed only a
count line. The human report and its summary line now list and count them,
as the help text says. The same applies when the config sets
showCascade: true. Without the flag or the config key, the report hidesthem as before.
(Closes #4832)
CLI texts match the behavior. The help and the input error of
fallow dupes --tracenameboth accepted forms,
FILE:LINEanddup:<fingerprint>. Thecode-duplicationexplanation describes eachduplicates.modevaluecorrectly:
weakignores only string values, and onlysemanticignoresidentifiers. The combined report prints no em dash in its target hint and
in the warning for a project without entry points.
(Closes #4830)
The MCP
audittool picks the same base on both routes. WithFALLOW_CHANGED_SINCEset, the typedauditanddecision_surfacetools compared with that ref beforeFALLOW_AUDIT_BASEand before the detected base. They now use thebaseparameter first, thenFALLOW_AUDIT_BASE, then the automatic base, as the tool description says and as the CLI route does.FALLOW_CHANGED_SINCEgives the base only when the audit detects none.fallow healthrejects aFALLOW_TYPE_AWAREvalue that is not valid UTF-8.fallow dead-codealready stopped with exit code 2 for such a value, butfallow healthignored the variable. Both commands now give the same error. AFALLOW_TYPE_AWARE_REQUIREvalue that is not valid UTF-8 now also stops each command that reads type-aware settings with exit code 2. Before, the commands ignored it.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.(Closes #4840)
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 did not count that import as a use, so it removed theexportofain./a, and the type check then failed with TS2306 or TS2459. The fix now also removes an import binding when the removed list specifiers are all of its references in the file, and the full import declaration when no binding is left. An import without bindings, such asimport './polyfill';, does not change. The dry run lists each import removal. An import declaration that shares a line with other code, or a file that does not parse, keeps its imports.Thanks @MikeSpock for the report.
(Closes #4833)
The commit gate block message no longer includes the
verified:line of the npm launcher. The npm launcher prints a secondverified:line forfallow --version. The gate script offallow setup-hooksnow reads only the first line of that output. The block message and the version floor check use only that version.(Closes #4842)
fallow schemalists the environment variables that it did not list.The
environment_variablesmap now hasFALLOW_CLOCK_EPOCH,FALLOW_MCP_MAX_OUTPUT_BYTESand the fourFALLOW_GATE_*variables of theagent gate script.
fallow schemanames the rules key of the complexity and file-length findings.The
high-cyclomatic-complexity,high-cognitive-complexity,high-crap-scoreandlong-filerows had a nullconfig_key,default_severityandopt_in, althoughrules.complexity-cyclomatic,rules.complexity-cognitive,rules.complexity-crapandrules.complexity-file-linesdecide if these findings fail a run. The rowsnow name these keys, their default
errorandopt_in: false. Thefallow://issue-typesMCP resource andnpm/fallow/issue-registry.jsongive the same values.
The human duplication report uses the singular for one clone group.
The header reads
Duplicates (1 clone group). The overflow and corpustotal lines also use the singular for one group or one family.
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 readas an empty range. The line now prints the merge base of the base ref and
HEAD, the commit that the changed-file diff starts from.(Closes #4838)
fallow explainstates the facts of each rule correctly. Theunused-class-membertext says that private members are not checked. Theunused-filefix namesentry,supportEntryanddynamicallyLoaded.unused-dependencynamesignoreDependencies.mixed-client-server-barreland
misplaced-directivelist every React Server Components bundler thatturns them on.
prop-drillingreports a prop that passes unchanged through2 or more components.
unrendered-componentnames Vue, Svelte, Astro,Angular and Lit.
Every structure, styling and coverage rule has an example and a fix.
route-collision,dynamic-segment-name-conflict,invalid-client-export,mixed-client-server-barrel,misplaced-directive,re-export-cycle,package-cycle, the fivecss-*rules and the fourcoverage-intelligence-*rules had none. The fiveruntime-*rules nowhave one example and one fix each.
Help texts name the add-ons as users know them. The help of the
runtime coverage options,
coverage setup,ci post-check-run --decision,the
type-awaresubcommands,similar-code statusand the mutationoptions names the runtime coverage add-on, the type-aware companion, the
similar-code companion and the mutation runner. Help texts lose internal
labels, all-caps emphasis, contractions,
<https://...>markup and thenames of other tools in
--version.--fail-on-issueslists every formatthat exits 0 without it, and the
dupesdefaults name the config file.The config schema describes each key for its users.
productionnames the commands that each per-analysis key affects.
circularDependenciesnamesallow.ignoreDependencyOverridescoversnpm and bun overrides and bun
resolutions.extendsstates the remoteopt-in, the 5 second timeout, the 1 MB limit and the depth limit of 10.
ignoreFindings,ignoreDependencies,ignoreUnresolvedImports,ignoreExports,ignoreCatalogReferences,minimumVersion,includeEntryExportsandsharedStateAllowlistgain the facts that auser needs, and the override rule keys say what they do. The schema gives
the defaults of
cache.maxSizeMb,effect.schemaExportsAsTypesand thelist keys that had none.
Messages and descriptions drop internal and history wording. The error
for a missing runtime coverage add-on names the add-on.
telemetry statuslinks to the telemetry document instead of a repository path. The glob
warning no longer compares with an older fallow version. The descriptions
of the environment variables name the add-ons, the cache trim at 80 and 60
percent, the 32-snapshot limit of the audit cache and the lookup order of
FALLOW_BIN. Each exit code description ends with a period, and code 2describes its JSON error in words.
The help of
fallow list [PATH]says what the path limits. The pathlimits the listed files, entry points and entry weights. The help said
that it scoped reported findings, but
listreports no findings.Runtime coverage messages name the runtime coverage add-on. The
signature, protocol, spawn and response errors of the add-on, the
FALLOW_COV_BINandFALLOW_COV_BINARY_PATHerrors, the runtime coveragefields of the JSON output schema and the
coverage setupJSON contractno longer say "sidecar".
fallow audit-cache prunereports "lock file"and "orphaned marker files" instead of "lock sidecar" and "orphaned
sidecars". The JSON
reasonvalueorphaned-sidecarsstays the same.More descriptions lose all-caps emphasis and internal labels. The
audithelp, the gate descriptions of the JSON output schema, themixed-client-server-barreltexts and the opt-in parameters of theinspect_targetMCP tool use plain words. The mutation config keys namethe mutation runner and the type-aware companion.
fallow schema --cli-referenceshows each value name and an optional value.Options get
value_names, for exampleFROMandTOfortrace --path,and
value_optional, which is true for--save-snapshot.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.