jest-preset-angular: [Bug]: npm install fails with latest jest 29.0.3

Version

2.2.2

Steps to reproduce

1,Use jest 29.0.3 as dependency with latest jest-preset-angular 2.2.2 2, npm install fails ERESOLVE unable to resolve dependency tree

Expected behavior

npm install works

Actual behavior

npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: xxx@3.0.1 npm ERR! Found: jest@29.0.3 npm ERR! node_modules/jest npm ERR! dev jest@“29.0.3” from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer jest@“^28.0.0” from jest-preset-angular@12.2.2 npm ERR! node_modules/jest-preset-angular npm ERR! dev jest-preset-angular@“12.2.2” from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Additional context

Would you release jest-angular-preset with jest 29 supported?

Environment

System:
    OS: Linux 5.18 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (12) x64 Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
  Binaries:
    Node: 16.17.0 - /usr/bin/node
    npm: 8.15.0 - /usr/bin/npm

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 27
  • Comments: 35 (5 by maintainers)

Most upvoted comments

Are there any plans to cut new release any time soon? It seems new version of Jest was merged to main branch and it passed CI just fine: https://github.com/thymikee/jest-preset-angular/pull/1804

There is a chain of changes that increases the importance of having jest-preset-angular with Jest 29 support:

  1. There is outstanding Jest and Node.js 16.10+ issue with memory consumption: https://github.com/facebook/jest/issues/11956
  2. Jest 29 added a workaround with new option workerIdleMemoryLimit
  3. Angular 15 drops support for Node.js 16.10 https://github.com/angular/angular-cli/pull/24026 putting Jest users in a limbo state.
  4. Nrwl seems to wait for jest-preset-angular release to add official support for Jest 29 to nx: https://github.com/nrwl/nx/issues/11892

12.2.3 supports Angular 15:)

It will be together with angular 15 support in a major version:)

Hi, I’m glad to hear that. I will arrange asap.

closes via #1901 #1937

Please test with 13.0.0-next.1

We haven’t finished supporting Jest 29 yet so ye this will have to wait for a major release.

You can test against main.

The leftover work now includes:

  • Adopt changes from ts-jest 29
  • Migrate any config under globals to be transformer config, just like ts-jest
  • Test with angular 15

Any updates/guesses on when 29 will be supported? Thank you 😃

Any help needed on this ? 😃 Never contributed to this project but I’m willing to help if necessary, but I dont find what’s left to do, sorry ! 😄

Happy new year! Hope we can get back to solving this issue. It’s holding up any real angular 15 release on our side.

You could always pitch in and help out… Complaining like that, just to complain, isn’t helpful. ahnpnl’s done an amazing job maintaining this project. They’re very responsive and jumps on stuff quickly, when needed. We’re just on the other side of a long holiday; why not give them the space to make the change, or pitch in and help out yourself. This is open source after all.

Might be worth asking Nrwl to take over maintenance. It’s a pretty sad state of things that we massively have to hold back this Jest upgrade because of one dependency that’s not maintained. Even more so in workspaces that don’t use Angular.

You could always pitch in and help out… Complaining like that, just to complain, isn’t helpful.

People offered to help for months with no result. I’m trying to come up with a real solution instead of your utopian scenario.

Already talking to Nrwl as we speak.

That’s the only change which produces warning logs when running tests in main. Internally we patch globals object to pass to ts-jest

Yes, sorry, I mean angular with Jest 29. Jest 28 + angular 15 is working. We usually release with latest jest, or try to at lease.

You can test against main.

The leftover work now includes:

  • Adopt changes from ts-jest 29
  • Migrate any config under globals to be transformer config, just like ts-jest
  • Test with angular 15

Note that the documentation to migrate ts-jest config from globals to transform is not reflected in the Documentation and it took me a few trials and errors to get it working. It might be a good idea to reflect the changes in the docs. Thanks for the lib 😃

Hi @ahnpnl I’ve been testing the v13.0.0-next.1 package on a handful of Nx repos without any issues. Was wondering if there is an ETA on a stable release for jest-preset-angular v13. Thanks!