Prerequisites
Reproduction url
https://stackblitz.com/edit/github-zgkdats5
Reproduction access
Description of the issue
Hello,
since v6.21.0 using nuxt test-utils' defineVitestProject in vitest.config.ts to setup the nuxt test environment results in knip listing a few packages as "Unlisted Dependencies". Those packages are dependencies of dependencies, e.g. "@iconify/vue" as a dependency of "@nuxt/ui" (which is a direct dependency of the project).
The vitest.config.ts is set-up as described in the nuxt docs here: https://nuxt.com/docs/4.x/getting-started/testing#setup. If I comment out the await defineVitestProject part, knip no longer marks those dependencies as unlisted.
In the repro only "@iconify/vue" is listed, but in my real project the same set-up causes more "Unlisted Dependency" warnings for packages like "@unovis/vue", "@unovis/ts" and "vue-chrts".
Note: The unlisted dependency warning for "vitest-environment-nuxt" was showing up in other versions as well and is unrelated to this new behaviour.
Analyzing workspace…
Unlisted dependencies (2)
vitest-environment-nuxt vitest.config.ts
@iconify/vue vitest.config.ts
Prerequisites
Reproduction url
https://stackblitz.com/edit/github-zgkdats5
Reproduction access
Description of the issue
Hello,
since v6.21.0 using nuxt test-utils'
defineVitestProjectinvitest.config.tsto setup the nuxt test environment results in knip listing a few packages as "Unlisted Dependencies". Those packages are dependencies of dependencies, e.g. "@iconify/vue" as a dependency of "@nuxt/ui" (which is a direct dependency of the project).The
vitest.config.tsis set-up as described in the nuxt docs here: https://nuxt.com/docs/4.x/getting-started/testing#setup. If I comment out theawait defineVitestProjectpart, knip no longer marks those dependencies as unlisted.In the repro only "@iconify/vue" is listed, but in my real project the same set-up causes more "Unlisted Dependency" warnings for packages like "@unovis/vue", "@unovis/ts" and "vue-chrts".
Note: The unlisted dependency warning for "vitest-environment-nuxt" was showing up in other versions as well and is unrelated to this new behaviour.