Repository navigation
v0.6.1
Patch Changes
-
#69
41ce74d- An import that matches a tsconfigpathspattern but none of its files, as an installed package does with
"paths": { "*": ["./src/types/*"] }, now goes on to the usual lookup, as TypeScript does. Such imports were reported
as unreadable, so every test that used a package or a built-in module such asnode:fsgot
hasUnfollowedDependencies. An@/or~/alias whose files are missing is still reported. -
#69
41ce74d- A file that only passes names on, as a barrelindex.tswithexport * from './fees'or
export { OrderTicket } from './order-ticket'does, is now in thedependenciesof the tests that import through it,
so--relatedkeeps them when the file changes. Which module a re-export points at is now part ofdependencyHash, as
an import's already was, so the hash of a test that imports through a re-export changes once. -
#69
41ce74d- An imported file that isn't text, such asimport logo from './logo.png', is now taken by its bytes in
dependencyHash. It was read as text, where every byte that isn't UTF-8 reads the same, so two different images could
give the same hash. -
#69
41ce74d- A<script>block in a Vue or Svelte component whosetypeisn't JavaScript, such as
<script type="application/ld+json">in<svelte:head>, is no longer read as the component's code. It made the
component unreadable, so the modules its real script imports were missing fromdependencies. -
#68
fa9b97a-dependencyHashnow follows what a Vue or Svelte single-file component imports, also the components and helpers only
its template uses, so a change to a child component changes the hash of the tests that mount its parent. A component
whose script doesn't parse is still taken by its text, and its tests gethasUnfollowedDependencies. -
#69
41ce74d- A file with brackets nested more than 500 deep, such as a generated fixture, now gets aparse-errorinstead of
crashing the scan. oxc-parser overflows the native stack on such a file, about 5,000 deep, and the process dies with a
segmentation fault that no error handling can catch, so no inventory was written. -
#69
41ce74d-expectCountnow countsexpect.element(), the assertion of Vitest browser mode, so a browser test that checks the
page only withawait expect.element(locator).toBeVisible()no longer looks like a test without assertions. -
#69
41ce74d- An import written with a.jsxextension now finds the.tsxfile it refers to, as.jsalready found.ts, so
import { OrderHeader } from './OrderHeader.jsx'is followed instead of marking the test with
hasUnfollowedDependencies. -
#69
41ce74d- From Playwright 1.57, the config'stagis now read: every test gets it first in itstags, and a project'sgrepor
grepInvertmatches it, so a project withgrepInvert: /@nightly/in a config withtag: '@nightly'no longer runs
the tests. When the scan can't work out thetag, as forprocess.env.CI_ENVIRONMENT_NAME, it gets a
config-value-unknownwarning, and the tests of a project with agrepgetprojects: null. -
#69
41ce74d- From Playwright 1.64, a project withdefault: falseis no longer listed in a test'sprojects, as Playwright runs it
only with--project, unless a project that runs lists it independenciesorteardown. Adefaultthe scan can't
work out gets aconfig-value-unknownwarning, and the tests it may run getprojects: null. -
#69
41ce74d- Playwright'sdefineConfig(base, config)is now merged as Playwright merges it: a project ofconfigmerges into the
project ofbasewith the same name instead of replacing all ofbase's projects, andexpect,useandbuild
merge key by key. A setup project from a base config is no longer lost, and anexpect.toHaveScreenshot.pathTemplate
from the base still marks the tests that compare screenshots withhasUnfollowedDependencies. -
#69
41ce74d- A Vitestretryobject in a test's or describe's options before Vitest 4.1 now gets anunresolved-optionwarning
andretries: null. Vitest 4.0 and 3.2 never run such a test; the scan used to ignore the object and give the
config's retry count instead. -
#69
41ce74d- A Vitest test's ownskip,only,todoorfailsoption now replaces the one its tags set, as Vitest does, so
test('title', { tags: ['flaky'], skip: false }, fn)is active instead of skipped, and a conditionalskipreplaces
the tag's unconditional one. -
#69
41ce74d- An import that starts with@/or~/, as a Viteresolve.aliasallows, now gives the test
hasUnfollowedDependenciesand adependency-not-followedwarning when no tsconfigpathsdefine it. It was taken for
an installed package, so the aliased file was missing fromdependencieswithout a sign, and--relatedleft the test
out when that file changed. -
#69
41ce74d- Vitest 5 tests follow the option rules of Vitest 5.0.5: the last of.skip,skipIf()andrunIf()on a test
decides its skip, sotest.skip.skipIf(false)is active, and askipIf()orrunIf()replaces the skip of a tag or of
the options a describe passes down. An option set toundefined, as intest.skip('title', { skip: undefined }, fn),
no longer undoes the chain or a tag. -
#69
41ce74d- In Vitest 5, the projects of a config that another config lists inprojectsare named inside that config's name, as
Vitest names them: theunitproject ofapps/web/vitest.config.ts, namedweb, isweb (unit). -
#69
41ce74d- A Vitest project without atest.namenow has the name Vitest gives it, inprojectsand inconfigs: thenamein
the package.json of its folder, else the folder's name, soprojects: ['packages/*']names its projects
@trading/pricingorledgerinstead of"". An inline project without a name is named after its place among the
inline projects, as0, and in Vitest 5 no longer takes the name of the config it extends.