Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: jest-preset-angular depends on phantom dependency jest-util #1773

Closed
troywweber7 opened this issue Sep 15, 2022 · 1 comment · Fixed by #1777
Closed

[Bug]: jest-preset-angular depends on phantom dependency jest-util #1773

troywweber7 opened this issue Sep 15, 2022 · 1 comment · Fixed by #1777
Labels
🐛 Bug Confirmed Bug is confirmed

Comments

@troywweber7
Copy link

Version

12.2.2

Steps to reproduce

  1. reproduction steps for how I stumbled upon this phantom dependency can be found at original issue
  2. simpler reproductions steps are to look at jest-preset-angular/build/config/ng-jest-config.js and confirm that jest-util is a directly required dependency, and should thus be included in the dependencies or peerDependencies of this package's package.json

Expected behavior

When installing jest-preset-angular, any packages which are directly depended on by javascript files published by jest-preset-angular should be listed in either the dependencies or peerDependencies.

Actual behavior

When installing jest-preset-angular and inspecting it's package.json, it currently does not list jest-util under it's dependencies. It is probably publicly hoisted by some other package that jest-preset-angular depends on, but when using pnpm which does not publicly hoist dependencies, it fails.

Additional context

I'm using pnpm which by default, and with good reason, does not publicly hoist dependencies.

Environment

System:
- `uname -a` return `Linux tww-hp-ubuntu 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux`
Binaries:
- `node -v` returns `v16.16.0`
- `pnpm -v` returns `7.11.0`
@ahnpnl
Copy link
Collaborator

ahnpnl commented Sep 15, 2022

PR is welcome, we should put it as direct dep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Confirmed Bug is confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants