ngneat / until-destroy

🦊 RxJS operator that unsubscribe from observables on destroy
https://netbasal.com/
MIT License
1.74k stars 100 forks source link

Angular 14 ut could not run correctly with a a minimal reproducible example #207

Closed constCD closed 2 years ago

constCD commented 2 years ago

This is my dependencies"@angular/common": "^14.1.1", "@angular/compiler": "^14.1.1", "@angular/core": "^14.1.1", "@ngneat/until-destroy": "^9.2.1", "rxjs": "~6.6.0", "jest": "^28.1.3", "typescript": "~4.6.4, "primeng": "^14.0.0", ", If I install 9.2.1 the UT is failed, and if I install the 8.0.4 UT is successful, if I remove all 'UntilDestroy, untilDestroyed' at 9.2.1 version the ut is successful . The failed reason is the async and await not work. It seems 9.x.x have some conflict with the jest or angular14. Thanks

constCD commented 2 years ago

I have build a complete project: testUntilDestroy.zip After npm install, you can test the result, it is failed at @9 version, but succesful at 8.0.4 version.

arturovt commented 2 years ago

Can you create git repository and push your files there? I don’t wanna download zip archives without a proper virus check.

constCD commented 2 years ago

Can you create git repository and push your files there? I don’t wanna download zip archives without a proper virus check.

https://github.com/constCD/testUntilDestroy Thanks

arturovt commented 2 years ago

Hey, I'm getting this when running ng test:

./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: /home/overthesanity/projects/testUntilDestroy/src/polyfills.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

./src/test.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: /home/overthesanity/projects/testUntilDestroy/src/test.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
constCD commented 2 years ago

I have solved this issue, please pull new code. thanks

arturovt commented 2 years ago

I was able to reproduce it, will provide a fix shortly.

arturovt commented 2 years ago

@ngneat/until-destroy@9.2.2.