npm / pretty-format / 30.5.1
pretty-format 30.5.1
- Source
- https://github.com/jestjs/jest
- Tag scanned
v30.5.1- Directory
packages/pretty-format- Compared with
v30.5.0(0 signals introduced since)- Files
- 24 scanned, 5 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 4 info
- Scan time
- 4.5 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 4 of 4 warn and critical signals; 4 demoted to info.
- Disclude version
- 4.0.0
- Scanned (UTC)
- 2026-10-14 19:25
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
info
warn→ info by reviewdynamic-importpackages/pretty-format/src/__tests__/ReactVersions.test.ts:28:17])likely benign Test helper that requires a React package whose name is supplied by a test.each parameter table.Reasoning
The require() specifier comes from the test.each table parameters (reactPackage), which are fixed package names such as 'react' and 'react-test-renderer' in a test file. This is a standard parameterized test pattern for running the same suite against multiple React versions. No untrusted input or decoding is involved.
-
info
warn→ info by reviewdynamic-importpackages/pretty-format/src/__tests__/ReactVersions.test.ts:37:34jest.likely benign Jest mock factory that requires the parameterized React package to isolate module instances per version.Reasoning
Inside jest.isolateModules, the require(reactPackage) is used to mock 'react' with a version chosen from the test parameter table. It is test scaffolding for module isolation across React versions, not a runtime payload loader.
-
info
warn→ info by reviewdynamic-importpackages/pretty-format/src/__tests__/ReactVersions.test.ts:38:29jest.; const isolatedReact = as typeof ; const TestRenderer =likely benign Loads isolated React and react-test-renderer packages chosen by test parameters.Reasoning
The dynamic require of reactPackage and rendererPackage uses parameters from a fixed test table. The surrounding comment about the renderer reaching into React internals shows this is a legitimate compatibility test.
-
info
warn→ info by reviewdynamic-importpackages/pretty-format/src/__tests__/ReactVersions.test.ts:39:28const isolatedReact = as typeof ; const TestRenderer = as typeof ;likely benign Requires the react-test-renderer package named by a test parameter.Reasoning
The renderer require uses rendererPackage from the same fixed parameter table, typed as react-test-renderer. The ast dynamic-import flag fires only because the specifier is not a string literal, and the file is a test.
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.
&&