jest-dom seems to include dev dependencies in production
envgap__testing-library__jest-dom-205
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
3b98d4d16b51b7b8d9d9ca77172b5367503f203f- Manifest
package.json- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
testing-library/jest-dom #205 · read the original issue
- `@testing-library/jest-dom` version: 5.1.1 - `node` version: v13.5.0 - `npm` (or `yarn`) version: 6.13.4 ### Relevant code or config: ``` npm install @testing-library/jest-dom ``` ### What you did: Install jest-dom ### What happened: I expected it to add few kb of size, but it added 45kb to my library. See bundlephobia for an example: ### Reproduction: https://bundlephobia.com/result?p=@testing-library/jest-dom@5.1.1 ### Problem description: It _seems_ like some development libraries are included in `dependencies` instead of `devDependencies`. As a quick example, the heaviest dependency [according to Bundlephobia](https://bundlephobia.com/result?p=@testing-library/jest-dom@5.1.1) is `pretty-format`: - It seems to [only be used in `tests/setup-env.js`](https://github.com/testing-library/jest-dom/search?q=pretty-format&unscoped_q=pretty-format). - It is [defined as a dependency in package.json](https://github.com/testing-library/jest-dom/blob/master/package.json#L47) instead of a devDependency. ### Suggested solution: I *think* (from the common JS patterns) that pretty-format might be a devDependency instead of a dependency, so I'd suggest moving it to devDependencies. It seems to be an internal dependency for testing jest-dom itself, so it should be defined as a `devDependency` instead to avoid including it in libraries that *wrap* jest-dom (as opposed to use jest-dom). [e.g. it is an issue here](https://github.com/franciscop/react-test/issues/15).
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]