Repository navigation
chore(deps): update dependency fallow to v3.52.0 - #1020
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 #1020 +/- ##
=======================================
Coverage 94.80% 94.80%
=======================================
Files 10 10
Lines 751 751
Branches 235 235
=======================================
Hits 712 712
Misses 36 36
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.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
3.51.0→3.52.0Release Notes
fallow-rs/fallow (fallow)
v3.52.0Compare Source
Added
fallow mutationreports the cost of the wide survivor retries. The retry of a survivor runs each passing test of its test files, not only its covering tests, because a test can read a value that an earlier test of its file cached (#3670). The newtimings.retry_wide_worker_msfield gives the time of these retries, summed over the workers. It is not a wall time, so it can be larger thanretry_ms.(Refs #5488)
fallow mutation --retry-scope coveringmakes the confirmation of survivors cheaper. The default retry of a survivor runs each passing test of its test files, because a test can read a value that an earlier test of its file cached (#3670). That retry can cost many times the first run. With--retry-scope covering(config keymutation.retryScope), a survivor runs again with the tests of its first run only, in a fresh companion. A survivor of this retry is weaker evidence: the report getsretry_scope: "covering"and the human output says so. The default staysfile, so no result changes without the flag. A narrow survivor never answers a run with the default scope from the result cache,--resumerefuses a journal of the other scope, and--comparerefuses a narrow run against a report of the default scope.(Closes #5488)
fallow mutationcaps the test time of one mutant. A mutant with thousands of covering tests cost minutes when it survived, because a survivor runs each covering test, so a run over a widely imported file did not end in a useful time.--mutant-time-cap(config keymutation.mutantTimeCap, default3m,offturns it off) caps the estimated test time of one mutant: 1.5 times the dry-run time of its covering tests and the setup time of their files. A wider mutant runs only the first tests of its run order up to the cap. A kill by one of them iskilled. With no kill, the mutant ispendingwithpending_reason: "mutant-time-cap",tests_runandestimated_test_ms. It is neversurvived, it gets no retry, and the result cache does not store it.summary.mutant_time_cappedcounts these mutants, and the completion ispartialwith the reasonmutant-time-cap. A--kill-matrixrun has no default cap. A project whose run had asurvivedmutant over the cap now gets apendingmutant and apartialrun; set--mutant-time-cap offto keep the old result. On pull request runs of a public TypeScript monorepo the default cap cut no mutant. The run now also starts the mutants with the lowest estimated test time first without--time-budget, so the widest mutants run last.(Closes #5501)
fallow mutationreports the worker checks.runner.worker_modes.checksgives the number ofcheck_workersrequests (requests) and their time (duration_ms), next to the mutant runs of each worker mode.(Refs #5526)
fallow mutationmarks a survivor that got no retry. Asurvivedortimeoutmutant that got no retry, because the time budget ended first, now hasunretried: truein the JSON report.runner.worker_modes.checks.timeoutsgives the number of worker checks that gave no answer.(Refs #5542)
With Vitest,
fallow mutationcan take its dry-run facts from the test step of the project. A CI job that runsfallow mutationno longer has to run the tests of a change two times. Addfallowto thedevDependencies, addplugins: [fallowMutation()]fromfallow/vitestto the Vitest config, run the test step asfallow mutation test-run <scope flags> -- <test command>, and runfallow mutationwith the same scope in the same CI job. The mutation run uses the facts of each test file whose dry-run key is equal, and dry-runs the other files. A file with a failed or retried test falls back, and a test run with an option that changes the facts (for exampleisolate: false, a test name filter,--shardor a Vitest option on the command line that can change the tests) gives no facts. A test step with coverage on stays a plain run and gives no facts, so its coverage report does not change;fallowMutation({ coverage: true })opts in. The wrapper always exits with the exit code of the test command, and a fault of fallow never fails the tests. The newcache.test_runobject of the JSON report gives the used files, the fallbacks and the reason of each. On a public monorepo with about 8,000 unit tests (measured in November 2026, in a container with 4 cores), the dry run of the mutation step fell from 77 s to 2 s and from 146 s to 5 s, with the same verdict for each mutant.(Refs #5535)
The report of
fallow mutation --reach-selectionnames the changed item that kept each test file. The newkept_bylist ofcache.reach_selectiongives the reason, the changed file and name, the module that reads the name (via), and the count of test files. It gives the first cause that the selection finds for each file. The human line names the top cause.(Refs #5524)
fallow auditmarks the new copy of an introduced clone group. In the JSON output, each instance of a clone group whose key the base does not have carriesadded. The value istruewhen the change added a line inside the instance. Each span inclone_regions[].instances[]carries the same mark. A consumer can now point a finding at the new copy, not at the old copy that comes first in path order. Each audit clone group also carrieseffective_severity, theintroduced-clone-groupseverity afteroverrides. The GitHub Action audit summary now points each clone row at the new copy.(Closes #5016)
Thanks @cr101 for the report.
The GitHub Action and the GitLab template can run the test command of the project with the test-run facts. Set the
mutation-test-commandinput of the Action, or theFALLOW_MUTATION_TEST_COMMANDvariable of the template, for example tonpx vitest run. The job then runs that command throughfallow mutation test-runwith the scope of the mutation step, before the mutation step, so the tests of the job run one time. The command runs in the root directory, with the event rules and the environment of the mutation step. A failed command fails the job with its exit code. The Vitest config must loadfallowMutation()fromfallow/vitest. The job summary of the Action and the job log of the template show aTest run:line with the use of the facts, or the reason why the mutation step did its own dry run.(Closes #5555)
The language server can run only in projects with a Fallow config file. Set the
requireConfigFileinitialization option totrue. The server then publishes no diagnostics while the workspace has no config file that the CLI finds, such as.fallowrc.jsonorfallow.toml, and noconfigPath. A created config file starts the diagnostics, and a removed config file clears them. In Zed, setlsp.fallow.initialization_options.requireConfigFile. The option is off by default.(Closes #3036)
Thanks @cloud-walker for the report.
fallow dupesreports acode-duplicationsuppression that hides no clone as stale. Before, afallow-ignore-next-line,fallow-ignore-fileorfallow-ignore-startmarker forcode-duplicationwas never stale. When the duplicated code changed, the marker stayed, and it then hid a new copy of the code without notice. Nowfallow dupes, the barefallowrun andfallow auditlist such a marker instale_suppressions, with the severity of thestale-suppressionsrule. Aterror, or with--fail-on-issues, thedupescommand and the bare run fail. A marker is used when a clone would be reported at its place without the markers, also a near clone and a clone that only reaches into a range.fallow suppressionssays thatfallow dupeschecks these markers.(Closes #5406)
Thanks @neumaennl for the report.
The test step gives the dry-run facts of a run with reach selection. Before,
fallow mutation test-runran the tests without facts when--reach-selectionwasonorcheck. Now the test step also records the reach probes of each test file. The mutation run uses the facts and writes the reach record of each test file whose facts it used. So the first run of a pull request needs no full dry run. A test file gets no record when it cannot prove that it has each of its probes, or when it has a skipped ortodotest. The next dry run keeps such a file.(Closes #5556)
A
server-only-importcandidate names the imported server-only module.fallow security --format jsonnow setscandidate.sink.calleeto the specifier of the server-only import, for example"node:fs","server-only"or"next/headers". For a direct import, the client file is the only trace hop, so before this change no field named the module. For a transitive import, the specifier is the server-only import of thesinkhop module. Theevidencetext names the same specifier instead of the generic list of server-only modules. A React Router.servermodule is a sink by its file name, so its candidate has nocallee.(Closes #5586)
Thanks @cr101 for the report.
fallow securityreports an open-redirect candidate forreact-router-domand Remix 3 imports.react-router-domexports the same helpers asreact-router. So thereact-router-open-redirectcategory now also matchesredirect,redirectDocumentandreplacefromreact-router-domwhen the project declaresreact-router-dom. The newremix-open-redirectcategory (CWE-601) reports a non-literal target of Remix 3redirectandcreateRedirectResponse. The callee must be the binding of an import fromremix/response/redirector@remix-run/response/redirect. The category is active when the project declaresremixor@remix-run/response.(Closes #5594)
Thanks @cr101 for the report and the reproduction.
Changed
fallow mutation --time-budgetruns the cheapest retries first. A few expensive survivor retries no longer leave the cheap retries without a run at the deadline. Each survivor keeps its own retry with each test of its files: the clean retry of one mutant does not prove that another mutant of the same function survives.(Refs #5488)
fallow auditkeeps its base snapshots in a directory of the user on Unix. The base snapshot of--baseand the staged tree of--stagedwere directories directly in the temp dir. They are now infallow-audit-snapshots-<uid>inside the temp dir, with mode 0700. Fallow does not use that path when it is a link, is not a directory, belongs to another user, or gives access to other users: the audit then prints a warning and stops with exit code 2. The cache sweep andfallow audit-cache pruneandremovealso visit the snapshots that earlier versions left in the temp dir. Windows keeps the snapshots in the temp dir, which is already private to the user.A walk inside a repository applies no
.ignorefile from a directory above the repository top level. Git already applies no.gitignorefrom above a repository. Before, a.ignorefile above the top level, for example in the temp dir above an audit base snapshot, could hide files from the analysis. The ignore files between the root and the top level, the global excludes file of Git and their order of precedence do not change. A root inside a nested repository no longer gets the.ignorefiles of the outer repository, because they are above its top level. A walk outside a repository is unchanged.Module resolution and project discovery in an audit base snapshot stop at the snapshot root. The lookups of
node_modules,package.json,tsconfig.json, Yarn PnP files, lockfiles and workspace roots no longer read the directories above the snapshot, so files there cannot change the base result offallow audit.The dry run of
fallow mutationno longer waits for one companion with slow test files. Before, the dry run gave each companion a fixed share of the test files, so the share with the slow files decided the wall time while the other companions waited. Now the companions take the test files in batches from one queue: a companion that ends its batch takes the next one, and the batches become smaller as the queue empties. A batch holds files that are far apart in the sorted list, so the slow files of one folder go to different companions. On a public monorepo with 1,394 test files and 5 companions, the companions now end their dry run within 6 s of each other (before: 44 s apart). The covering tests and the status of each mutant stay the same. (Refs #5503)fallow mutationruns the tests that killed other mutants of the same function first. A mutant run stops at its first failing test, but the order of its tests was fastest first. When a worker starts a mutant, up to 3 covering tests that killed other mutants of the same function, and then of the same file, now run first. The kills of the result cache count from the start, and a mutant that runs on more than one worker runs these tests first, as a small part, before its other parts. With Vitest, which orders the test files of each run itself, only that small part changes the order. No verdict changes: a survivor still runs each covering test. When more than one test kills a mutant,killed_bycan name another killing test than before, and with more than one worker it can differ between two runs. On a project with 40 test files of 1 second and 5 workers, a mutant that one test kills after the kill of another mutant of its function went from 22 seconds and 30 tests to 2 seconds and 1 test. Mutants that start at the same time, before the first kill of their function, keep the old order.(Closes #5500)
The human report of
fallow mutation --reach-selection onsays why the run left out no test file. The line names a missing record or the reason that kept the most files. A run that left out test files names--reach-selection checkto verify the selection.(Refs #5533)
A named export of
vite.config.*needs an importer in a project that lists onlyvite-plus. Since 3.51.0, avite-plusdependency enables the Vite plugin. Vite and Vite+ read only thedefaultexport of the config, sounused-exportsreports a named export that no module imports. A project that listsvitehad this result before 3.51.0. Remove the export, or import it from the module that needs it.(Closes #5565)
fallow audit --format sarifgrades clone results by theintroduced-clone-grouprule. Before, each clone instance result had the levelwarning. Now a group that counts for the verdict takes the level of the rule:errororwarning. Under thenew-onlygate, only an introduced group counts. In such a group, the new copy takes that level and the old copies takenote. A group that does not count takesnote. Each result lists the other copies of its group inrelatedLocations, and its property bag carriesintroducedandadded. Result locations and fingerprints do not change, so code scanning keeps each alert. Underintroduced-clone-group: error, the new copy is anerroralert, so the code scanning check of a pull request can fail on it.fallow report --fromgives the same levels from a saved audit.fallow dupes --format sarifdoes not change.Fixed
A small source file with repeated or nested references no longer makes a run use all memory or run without end. Five places did the same work again for each reference, so a short file could make the work grow exponentially or with the square of its size. Each place now keeps a memo or has a limit, and a value above a limit gets the result of an unknown value:
constobject once. An object with more than 512 keys, or a spread chain deeper than the limit, gets no spread binding.importorexportstatement after at most 256 of its lines. After that it checks the statement only at a blank line, at most 64 more times, so a long statement still ends at the blank line after it. A statement that is still open after these checks is read as prose: Fallow does not see its imports and exports.import.meta.glob, gets no exclude glob and matches more paths.The extraction and duplication cache versions change, so the first run after an upgrade parses all files again.
fallow watchno longer follows directory links when it sets up the watch. Source discovery does not enter a linked directory, and the watcher now does the same. Before, on Linux, a committed link could put a tree outside the project under watch, report project files under a second path, or make the start of the watch walk without end. The target of a link inside the project stays watched under its real path. macOS and Windows did not follow these links before.fallow fixskips a file with a bare CR line ending. The fixers split lines on LF, but the parser also ends a line at a bare CR. An edit in such a file used offsets from the wrong line. The file is now skipped withskip_reason: "mixed_line_endings", as a file with mixed CRLF and LF line endings is, and the run exits with code 2.fallow fix --type-awareremoves more unused class methods. A class field with no;, such asvalue = 1, ends at a line break only when the next member cannot continue it. When the next kept member starts with[or*, the fixer refused the removal of the method between them, because the result did not parse. The fixer now writes a;in front of that kept member (;[key]() {}), so the removal applies and the class still parses.fallow fixapplies the scope flags.--workspace,--changed-workspaces,--changed-since, the package baselines and a diff from--diff-file,--diff-stdinorFALLOW_DIFF_FILEnarrowed thedead-codereport but not the fixes, so a scopedfixrun edited the whole project.fixnow plans only the findings thatdead-codereports with the same flags. An unknown workspace exits with code 2. This also applies to theworkspaceparameter of the MCPfix_previewandfix_applytools and to the GitHub Action withcommand: fix.A dense group of circular imports no longer makes the cycle check run for minutes. The check stopped only after it listed 20 cycles of one group of files. A group with few short cycles and very many longer import paths made it follow tens of millions of imports. The check now stops after 500,000 imports per group and marks the group as capped, as it does at 20 cycles. When it stops before it finds a cycle, it looks for one short cycle of 12 files or fewer, from each file of the group in turn, with its own budget of 500,000 imports. The first such cycle is reported, unless the
circularDependencies.allowlist accepts it. Real projects use far fewer steps.A V8 coverage file with a source map that points past its script no longer slows the health run. Each such map made the map parser build a line table of 16 million lines. A map whose section starts after the last line of the generated script now does not apply to that script, in
fallow healthwith V8 coverage and infallow health --runtime-coverage.A cloud answer with very many small JSON values now gives a clear error. Before, such an answer passed the size limit and the parse could use all memory. The cloud reads now refuse an answer with more than 48 million JSON values. That is twice the values of the largest real answer that the 256 MiB decoded size limit lets through.
fallow agent installkeeps a normal indent in an MCP config file with a very wide indent. The edit copied the indent of the first indented line at each nesting level, so a very wide indent made the file very large. The edit now keeps an indent of 8 characters or fewer, and uses two spaces in place of a wider one.The type-aware config hash no longer times out or fails on shared tsconfig
extendsandreferencesentries. The hash read a config once for each path that reached it, so a config graph with shared entries could run until the request timeout, or fail with an invalid string length. The hash now reads each config once. A config graph of at most 20,000 config visits and 16 Mi characters of config text keeps its hash, so a type-aware baseline of such a project stays valid. A larger config graph, for example a large monorepo with project references, gets a new hash one time. Such a graph was slow or failed before. When a run then reports an incompatible analysis identity, save the type-aware baseline again.A
code_executesnippet now always ends near itstimeout_ms. The MCP server runs each Code Mode snippet in a separate process and kills that process at most 4 seconds aftertimeout_ms, or when the client cancels the call. The limit is 2 seconds aftertimeout_msfor a running snippet process, and up to 2 seconds more when the process must start first. Before, a snippet inside one long native builtin call (for exampleArray.prototype.reverseon an array-like object with a very largelength) did not see the deadline or the cancel. The call then got no answer, used a full CPU core, and keptfallow-mcprunning after the client disconnected. Host calls still run in the server process, so the shared parse store and the existing limits do not change.A long comparison chain or nested lists in JSX text, a template attribute or a script block no longer make the parse use gigabytes of memory. In TypeScript the parser tries each
a<of an expression as a list of type arguments, and reads the same bytes again when that fails. A flat chain such asa<a<a<...<aof 16 KB used about 2 GB, and nested lists that the scan before the parse did not see used memory until the run stopped. The scan now counts the bytes that the parser can read again, and a file past that budget gets thesource-nesting-too-deepdiagnostic and is not parsed. The scan also reads a JSX file as the parser does: quotes, comment openers and)in the text of an element are text. It reads a/after the)of anif,while,fororwithheader as a regex, and a#!line at the start as a comment. A template expression of a Vue, Svelte, Astro or Angular file, and a script block of a component, Astro or MDX file, now get their own scan, so their nesting is seen too. The prose of an HTML, MDX, Vue, Svelte or Astro file can hold a bare<, so the scan of the whole file does not apply the budget there. A scan of an unclosed string or regex on a long line no longer takes time that grows with the square of the line length. Real code stays far below these limits. The parse cache and the duplication token cache are rebuilt once.The audit cache reads its
.shaand.last-usedfiles only when the user owns them. A file of another user at one of these paths now reads as absent, so the audit rebuilds the snapshot.The commit gate follows
cdsteps the way the shell does. The shell resolves..in acdfrom the path it used, also through a symlink. The gate resolved thecddirectories of a git write from the physical path. Aftercd docs && cd ..withdocsa symlink, the gate audited the parent of the link target, a tree that the command does not reach. From a session directory that is a symlink,cd .. && git commitcommits in the parent of the link, and the gate did not audit that tree. The gate now resolvescdsteps logically and the-C,--work-treeand--git-dirpaths of git physically, as git does. When the session directory is a symlink, the gate follows thecdsteps from the link and from its target, because a shell can start in either one. The scan also reads a quoted or escaped directory name,cd -P,cd -Landcd --, a leading~,pushd,pushd -nandpopd, acdafter an assignment,builtin,commandor a word such asif, a backslash at the end of a line, and acdthat fails and leaves the shell where it was. A git write with more than 32cdandpushdsteps in one command is blocked, with a message to split the command.A shell helper path that leaves the project and comes back is not followed. A path such as
../other/../app/scripts/build.sh, or acdto such a directory, was followed only when../otherexisted. The step-by-step check applies to a path with a..step: each step must now stay inside the project root, so the answer no longer depends on an entry outside the project. A path without..in its text is checked where it ends.A tsconfig reference that leaves the project and comes back is not a workspace. A
referencesentry such as../other/../app/pkgbecame a workspace only when../otherexisted. Each step of a reference must now stay inside the project root.Override analysis reads lockfiles only inside the project. A
pnpm-lock.yaml,package-lock.json,npm-shrinkwrap.json,bun.lock,bun.lockb,yarn.lockorpnpm-workspace.yamlat the root that links out of the project now counts as missing, whether its target exists or not. The read itself must stay inside the project scope.Catalog analysis reads
pnpm-workspace.yamlonly inside the project. Apnpm-workspace.yamlof the root or of a nested pnpm project that links out of the project is no longer read for catalog entries or catalog overrides, so a catalog in a file outside the project gives no finding.fallow telemetry statusno longer reports a mixed state while another process changes the telemetry setting. Fallow now writestelemetry.jsonto a temporary file and renames it over the old file, so a reader sees the old file or the new file, never a partial file.telemetry statusnow reads the file one time, sostate,sourceandexplicit_decisionalways come from the same file. A rewrite keeps the file mode and a symlink to the file.(Closes #5508)
fallow auditno longer compares against a wrong base commit when another audit holds the base snapshot. The one-time snapshot of that case checked out the base ref again, not the SHA of the cache key. A fetch between the two steps gave a snapshot of another commit, and the cache then kept that result under the old SHA. The snapshot now checks out the SHA.fallow auditno longer reuses a base snapshot that a cache removal left half deleted. The removal now deletes the readiness mark of the snapshot first, so a removal that stops part way leaves an entry that the next audit builds again.fallow watchruns again after the kernel drops file events. An event queue overflow, for example during a largegit checkoutornpm install, gave one rescan event without paths, and the watch kept the old results. A rescan event now starts an analysis.fallow watchruns again when a nested.gitignoreor.git/info/excludechanges. Discovery reads these files, but the watch reacted only to the root.gitignore.The MCP server no longer leaves a CLI process running after the client disconnects. The server now ends the process tree of each call that it drops before the call ends.
fallow mutation --resumeno longer runs a mutant again that no target killed in the target-first mode. The journal stores that result as final, and the resume now reads it.A baseline save no longer leaves a cut file for a reader or after Ctrl-C. Each
--save-baselinewrite and theregression.baselineupdate of the config file now write a complete temp file and rename it into place. Before, a run that read the file during the save could stop with a parse error, and Ctrl-C could leave a cut baseline or a cut config file.Ctrl-C during
fallow fixno longer leaves temp files in the project. The signal cleanup now deletes the staged temp files that the fix did not rename into place yet.The LSP server no longer queues one analysis per save behind a long run. Under steady autosave, each save during a run started one more waiting task, and these tasks then ran back to back without the debounce. At most one task now waits, and the debounce applies to it. (Closes #5512)
The LSP server no longer shows old diagnostics on a file that was closed, opened again and edited during a run. A reopened buffer can reach the version number of the buffer that the run read. The server now counts each open and compares the open count and the version. (Closes #5513)
Two MCP servers no longer ask for telemetry consent at the same time, and a telemetry event is no longer sent twice after an early exit. The consent claim now uses an OS file lock, and the spool drain removes each event from the spool right after its upload. (Closes #5514)
fallow mutationno longer writes its results into the journal of another run. A run now appends to the file that holds its own header, also when a second run starts at the same moment. (Closes #5515)fallow mutation --reach-selectionkeeps a test file whose run can read a changed export throughthis. A call of a member of a namespace import (ns.run()) gives the module object to the function asthis, sothis.cin that function reads the exportc. The rule counted the call only as a read ofrun, so a new or changed exportccould drop a test file that reads it, which gave a false survivor. The rule now countsthisin each function that ran and that can be the called member. It also countsthisoutside each function (exportsin a CommonJS output of the TypeScript compiler) and an import of a load function under another name (import { createRequire as load } from 'node:module') as code that reads each export. The dry-run cache format goes to version 6.(Refs #5524)
fallow mutationgives a wide mutant the same status in each run of the same change. The mutant time cap compared an estimate from the dry-run durations with--mutant-time-cap. These durations grow with host load and with the worker count, so a mutant near the cap wassurvivedin one run andpendingin the next. A mutant whose estimate is over the cap now runs its covering tests in stages, and the cap compares the measured time of these stages. A mutant whose real run ends well inside the cap gets its full status. A capped mutant states the cap in the newtime_cap_msfield, next toestimated_test_msand the measuredduration_ms. (Closes #5538)fallow dupestokenizes the type annotation of a variable declaration. Before this fix,let value: Alpha<One>;andlet value: Beta<Two>;gave the same tokens, so a clone could start on a line where the two files differ. The annotation now gives a colon and the type tokens, as a parameter annotation does. WithcrossLanguage, the annotation is still removed. The duplication token cache is rebuilt one time.(Closes #5435)
Thanks @aloneangel45 for the patch in #5485.
A dependency finding points at the entry in its own
package.jsonsection. When a package was also inpeerDependencies,overrides,resolutionsorpnpm.overrides, an unused, test-only, type-only or dev-in-production dependency finding could point at that earlier entry. The line now comes from thedependencies,devDependenciesoroptionalDependenciesentry of the finding. This line is in the JSON, SARIF, CodeClimate and compact output.(Closes #5450)
Thanks @aloneangel45 for the patch in #5459.
fallow coverage upload-inventorysends churn only for the files of the inventory. ThechurnByPathmap had an entry for each file that git changed in the churn window, also for tests, docs, deleted files and paths that--exclude-pathsor the ignore rules skip. On a large repository with full git history, these entries pushed the request body over the 25 MiB limit of the API, and the upload failed with HTTP 413. Now eachchurnByPathkey is thefilePathof an uploaded function.(Closes #5522)
Thanks @chbert for the report.
A worker check of
fallow mutationno longer runs past the time budget. A check of the Vitest worker mode sent the setup timeout as its test timeout, and the scheduler waited for it up to two setup timeouts. A test that waits forever in a shared worker so held a worker for minutes, and a budgeted run could end long after its budget, with no retry for its survivors. A check now takes its test timeout from the dry-run time of its tests, and the scheduler stops it at the time budget. A check with no answer counts as a failed check, so its sets run with a new worker for each test file and no verdict changes.(Closes #5542)
A shared Vitest worker of
fallow mutationnow runs the order that its check proved. Vitest runs the test file that failed in the last run first, so the second round of a worker check could pass in another order than the first, and a later shared run could use a third order. The companion now runs the test files of each check round and each shared run in a fixed order. A test file that bail stops before it starts no longer reports the result of its earlier run, for example a test timeout of a check, as a result of the mutant run.(Refs #5542)
fallow audit --basekeeps an old Tailwind arbitrary value inherited when another file also uses it. Acss-token-driftfinding for an arbitrary value names one use of the value. The head run names a use in a changed file, but the base run named the first use in any file. When an unchanged file sorted first, the keys did not match, and the finding on an unchanged line was marked introduced. The base now holds a key for each file that uses the value, so the finding is introduced only when the changed file did not use the value at the base. The audit base snapshot cache is rebuilt once.(Closes #5537)
Thanks @aloneangel45 for the first fix in #5546, and @kanpai-coder for the report.
fallow mutation --reach-selection onkeeps a test file when a new or a removed export can clash through twoexport *statements. Babel CommonJS (for examplenode:testwith--require @babel/register) defines each name of anexport *as a property that is not configurable. When twoexport *statements of one file give the same name from two bindings, the load of that file throws. The reach selection now keeps each test file that runs such a file when an export name of a loaded file is new or removed.(Closes #5530)
--type-awarekeeps the type-aware pass for a class that implements two framework lifecycle interfaces. A framework contract lists every lifecycle hook of the framework. The companion related each hook to every implemented interface of the contract, also to an interface that does not declare that hook. Fallow then rejected the answer as unrequested evidence and showed only syntactic findings. When the checker shows that only some heritage types have the member, the companion now relates the member only to those types. Inherited and static members count. When the checker cannot show it, for example because a base type of the package does not resolve, the companion keeps every relation as before.(Closes #5552)
Thanks @PedroMartpico for the report and the first patch.
fallow mutationgives fewertimeoutverdicts that come from host load. A loop timeout of a run with bail stopped the other covering tests, and a test of another file that kills the mutant did not run. The runner can order the test files differently from run to run, so the same mutant waskilledon one run andtimeouton the next. After a loop timeout, Fallow now runs the tests that did not run, and a kill of that run makes the mutantkilled. A timeout from the watchdog also got no retry when a new companion took over the tests and its control run was fast. That timeout now keeps the doubled retry.(Closes #5528)
fallow mutationwithbun testornode:testruns the test files in the order of the request. The scheduler sends the covering tests of a mutant in a set order: first the tests that killed other mutants, then the fastest tests. The runner then started the test files in name order. A slow test file with a name that sorts first ran to completion before the fast file that kills the mutant. The runner now starts the test files in the order of the request. A mutant at module level, which each test file that loads the module covers, gets the largest gain. When more than one test file kills a mutant,killed_bycan name another file than in an earlier version.(Closes #5315)
Thanks @yamatakeru for the report.
fallow dead-codereports the unused exports of a helper below__tests__/when Vitest defines inline projects. A config with only inlinetest.projectskept the static**/__tests__/**entry pattern, so each helper module there was an entry point and no export of it was reported. Such a config now replaces the static patterns, as a roottest.includedoes. A config keeps the static patterns when itstest.projectshas a string entry, a spread or a call, or when fallow cannot read the include values of a project in full.(Closes #5554)
Thanks @neumaennl for the report.
A redirect to a path that a same-origin check validated is no longer an open-redirect candidate. The check parses the value with
new URL(value, origin). It then returns or throws whenurl.origin !== origin || url.pathname.startsWith("//"), and the target isurl.pathname, optionally followed byurl.searchandurl.hash. Fallow accepts this check inline in aloaderor anaction, and in a local helper. The origin must be trusted:new URL(request.url).origin,request.nextUrl.origin,location.origin, or aconstbound to one of them. For a helper, the call passes the trusted origin as the argument. The rule applies toreact-router-open-redirect,open-redirect,nextjs-open-redirectandssrf. A check without the//test, a target withurl.hreforurl.toString(), aletURL, and a URL that the code changes after the check stay candidates. The extraction cache is rebuilt once.(Closes #5541)
Thanks @cr101 for the report.
fallow mutation --runner-projectno longer reports the test files of the other Vitest projects as undiscovered. Before, a run that selected one project ended aspartialwithtest-files-not-discoveredfor each static test file of an unselected project. The Vitest companion now lists the test files of the unselected projects, and these files do not count. A static test file that no project lists keeps the warning.(Closes #5507)
Thanks @Smrtnyk for the report.
fallow health --type-couplingno longer reports complete evidence when no public API entry point resolves. The coupling scope is the set of public signatures that a package entry point reaches. Before, a package with noexports,main,moduleortypesfield that selects a source file got an empty scope, acompletestatus, and a passing--type-aware-require completegate. Now each selected TypeScript project with no resolved entry point adds ano-api-entry-pointomission. The report is thenpartialwith a next action, so the complete gate fails. The coupling summary has a newapi_entry_point_countfield, and the human report shows it. The companion wire protocol is now version 12. A companion thatfallow type-aware setupinstalled must be set up again.(Closes #5506)
Thanks @Smrtnyk for the report.
fallow dead-codeno longer reports the setup file or the test files of a Vitest project behind a spread intest.projects. A config can add a project with...(flag === false ? [] : [defineProject(project)]). Fallow now reads a spread of an array literal in a config array, and each array literal branch of a conditional spread. This also coversinclude,setupFilesandglobalSetuplists, and the arrays of other tool configs.(Closes #5566)
--type-awarekeeps a class member that a library calls, also when only a test file calls it. A class member can implement an abstract member or an interface of a dependency, for exampleprocessof aWorkerHostsubclass from@nestjs/bullmq. The library calls that member at runtime, so the program has no call of it. With--production, Fallow does not count a reference from a test file. Fallow then reported the member asunused-class-memberwith theretained-abstaineddecision, and ignored the contract. Fallow now keeps such a member ascontract-preserved, as for a member with no reference at all. A required contract, an optional hook of a dependency, and a framework contract of a plugin each keep the member. An optional member of a project contract does not.(Closes #5567)
Thanks @PedroMartpico for the report.
The JSON output of a type-aware
fallowrun with health now has the type-aware data of health. A run with--type-awareand health asks for type coupling in the same companion process as dead code, so each project gets one Program build. Before, the JSON put the report only at_meta.check.type_aware.type_coupling. With--only health, the run computed the report and showed it in the human output, but the JSON did not have it. The JSON now also gives the type-aware data of health at_meta.health.type_aware, with the type-coupling report when the companion ran. With--type-aware-require complete, an--only healthrun now also fails on an incomplete coupling query, asfallow healthdoes. The GitHub Action, the GitLab template, andfallow reportwith a saved envelope read this path for the completeness gate. Before, the Action failed a complete--only healthrun, and the other readers did not see an incomplete one.fallow report --format markdownrefuses a saved--only healthenvelope with type-aware data, as it refuses other combined envelopes with type-aware data.(Closes #5585)
Thanks @PedroMartpico for the report.
A
fallow-ignore-next-line stale-suppressioncomment now hides the stale suppression below it. Each stale-suppression finding has asuppress-lineaction with this comment. Before, the comment had no effect, so the finding stayed. Now the comment hides the stale finding of the suppression on the next line, infallow dead-codeand for the stalecode-duplicationmarkers offallow dupes. Afallow-ignore-file stale-suppressioncomment hides each stale suppression of its file. Astale-suppressioncomment is never stale itself, and a comment with no issue type does not hide a stale suppression. Thus a chain of comments cannot hide each other.(Closes #5580)
A local in a class static block or in a switch case no longer hides a namespace import after that scope. After
import * as e from './errors', aconst ein astatic { }block or in acaseof aswitchhid the import in the rest of the enclosing function. A later read such ase.usedError()was then lost, and Fallow reportedusedErroras an unused export. Fallow now keeps each declaration of a static block or a switch case in the scope of that block. At module scope, such a declaration is also no longer a module-level declaration.(Closes #5317)
A type-only import of a server-only module no longer gives a
server-only-importcandidate.import type { Stats } from "node:fs"loads no code, so no server-only code reaches the client bundle. An inlineimport { type Stats } from "node:fs"is also type-only now. WithverbatimModuleSyntax, TypeScript keeps that inline form asimport {} from "node:fs", and Fallow does not report it. `fallow securitConfiguration
📅 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.