ngneat/spectator

Incompatibility with Angular 15.0.4

pascal-puetz opened this issue · 5 comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

Currently, spectator does not work with Angular >=v15.0.4 due to the ɵisStandalone being renamed to isStandalone. This leads to multiple compile errors like this:

./node_modules/@ngneat/spectator/fesm2020/ngneat-spectator.mjs:1620:11-24 - Error: export 'ɵisStandalone' (imported as 'ɵisStandalone') was not found in '@angular/core'

Expected behavior

Spectator should work with Angular >=15.0.4

Minimal reproduction of the problem with instructions

Create a new Angular Workspace using v15.0.4 and write a Test using Spectator. Run ng test - the error will show in the console.

What is the motivation / use case for changing the behavior?

Environment


Angular version: 15.0.4


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

I am also getting this with Angular 15.1.

In general, exports that begin with ɵ are not meant for public consumption, and the Angular team does not make any guarantees about maintaining them, even in bugfix releases, so I'm not sure why spectator depends on this export in the first place.

@pascal-puetz Are you sure you aren't actually using Angular 15.1?
I tried with 15.0.4 and it works fine.

@crfrolik I'm pretty sure, the lock file shows v15.0.4 and yesterday 15.1.0 was not available in our corporate Nexus yet, so it couldn't have been installed anyways (which is why I did not test v15.1.0)

@pascal-puetz maybe you have it as "@angular/core": "^15.0.4" which also includes v15.1.0 look here https://semver.npmjs.com/ . Anyway it was working for me on v15.0.4, but has this issue with v15.1.0 as @crfrolik said.

I've created pull request #599 and replaced the private api with the new public api.