-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
feat(lib): use TestBed.get if .inject falsy - back compatibility (#283) #284
feat(lib): use TestBed.get if .inject falsy - back compatibility (#283) #284
Conversation
You need to update the peerDependencies. |
projects/spectator/package.json
Outdated
"@angular/common": "^9.0.1", | ||
"@angular/core": "^9.0.1", | ||
"@angular/router": "^9.0.1", | ||
"@angular/common": "^8.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't include v9. You need to use a range.
projects/spectator/package.json
Outdated
"@angular/router": "^9.0.1", | ||
"@angular/common": ">= 8.0.0", | ||
"@angular/core": ">= 8.0.0", | ||
"@angular/router": ">= 8.0.0", | ||
"typescript": ">= 3.7.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"typescript": ">= 2.8.0"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me check with this version of typescript,
I haven't checked it and not sure there are no new typescript features that are used in code which will not work with 2.8.0.
I will update you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NetanelBasal I would put "typescript": ">= 3.5.3" or smth like that b/c there are a bunch of errors when using 2.8.0. Actually, 3.5.3 was used as dependency in the root package.json:
e13c955#diff-b9cfc7f2cdf78a7f4b91a753d10865a2L77
Here is a part of errors I'm getting with 2.8.0:
Please confirm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the lastest version before we released v5:
spectator/projects/spectator/package.json
Line 35 in 5c98661
"typescript": ">= 2.8.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NetanelBasal yes you're right, but what is goal of peerDependencies? Maybe I'm wrong but should not we specify versions which gonna work with other specified peerDependencies versions?
I assume that it was wrong with >= 2.8.0 but if you're ok I will get back to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used 8.2.0, my bad, but even typescript 3.0.0 was not working with 8.2.0.
Angular 8.2.0 was properly working with typescript 3.5.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me check 2.8.0 with 8.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't work for me trying 2.8.0 with 8.0.0,
also 8.0.0 angular is using 3.4.2 version https:/angular/angular/blob/38a7e2a775d2c3495a8574dde7d1a7106dd0ae04/package.json#L108
so I'm really unsure in 2.8.0 but pushed it. It doesn't break anything, just seems to be smth like disinformation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TS version depends on your Angular version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that what I mean, and I'm not sure that TS 2.8.0 is compatible with Angular 8.0.0 :)
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Backward compatibility change.
Allow to use 5.x lib version for Angular version less than v9.
Keep to use for Angular v9 as is.
What is the current behavior?
Issue Number: #283
What is the new behavior?
You can continue using the latest version of Spectator in you Angular projects with version less than 9 (e.g. 7, 8 etc.)
Does this PR introduce a breaking change?
Other information