Repository navigation
chore(deps): update dependency fallow to v3.43.0 - #983
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
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 #983 +/- ##
=======================================
Coverage 94.77% 94.77%
=======================================
Files 10 10
Lines 746 746
Branches 235 235
=======================================
Hits 707 707
Misses 36 36
Partials 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
3.42.0→3.43.0Release Notes
fallow-rs/fallow (fallow)
v3.43.0Compare Source
Added
Add
architecture --shared-stateto inventory direct writes through imported values and custom global read/write sites. Observations support human, JSON and Markdown output, remain outside finding totals and gates, and make no claim about runtime identity or execution order.Exclude intentional Tailwind arbitrary values with
health.tailwindIgnorePatterns. These regular expressions match normalizedprefix-[value]tokens and exclude matching classes from token-drift findings and analytics, including CVA variants. Variants, negative signs, and suffix modifiers are omitted:-mt-[7px]andmt-[7px]both match asmt-[7px], andbg-[#abc]/50matches asbg-[#abc]. Exclusions cannot distinguish these spellings. The default excludes nothing. For example,"^icon-\\["excludes Iconify classes while preserving other arbitrary-value findings. Thanks @DrJKL for the patch in #4421.fallow securitysays whenclient-server-leakchecked nothing. The rule starts only from files with a top-level"use client"directive. When no such file exists, for example in a React Router Framework Mode app or a Vite SPA, the run now records theclient-server-leak-no-client-rootsworkspace diagnostic. The human output prints a blind-spot line, and MCP adds awarningssentence. Other commands record the diagnostic only when the config sets the rule towarnorerror.Thanks @cr101 for the report. (Closes #4430)
fallow mutation inspect <id> --replaycalls the mutated function on the original and on the mutant. Pass the arguments with--args '[2, 3]'. The replay calls the export three times on each side, in turns, and shows the results side by side. A difference that each call repeats is awitness: a test with this input can kill the mutant. Equal results areno_witness_found, neverequivalent. A side whose calls differ isunstable. Each call loads a fresh module instance with a fixed clock and a fixedMath.randomseed, and the replay of each mutant runs in its own worker with a wall limit. The Vitest andnode:testrunners replay. The JSON output adds thereplayobject, and the runner companion has a versioned replay contract.fallow mutation --record-args valuesrecords the arguments of the changed exported functions.fallow mutation inspect <id> --replaywithout--argsthen replays up to 3 recorded inputs and stops at the first witness. Recording is off by default, and it runs as a separate pass after the mutant runs, so it never changes a result of the run. The inputs stay in the gitignored cache directory for 7 days, an input with a secret (by key name or by entropy) is not kept, and--record-args shapeskeeps the argument types only. The report gets arecordingsummary with counts and the reasons of the calls that cannot be replayed, never the values.fallow mutation tasksgives a ready test input for a survivor. After afallow mutation --record-args valuesrun, the run replays the recorded inputs of up to 20 open tasks. A task getswitness: a recorded input that shows a difference, with the result of the current code and of the changed code, and thefallow mutation inspect <id> --replaycommand. A test with that input that asserts the current result kills the mutant. The MCP toolmutation_tasksgives the same field. The run report holds only the verdict and the input id, and the markdown output oftasksshows no value. A verdict other thanwitnessnever means that the mutant is equivalent.New opt-in rule
constant-parameterreports a parameter that each call passes in one way. It reports a parameter of a module-scope function when each visible call passes the same value (identical-argument), or when no call passes an optional parameter (never-passed). The same value is the same literal, or the sameconstwith a literal initializer or the same enum member, also through imports and re-exports. For a destructured options parameter such as{ retries = 3, signal }, the rule reports each key that no call sets, or that each call sets to the same value, with the fieldoption_key. The finding lists the value, the call count, up to 20 calls, and the count of conditions that test the parameter. Turn it on withfallow dead-code --constant-parametersorrules.constant-parameters; the default isoff, and the rule has no automatic fix. The rule reports only when it sees each caller: it skips public API and entry-point exports, dynamic imports, CommonJS, a function used as a value, template files,eval, framework auto-imports, functions that a test file declares, a module that an asset import such as./op.ts?rawreads, an exported function that animport()orrequirecall with an unknown source can reach by name, a wrapped default export such asexport default pad as Fn, and functions with fewer than 2 calls (MIN_CALL_SITESis 2; it has no config key). A recursive call that passes a parameter or an option key on unchanged does not count as a call for it. A file with a parse error, or an HTML page with an inline script, blocks only the functions that its import specifiers can reach. JSON, SARIF, CodeClimate, markdown, compact, human output, baselines, LSP, MCP, the Node bindings and the VS Code extension carry the finding. A test file is a caller unless--productionis set. When the rule is on, the dead-code count gate of the GitHub Action counts its findings unlessfail-on-issuesisfalse. The first run after the upgrade parses each file again, because the cache format changed.(Closes #4491)
The focus map of the review brief now ranks changed files also by churn, complexity growth, test reach and surviving mutants. The
scoreof each focus unit can carry four new components:churn(the recency-weighted commit count of a source file),worsened(the changed functions whose complexity grew against the base),test_reach(the changed exports that no test runs for real) andmutation(the surviving mutants on added lines). The newfallow audit --mutation-report <file>flag reads a savedfallow mutation --format jsonreport for themutationcomponent. Each component is capped, adds tototal, and is absent while it is zero. The new components can changetotal, the label and the rank order of a unit, and thereasontext gains one clause for each present component.triage.risk_classdoes not change. A run without a git history has no diff, so without--mutation-reportit gives the same JSON as before.(Closes #4505)
New opt-in mutation operator
nullish-fallbackremoves the fallback ofa ?? b. The mutant isa. A survivor shows that no test gives a nullish left operand. Name the operator in--operatorsormutation.operators; a run that does not name it gives the same plan and the same mutant ids as before. With--typecheck, a survivor gets the advisory hinttype-non-nullishwhen the declared type ofaexcludesnullandundefined. A left operand that is an optional chain gets no hint.(Part of #4502)
A
negate-conditionsurvivor can now carry the advisory hintequivalence_hint: "constant-parameter". The hint is present when the test is a parameterp,!por!!p, each visible call passes the same literal forp, and the mutant sets the test to the value that the literal gives it. The hint uses the evidence of theconstant-parameterrule, so a mutation run that includesnegate-conditioncomputes that rule also when the project leaves it off. A function whose callers are not all visible gets no hint, and a suppression of the rule removes the hint. The status stayssurvived, and the score does not change.(Closes #4502)
constant-parameterreads type evidence in type-aware mode. With--type-aware(ortypeAware.enabled) and the rule on, the rule reports two more kinds of finding. The new reasonunused-defaultreports a parameter with a default where each call passes a value whose type excludesundefined, so the default never applies. The rule also reads the methods of exported classes, with the reasonsnever-passedandunused-default; the finding names the method asClass.method. These findings carryevidence: "type-aware", the human and CI output add(type evidence), and SARIF putsevidencein the result properties. A type does not prove a run-time value, so the explanation says that ananyvalue, a cast, or data from outside the program can break the claim. The TypeScript companion checks only the candidates that the closed-world gate selects. It gives no evidence withoutstrictNullChecks, for an index read or a call result withoutnoUncheckedIndexedAccess, for a binding that code writes after its declaration, for a class field that can stay unset, for a narrowing by a type guard, or when an assertion, ananyvalue or a@ts-*comment is on the path to the argument. A method gets no finding when a decorator, an overload, a member of a dependency type, a name that the platform calls, a reference that is not a call, an unresolved, computed or reflective member access, a file outside the program of the class, or a structurally compatible type can hide a call._meta.type_aware.call_evidencecounts the candidates, the findings and each abstention reason. Without type-aware mode, the output of the rule does not change. The editor session reports only the findings that the call facts prove.(Closes #4516)
An audit that compared no changed file now says so.
fallow auditprints a note on stderr, also under--quiet, when its scope has no changed file, because its verdict then checked nothing. The GitHub Action prints the same fact as a::warning::, and the GitLab template as aWARNING:line. A push to the default branch causes this: the run has no pull request base, and the base that the CLI finds is HEAD itself. The warning names the base ref and tells how to give a base. The job result does not change.fallow audit --stagedaudits the staged index, not the working tree. The changed files are the staged changes against HEAD, and the analysis reads each file from the index. Unstaged edits and untracked files do not change the verdict. A file that you stage and then delete from the working tree is still audited. When Git gives the hook another index file (git commit -a,git commit <path>), the audit reads that index.--stageddoes not take--baseor--changed-since.The agent task matrix and the
fallowskill now namefallow mutation. The matrix has the row "improve or check the tests of a change" withfallow mutation --plan --base <ref>. The row is infallow --help, infallow schema(task_matrix), in thefallow://task-matrixMCP resource, in theAGENTS.mdblock offallow init --agentsandfallow hooks install --target agent, and in the cheat sheet of the skill. The description of the skill names mutation testing, and the skill has a short workflow for the tests of a change.Changed
The extraction cache format changed. The first run after the upgrade parses each file again. The cache holds the parameters of module-scope functions and the arguments of their direct calls for the
constant-parameterrule. A run with the rule off does not store or decode these facts.fallow mutation --kill-matrix-forgivesbaseline-failureonly to the targets that the failure can affect. Before, one test that failed with no active mutant made each targetincomplete. A broken test anywhere in the suite then blocked every target. Now a target getsbaseline-failureonly in these cases:A target can now be
completein a run with baseline failures, so its tests can becandidates. When baseline failures are the only cause of a partial run, only the affected targets getpartial-mutation-run. Each other cause of a partial run still applies to each target. The top-levelstatus,reasons, andcompletiondo not change. Shared state across test files is outside the rule.A failing test no longer makes the kill of a target test shared. A passing test in the test file of a baseline failure also does not make a kill shared. Such a kill stays in
unique_kills. The human report names the baseline failures of each target under its line.(Closes #4469)
npm install fallowno longer installs the type-aware companion and TypeScript 7. This makes the install about 30 MB smaller on every platform. Default analysis does not use the companion. A project that uses--type-awareormutation --typecheck, or that turns ontypeAwarein its config, must now add it at the same version asfallow:npm install --save-dev fallow-type-aware@<fallow version>. A globalfallowneedsnpm install --global fallow-type-aware@<fallow version>. For npx, start both packages together:npx -p fallow@<version> -p fallow-type-aware@<version> fallow. The GitHub Action and the GitLab template install the companion themselves. Thefallowlauncher now also finds the companion from the project root, so pnpm projects work too. Without the companion,--type-awarekeeps the syntactic findings, and its warning andfallow type-aware statusname the install command for a project, a global install and npx.The
@fallow-cliplatform packages no longer contain the similar-code companion. Each platform package is 7 to 12.5 MB smaller. Onlyfallow similar-codeand the MCPfind_similar_codeandinspect_similar_codetools use the companion. A project that uses them installs it at the same version asfallow:npm install --save-dev fallow-similar-code@<fallow version>. Thefallowlauncher finds the package, verifies it, and passes its binary to Fallow, which verifies theEd25519signature again before it runs it. The release archives on GitHub keep the companion next to the CLI binaries. Without the companion,fallow similar-code statusnames the install command.The MCP server refuses a response over 1,000,000 bytes, and the refusal names the parameters that make the output smaller. Before, the default cap was 16 MiB. That is far above the context window of an agent. A host then cut the result, or saved it to a file that the agent could not read in one pass. On a large public monorepo, an unfiltered
analyzereturned 5.6 MB andfind_dupesreturned 9.2 MB. Both now get a valid refusal (isError,exit_code: 2,code: FALLOW_MCP_SUBPROCESS_OUTPUT_LIMIT). The cap is the same as the default result cap of Code Mode. The refusal body has a newnarrowarray with the parameter names of the refused tool that reduce its output, for exampleissue_types,fileandworkspaceonanalyze, ortoponfind_dupesandcheck_health. SetFALLOW_MCP_MAX_OUTPUT_BYTESin the server environment to use a different cap, up to 16 MiB. Themax_output_bytesparameter of a call still only lowers the cap.The install hint for a missing companion uses the package manager of the project. When
fallow-type-awareorfallow-similar-codeis missing, the hint of--type-aware,mutation --typecheck,fallow type-aware status,fallow similar-codeandfallow similar-code statusnow showspnpm add -D,yarn add -Dorbun add -dfor a project that uses pnpm, Yarn or Bun, the same asfallow doctor. Fallow looks in the analysis root (the working directory forsimilar-code statusandsetup) and then in each parent directory up to the repository root. In the first directory with a signal, thepackageManagerfield ofpackage.jsondecides before a lockfile. Without a signal, the hint staysnpm install --save-dev.The human
fallow healthoutput now says clearly when CRAP scores are a static estimate. When fallow finds no coverage file, one note above the complexity findings says that no coverage file was found and that CRAP scores are a static estimate. The note tells you to pass--coverage <coverage-final.json>for measured scores, or to raisehealth.maxCrap. With--explain, the note also shows the estimate tiers (85%, 40% and 0%) and the formula for an untested function,cc^2 + cc. The CRAP formula and the JSON output do not change. JSON consumers can readsummary.coverage_model: "static_estimated"for the same fact.The
fail-on-issuescount of the GitHub Action andFALLOW_FAIL_ON_ISSUESof the GitLab template now follow rule severity for dead code. Ondead-code,check,architectureand the dead-code part of the combined run, only the findings whose rule iserrorfail the job. This is the same rule as the CLI exit code. Before, a finding whose rule iswarnalso failed the job, so the check could be red while the comment and the CLI said the run passed. The count comes fromgate_outcomes["error-severity-findings"].observed. Awarnfinding stays in theissuesoutput and in the advisory warning. Fallow 3.29.0 to 3.31.x publish the entry withoutobserved. There apassstatus counts as 0, and afailstatus lets every finding count. A fallow older than 3.29.0 publishes no such entry, so there every finding still counts. Duplication, health and security counts do not change.The generated pre-commit hook runs
fallow audit --staged.fallow hooks install --target git,fallow init --hooks, the existing-hook hint and the Lefthook hint now audit the commit that Git is about to make. Before, an untracked file in the working tree could block a clean commit, and a staged file that was deleted from the working tree passed without an audit. Before the first commit of a repository, the hook skips the audit and prints one line on stderr.--branchhas no effect now and prints a note. Runfallow hooks install --target git --forceto update an installed hook.fallow audit --gate new-onlynow reports the unused files and unused exports that a change creates outside the changed files. A change can make code unused without a change to that code: it removes the last import of a file or an export, or a config change removes an entry point. The audit compared only the changed files, so it passed such a change. Now the audit keeps an unused file or unused export outside the changed files when the base does not report it, marks itintroduced: true, and counts it inattribution.dead_code_introduced. An unused file or unused export outside the changed files that the base also reports stays out of the report, as before. When the change touches the config file, the base runs one more dead-code pass with the config of the base commit, so a removed entry point counts. That pass gives no evidence when the base config turnsunused-filesorunused-exportsoff. Code that the base config ignores (withignorePatterns,ignoreFindings,ignoreExportsor an override) does not count as introduced when the change stops ignoring it. An unused export in a file that was unreachable at the base does not count as introduced either. A[PATH]scope still bounds the report.--gate allkeeps the report to the changed files. A cached base snapshot of an earlier version is not reused.The
--file-scoresfooter offallow healthand the--coveragehelp text now use the same terms as the static estimate note. Without a coverage file, the footer now says that CRAP scores are a static estimate from export references, and that--coverage <coverage-final.json>gives measured scores. Before, the footer said "estimated" and "exact scores", while the note above the findings said "static estimate" and "measured scores". The--coveragehelp offallowandfallow healthnow says "measured" in place of "exact". The estimate tiers and the JSON output do not change.Fixed
Preserve embedded script parse diagnostics and property-depth truncation, and invalidate stale parse caches so incomplete inventories and existing parse-error gates report lost source evidence.
fallow mutationno longer fails each Vitest test that uses atest.extendfixture. TheafterEachhook of the Vitest setup file now takes an object pattern as its first argument. Vitest reads that argument for the fixtures of a test, and before this fix each fixture test failed withFixtureParseErrorin the dry run. The help of a run that a baseline failure blocks now points atbaseline_failures[].messagein the JSON report, which holds the error of each failed test, and no longer guesses environment variables as the cause.Thanks @andrius-kr for the report. (Closes #4423)
fallow mutationno longer reports a slow test as a baseline failure when the test is close to its timeout. The dry run executes the instrumented code, which is slower than the original code. The dry run now gives each test three times the test timeout of the project. Vitest gets three times thetestTimeoutandhookTimeoutof each project, andbun testgets three times the Bun default. Mutant runs keep their timeout from the dry-run durations. (Closes #4409)fallow security --gate newno longer says that it reports on the whole project when it cannot resolve--changed-since. The gate needs the diff of the ref. When git cannot resolve the ref, the run now prints only the gate error and exits 2. Before, the run also printed the--changed-sincefallback warning, which said that the report covered the whole project, but the run produced no report. The gate also resolves the ref before the analysis, so the run stops sooner. Without--gate, the run still reports on the whole project, warns, and recordsrequest_outcomes["changed-since"]asnot-applied.Thanks @cr101 for the report. (Closes #4431)
--type-awareno longer confirms a setter as used because of a read, or a getter because of a write. TypeScript gives agetandsetaccessor pair one symbol, so a read such asif (mod.file)also confirmed the setter, and the refined report dropped it. The semantic pass now credits a read to the getter, a plain assignment to the setter, and a compound assignment such as+=to both. A setter that the code only reads is now reported with and without--type-aware.The arguments of
cp,mvand other file utilities in package scripts no longer become entry points. A script such ascp ./README.md ./libmadeREADME.mdandlib/index.tsentry points, so Fallow did not report an unused file behind them. The utilities that only read, search, copy, move, delete or change files (awk,cat,chmod,chown,cp,echo,grep,head,ln,ls,mkdir,mv,rimraf,rm,rmdir,sed,sleep,sort,tail,tee,touch,uniq,wc) now make no entry points from their arguments.find,xargsand the shells keep their behavior, because they can run another program. (Closes #4455)A quoted
jqfilter in a CIrunstep no longer becomes an entry pattern. A step such as$(... | jq -c '.services[]')gave the warninginvalid entry patternon eachfallow listrun. Fallow now drops an inline-code argument of a config flag in a CI command. A file path after such a flag is still an entry point. Thanks @rezamuliawijaya for the patch in #4418 and @deniskern for the report. (Closes #4380)A stored security verdict now survives an edit that moves the sink to another line. Each
fallow securityfinding has a newstable_finding_idof the formsec1:<16 hex digits>. It hashes the rule, the project-relative path and the exact source text of the full sink expression (the full assignment, or the full call with all arguments), so whitespace, comments, line breaks, trailing commas and an edit above the sink do not change it. A hard-coded secret hashes its variable name and provider family, never the value. A client-server leak hashes the paths of its first and last trace hop and the names of the env secrets that it reads. Identical sinks in one file get the suffix~1,~2and so on, and a sink that an inline comment suppresses keeps its suffix position. A sink in Vue, Svelte or Angular template markup has nostable_finding_id; key its verdict byfinding_id.fallow security survivorsaccepts this id orfinding_idin a verdict, and the output stays keyed byfinding_id. The location-basedfinding_idand the SARIF fingerprint do not change. Thanks @cr101 for the report. (Closes #4429)The setup hint of a bare
fallowrun now namesnpx fallowwhennpxstarted fallow. Before, the hint said to runfallow init. After anpx fallowrun, that command usually fails withfallow: command not found, becausenpxdoes not put fallow onPATH. The hint reads thenpm_commandvariable thatnpxandnpm execset toexec. The tip afterfallow impact enableuses the same rule forfallow init --hooks. Other runs still showfallow init. The JSON next steps do not change.fallow mutationno longer fails the dry run of a test that runs a source function in another realm. A test can serialize a function withtoStringand run it in anode:vmcontext or in a browser page, for example through a mock of Playwrightpage.evaluate. The mutant switch in that function called a prelude function that does not exist in the other realm, so the test failed withReferenceError: __fallow_m_a is not defined. Fallow then reported abaseline-failure, and with--kill-matrix-foreach target wasincomplete. Each switch call now has atypeofguard, so the function runs its original code in the other realm. Thanks @cr101 for the report. (Closes #4438)fallow mutation --kill-matrix-forno longer stops the run for one target that selects no test. Before, one such target made the full run exit2withFALLOW_MUTATION_TARGET_UNMATCHEDafter the dry run, and the report had no results for the other targets. A test that runs the code only in a child process, for example withspawnSync, is a usual cause. Now the run goes on with the other targets. The entry of the target inkill_matrix.targetshas the statusincompleteand the reasonunmatched-target. The new reasonsnot-a-test-fileandno-planned-codetell why. The run exits2only when no target selects a test. When the dry run runs the file of no target, the run stops before the dry run, so the error comes fast. This is also true when no test file reaches the planned code.Thanks @cr101 for the report. (Closes #4439)
--type-awareno longer gives up on a project because of a strict-mode name error that@ts-ignoresuppresses. The semantic pass treated each binding diagnostic as blocking, also one under a// @ts-ignoreor// @ts-expect-errorcomment, which the compiler drops. For example, Svelte declaresexport const arguments: never;under// @ts-ignorein an ambient file, so the whole program got no type evidence. The semantic pass now applies these comments, as the compiler does, to strict-mode name errors such as an invalid use ofarguments. Other binding errors, such as a duplicate declaration, and syntax, program and configuration errors stay blocking.fallow mutationwith Vitest now shows avi.stubEnvvalue to code that readsimport.meta.env. Before, such a test passed withvitest runbut failed in the baseline, and the run waspartialwith the reasonbaseline-failure. The cause was the order of the transforms. The companion replaced the code after the transforms of Vitest ran, so theimport.meta.envread did not go to the environment object of Vitest. Now the companion gives the instrumented file to Vite as the file on disk. Each transform of Vite, Vitest and the project then runs on the instrumented code, as withvitest run.(Closes #4470)
fallow mutationprunes build-tool code that no test can reach. In a tool config file such asvite.config.tsthat no test and no application code imports, each mutant now gets the prune reasonframework-config, also in an inline plugin hook or a middleware callback. A module that only tool config files reach, such as a Vite plugin module that onlyvite.config.tsimports, gets the new prune reasonbuild-tool-only. A file that a test, a setup file or application code also imports keeps its status, for example an Angularsrc/app/app.config.tsthatsrc/main.tsimports. Before, these mutants wereno_coverageand lowered the reported coverage. The plan JSON counts these mutants in the newpruned_build_tool_onlyfield, which is absent when it is 0.(Fixes #4471)
fallow mutation --planandfallow doctornow report an unsupported Vitest version. Before, only the run stopped, withFALLOW_MUTATION_RUNNER_UNSUPPORTED, after the full setup. The plan and doctor now read thepackage.jsonof the installed Vitest, and run no code. Themutation-planJSON has a newrunnerobject withname,package,installed_version,supported_range,supported,messageandhelp. The human plan prints aRunner:line and a hint when the run cannot start. The plan still exits0. Doctor has a newmutation-runnercheck. It warns when Vitest is outside the supported range or is not installed, and names the install command. It passes for a supported Vitest. It is skipped for thenode-testandbun-testrunners, and when neither the rootpackage.jsonnor the rootnode_moduleshas Vitest. The doctorschema_versionstays2.(Closes #4465)
The GitLab CI template no longer fails the job when the installed fallow has no
fallow report. WhenFALLOW_VERSIONis empty, the template installs the fallow version thatpackage.jsonpins. Before, a pin older than 3.4.2, for example2.91.0, stopped the Code Quality step withunrecognized subcommand 'report'and exit code2. Now the template runs the analysis again with--format codeclimate, which these versions support. This second run has the same scope as the first run, but it does not save a baseline or a snapshot again. The job log names the installed version, where the version came from, and the minimum version 3.4.2. When the older fallow cannot make the report in that way either, for example with--report-path-prefixinFALLOW_ARGS, the template writes an empty Code Quality report, shows a warning that tells you to update the fallow dependency or setFALLOW_VERSION, and continues the job. Mutation entries need a current fallow and are not in the report from the older path.(Closes #4481)
fallow mutation --rechecknow keeps the earlier results and replaces the--reportfile. Before, a recheck wrote its report only to.fallow/mutation/last-report.json. Sofallow mutation tasks --report <file>still listed each old task. Also, each earlier kill becameprunedwithprune_reason: "not-selected", so the summary did not describe the full set.Now a recheck without
--mutantreplaces the--reportfile too. Each mutant that the recheck did not select keeps its earlier status and evidence, withcarried: true. The summary and the score count the merged set. An earlier result applies only while its file has the digest of the earlier report. An earlier kill also needs the test files of its killing tests. When a file loses its earlier results,recheck.stale_filesnames it.The
recheckobject adds the countcarried. The kill matrix stays the evidence of the run. The recheck does not run a carried mutant again. After you remove or change a test, runfallow mutationwithout--recheck.(Closes #4477)
npm install fallowon Linux now installs one platform binary, not two. The Linux platform packages now declarelibc, so npm, pnpm, Yarn Berry and Bun install only the glibc or the musl package. Yarn 1 does not readlibcand still installs both. This makes the install 56 to 59 MB smaller on linux-arm64 and 65 to 71 MB smaller on linux-x64. When anode_modulestree was installed on musl and then runs on glibc, thefallowandfallow-similar-codelaunchers use the musl binary, which is statically linked. When no matching binary is installed, thefallowlauncher names the detected libc and thenpm install --libcflag. A cross-target install from macOS or Windows for a Linux image must now pass--os=linux --cpu=<arch> --libc=<glibc|musl>. An image build that installsnode_moduleson glibc and runs it on musl (for example a Debian build stage and an Alpine runtime stage) must install with--libc=musl.The suggested Yarn command now works at the root of a Yarn 1 workspace project. Yarn 1 refuses
yarn add -D <package>at a workspace root and asks for-W. At such a root, Fallow now adds-Wto these commands:fallow doctorfix commands;--type-aware,type-aware statusandsimilar-code;fallow-covhint;fallow coverage setupruns, and the beacon command that it prints.Fallow identifies Yarn 1 from a
packageManagerfield withyarn@1., or from the Yarn 1 header inyarn.lockwhen the field does not name Yarn. Yarn Berry rejects-W, so its commands do not change. (#4519)Each run of a multi-analysis SARIF document now has its own category. GitHub code scanning reads the
automationDetails.idof a run ascategory/run-id: the category is the text before the last/. GitHub rejects an upload with two runs that have the same tool and the same category. Before, the dead-code run and the health run of one document had no id, soupload-sarifgave them the same category and the upload failed. Now each id ends with a/, so the full id is the category. Barefallow --format sarifgives the idsfallow/dead-code/,fallow/dupes/andfallow/health/.fallow audit --format sarifgivesfallow/audit/dead-code/,fallow/audit/dupes/,fallow/audit/health/andfallow/audit/diff-risk/.fallow report --from <file> --format sarifgives the same ids as the direct output. The SARIF of a single command, such asfallow dead-code --format sarif, does not change.Migration note for code scanning. The
category:input ofupload-sarifdoes not apply to a run that already has an id. The runs of the documents above therefore use the categories in their ids, also when a workflow sets its own category. Alerts from these runs move to the new categories once. GitHub can show the alerts of the old category as closed after the first upload. Thefallow/dupesandfallow/audit/diff-riskids also change, tofallow/dupes/andfallow/audit/diff-risk/.The churn cache no longer keeps a truncated history after
git fetch --unshalloworgit fetch --deepen. Before, a run on a shallow clone saved the shallow history in the cache. After the fetch, the next run used that cache. With the same HEAD, hotspots and change coupling still showed the shallow history. After a new commit, the run added only the new commit and reportedshallow_clone: false, so the truncated history had no warning. The cache now stores the shallow state and a hash of the shallow boundary of the clone. A change of either one makes the next run read the full history again.fallow dead-codecredits the shared config packages thatextendsinbiome.jsonorbiome.jsoncnames. Before this change, a package such as@acme/biome-configin"extends": ["@acme/biome-config"]was reported as an unused dev dependency. The Biome plugin now readsextendsas a string or an array, and credits the package name without its subpath, so@acme/biome-config/strictcredits@acme/biome-config. A file path (an entry that starts with.or/, or ends in.jsonor.jsonc) and the Biome 2 root marker//credit no package.The Git pre-commit hook from
fallow hooks install --target gitnow finds a project-local fallow. A Git client does not addnode_modules/.bintoPATH. Before, the hook found nofallowonPATHand let every commit through without an audit and without a message. The hook, the hint for an existing hook and the Lefthook job now use one shared lookup:PATH, then./node_modules/.bin/fallow, thenyarn exec fallow, thennpx --no-install fallow. When no install is found, the hook still lets the commit through, but it printsfallow-hook: fallow not found (...), skipping the pre-commit audit.on stderr. Runfallow hooks install --target git --forceto update an installed hook.The Git hook and the agent gate no longer select a
fallowlauncher that cannot run. A launcher whose package is gone exits withMODULE_NOT_FOUND. Before, the agent gate selected it, read an empty report and skipped the audit, also when the project had a working install. The Git hook selected a broken launcher onPATHand blocked every commit. Both now use an install only when--versionprints a fallow version, so a working project-local install is used. When a launcher exists but no install works, both block the commit. The message names the launcher and its first error line, for exampleCannot find module '@fallow-cli/darwin-arm64'. To update an installed hook and gate, runfallow hooks install --target git --forceandfallow hooks install --target agent --force.Agent hook commands now credit the packages that they run. Fallow reads the
hooks.<Event>[].hooks[].commandentries of.claude/settings.jsonand.codex/hooks.json, the same way that it reads git hook commands. It follows a script path that starts with$CLAUDE_PROJECT_DIRor$PWD. It does not read the personal.claude/settings.local.json, because that file is not in git and a local run must agree with CI. A hook that runsnpx some-tool, or a shell script that runs it, markssome-toolas used. A hook that runs the gate thatfallow agent installwrites marksfallowas used. Before this fix, a project with no fallow config file that ranfallow agent installgotfallowas an unused devDependency. Production mode skips these hooks, like the git hooks.fallow auditno longer reports askip-onlyweakened test for a skip marker that the base already had. A change that edits other text on anit.skip(ortest.only(line, for example a callback that becomesasyncor a new test title, gave the finding "The change addsit.skip". Fallow now compares skip and focus markers by chain and title, not by line text. A new marker next to an existing one, or a skip that moves to another test, still gives a finding.The pull-request comment says "Quality gate failed" when an enforced gate failed. The diff filter of the comment can drop every finding of the run, for example a circular dependency that starts outside the changed lines. The run then exits 1, but the heading said "Quality gate passed". Now a failed enforced gate in
gate_outcomessets the heading. The check-run conclusion does not change.The GitHub Action installs the fallow version of a pnpm or Bun catalog. A
"fallow": "catalog:"or"catalog:<name>"dependency inpackage.jsonmade the Action install the latest release. Now the Action walks up from therootinput to the first catalog file and reads the fallow entry of that catalog. The catalog file is apnpm-workspace.yaml, or apackage.jsonwithcatalog,catalogsorworkspaces.catalog(s)(Bun). When it cannot find the entry, it prints a warning that names the catalog and tells you to set theversioninput.fallow migratetells you when it skips a TypeScript source config. Fallow cannot parse a.tsconfig file. Before, a project with only such a file got the message that no configuration was found, so the found file did not show. Now migrate prints that no configuration could be migrated, names the TypeScript file, and tells you to convert it to JSON first. The exit code stays 2.A
package.jsonscript that runs a binary through itsnode_modules/.binpath now uses the package of that binary. Before, a script such as./node_modules/.bin/kysely-codegen --out-file db.d.tsreportedkysely-codegenas an unused dependency, andfallow fixremoved it. A barekysely-codegencall was correct. These forms now give the same credit as the bare name:./node_modules/.bin/<name>,node_modules/.bin/<name>and../../node_modules/.bin/<name>;node ./node_modules/.bin/<name>,node -r ./setup.js node_modules/.bin/<name>or./node_modules/.bin/tsx node_modules/.bin/<name>;$(npm bin)/<name>and`npm bin`/<name>.When the path has a
.binlink, the package that the link points to gets the credit.A
vite.config.*file in a workspace package is now an entry point when only the root manifest listsviteorvite-plus. Before, fallow credited the packages that such a config imports, but it did not follow the relative imports of the config. A shared helper that only the package configs import, such as a rootvite.package.ts, was then reported as an unused file. You can now removepackages/*/vite.config.tsand the helper fromentry.fallow dead-codecredits a class member that code reads throughPick,Omit,Partial,Required,ReadonlyorNonNullableof the class. Withconstructor(private readonly coord: Pick<Coordinator, 'requests'>),this.coord.requests()now creditsCoordinator.requests. A class field, a constructor parameter, an interface field and a function parameter with such a type also give the credit. Before, only atypealias ofPickgave it.fallow dead-codecredits a Durable Object method that a Worker calls through an RPC stub. Withenv: EnvandEnv { QUOTA: DurableObjectNamespace<DailyQuota> }, fallow now creditsDailyQuota.takeforconst stub = env.QUOTA.getByName(name); stub.take(), forconst stub = env.QUOTA.get(env.QUOTA.idFromName(name)); stub.take(), and for a value typedDurableObjectStub<DailyQuota>. Aget()call gives a stub only when its id comes from the same namespace, so aget()on aMapor on a repository class gives no credit. A namespace call, such asenv.QUOTA.get(...)orenv.QUOTA.idFromName(...), gives no credit to aDailyQuotamethod of the same name when the function also callsget()with an id of that namespace. A stub from the globalenvofcloudflare:workers, or from a helper function that returns the stub, gives no credit yet. The extraction cache version is 436.fallow dead-codecredits a hand-written declaration file through its JS sibling. An import of./lib.mjsnow also counts as a use of the matching export oflib.d.mts. The same applies to.jswith.d.tsand to.cjswith.d.cts. UnderincludeEntryExports, fallow reported each export of such a declaration file as unused. An export that no importer uses still reports.fallow dead-codeno longer reports an alias import of gitignored generated code as unresolved. A tsconfigpathsalias or a framework alias that points at a missing, gitignored path (for example@/.next/types/routes) is now silent, the same as the relative form of the import. An alias target that no ignore rule covers still reports.The Nuxt plugin resolves
#layers/<name>/for the$meta.nameof the project root. Nuxt points this alias at the project root. Fallow did not register it, so files that only these imports reach reported as unused.fallow securityno longer reports aspawnorspawnSynccall that runs no shell when no untrusted input reaches it. Without theshelloption,child_process.spawnruns the program directly, the same asexecFile. Such a call now uses theexecFilegate: Fallow reports a computed program only when the argument, the module, or each direct importer reads untrusted input. A command-line argument does not count. A program path from a file of the repository or from an environment variable is now clean. When the options can setshell(ashellkey that is not literalfalse, an options variable, or a spread), Fallow reports a computed command without a source, as before. The first run after the upgrade parses each file again, because the cache format changed.A
fallow-ignore-next-lineorfallow-ignore-filemarker in a JSDoc comment now takes effect. Before this fix, fallow skipped the markers/** fallow-ignore-next-line unused-export */and/** fallow-ignore-file */with no warning. It also skipped a marker on a*line of a multi-line JSDoc comment. Now a block comment accepts a marker at the start of any of its lines, and every marker line in one comment counts. A next-line marker applies to the line after the closing*/. This applies to every analysis, also tofallow dupesand to Vue, Svelte, Astro, MDX, HTML and CSS files. In those, a multi-line/* */comment counts when/*or/**is alone on its first line or the marker is on that line, so comment-like text in a string does not hide or add a marker. In a block comment, a line that starts with the marker word is a marker only when each target before an optional-- reasonis an issue kind or looks like one, so a wrapped prose line such as* fallow-ignore-next-line is how you hide a finding.is not a marker. A typo in an issue kind, such asunused-exprt, still gives the unknown-kind warning, and an unused JSDoc marker shows in the stale suppressions. The extraction cache and the duplication token cache get a new version, so a warm cache does not keep the old result.Fallow Impact no longer records a run on a project in a system temp folder. A temp folder holds test fixtures and throwaway clones. Each of these added a store to the user config folder, and a local test suite added thousands of them. This made
fallow impact --alland the MCP toolimpact_allslow. Projects outside a temp folderConfiguration
📅 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.