npm / @vitest/mocker / 5.0.5
@vitest/mocker 5.0.5
- Source
- https://github.com/vitest-dev/vitest
- Tag scanned
v5.0.5- Directory
packages/mocker- Compared with
v5.0.4(0 signals introduced since)- Files
- 31 scanned, 1 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 3 info
- Scan time
- 4.1 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 3 of 3 warn and critical signals; 3 demoted to info.
- Disclude version
- 4.0.0
- Scanned (UTC)
- 2026-10-16 20:11
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
}$` return this.wrapDynamicImport(() => import(/* @vite-ignore */ actualUrl)).then((mod) => { if (!resolved.optimized || typeof mod.default === 'undefined') { return modlikely benign Dynamic import of a resolved module URL inside the browser mocker, annotated with @vite-ignore.Reasoning
The import specifier is a resolved module URL built from the module graph (pathname, query, hash) and the file carries a /* @vite-ignore */ annotation, the standard way to silence Vite's warning for runtime-resolved module loading. This matches a test-runner module mocker loading modules it has already resolved. No shell, encoding, or remote-fetch behavior appears in the snippet.
-
const query = url. ? `&t=` : `?t=` const moduleObject = awaitlikely benign Dynamic import with a cache-busted, mock-tagged module path in the browser mocker.Reasoning
The specifier is a template literal built from the URL pathname, a timestamp cache-buster query, and the mock type, all within a mocking utility. The @vite-ignore annotation and the structure indicate ordinary module-mock loading. Nothing in the snippet suggests decoding of hidden payloads or fetching untrusted code.
-
return }likely benign Dynamic import of a mock's configured redirect module, annotated with @vite-ignore.Reasoning
The import targets mock.redirect, a configured redirect path for a mock, and is annotated @vite-ignore. This is a normal mechanism for redirecting a mocked module to an alternate implementation. The AST signal is only the non-literal specifier, which is expected for this design.
Reproduce This Scan
Run disclude locally to verify. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.
&&