Repository navigation
Release 0.6.1 - #70
Merged
Merged
Conversation
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.
What changed
Release 0.6.1, made with
npm run release.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 reportedas unreadable, so every test that used a package or a built-in module such as
node:fsgothasUnfollowedDependencies. 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'orexport { 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, asan 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 independencyHash. It was read as text, where every byte that isn't UTF-8 reads the same, so two different images couldgive 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 thecomponent unreadable, so the modules its real script imports were missing from
dependencies.#68
fa9b97a-dependencyHashnow follows what a Vue or Svelte single-file component imports, also the components and helpers onlyits 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 get
hasUnfollowedDependencies.#69
41ce74d- A file with brackets nested more than 500 deep, such as a generated fixture, now gets aparse-errorinstead ofcrashing 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 thepage only with
await 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, soimport { OrderHeader } from './OrderHeader.jsx'is followed instead of marking the test withhasUnfollowedDependencies.#69
41ce74d- From Playwright 1.57, the config'stagis now read: every test gets it first in itstags, and a project'sgreporgrepInvertmatches it, so a project withgrepInvert: /@nightly/in a config withtag: '@nightly'no longer runsthe tests. When the scan can't work out the
tag, as forprocess.env.CI_ENVIRONMENT_NAME, it gets aconfig-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 itonly with
--project, unless a project that runs lists it independenciesorteardown. Adefaultthe scan can'twork out gets a
config-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 theproject of
basewith the same name instead of replacing all ofbase's projects, andexpect,useandbuildmerge key by key. A setup project from a base config is no longer lost, and an
expect.toHaveScreenshot.pathTemplatefrom the base still marks the tests that compare screenshots with
hasUnfollowedDependencies.#69
41ce74d- A Vitestretryobject in a test's or describe's options before Vitest 4.1 now gets anunresolved-optionwarningand
retries: null. Vitest 4.0 and 3.2 never run such a test; the scan used to ignore the object and give theconfig's retry count instead.
#69
41ce74d- A Vitest test's ownskip,only,todoorfailsoption now replaces the one its tags set, as Vitest does, sotest('title', { tags: ['flaky'], skip: false }, fn)is active instead of skipped, and a conditionalskipreplacesthe tag's unconditional one.
#69
41ce74d- An import that starts with@/or~/, as a Viteresolve.aliasallows, now gives the testhasUnfollowedDependenciesand adependency-not-followedwarning when no tsconfigpathsdefine it. It was taken foran installed package, so the aliased file was missing from
dependencieswithout a sign, and--relatedleft the testout 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 testdecides its skip, so
test.skip.skipIf(false)is active, and askipIf()orrunIf()replaces the skip of a tag or ofthe options a describe passes down. An option set to
undefined, 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, asVitest names them: the
unitproject ofapps/web/vitest.config.ts, namedweb, isweb (unit).#69
41ce74d- A Vitest project without atest.namenow has the name Vitest gives it, inprojectsand inconfigs: thenameinthe package.json of its folder, else the folder's name, so
projects: ['packages/*']names its projects@trading/pricingorledgerinstead of"". An inline project without a name is named after its place among theinline projects, as
0, and in Vitest 5 no longer takes the name of the config it extends.Checklist
npm run coveragereports 100%.npm run changeset), or the change does not affect them.