-
Notifications
You must be signed in to change notification settings - Fork 11
chore: update angular #399
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
Conversation
@@ -7,7 +7,7 @@ | |||
}, | |||
"license": "LicenseRef-LICENSE", | |||
"scripts": { | |||
"postinstall": "ngcc --properties browser main --tsconfig './tsconfig.spec.json'", | |||
"postinstall": "ngcc --tsconfig './tsconfig.app.json' --use-program-dependencies && ngcc --source 'node_modules/@angular'", |
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.
What does these new options do?
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.
so previously, we were running ngcc across all test dependencies. The issue there is that spectator and spectator jest circularly reference each other (not sure why this wasn't an issue in the past) and break. We don't actually need spectator to be compiled for ivy though - so now we're using --tsconfig './tsconfig.app.json' --use-program-dependencies
to only compile modules reference from the actual application, and then manually adding ngcc --source 'node_modules/@angular'
to compile the angular testing modules used by the test bed (and we know all the first party angular ones are compatible with the ivy compiler anyway).
} | ||
|
||
public darker(colorHex: string, basis: number): string { | ||
return rgb(colorHex).darker(basis).hex(); | ||
return rgb(colorHex).darker(basis).formatHex(); |
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.
Why this change? I dont see d3 being updated with this pr.
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 a deprecation called out by the linter. If I were to guess, we got a new locked version of d3-color that was still compatible with the version spec in package.json
@@ -1,10 +1,10 @@ | |||
import { fakeAsync } from '@angular/core/testing'; | |||
import { MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar'; | |||
import { IconType } from '@hypertrace/assets-library'; | |||
import { IconComponent } from '@hypertrace/components'; |
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.
Does the new compiler catches these circular dependencies in test?
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.
Nope - I manually fixed all these because of the ngcc issue above. I thought the circular references breaking ngcc were our own, but it ended up being spectator. Since I had already fixed them, I left them in.
Codecov Report
@@ Coverage Diff @@
## main #399 +/- ##
==========================================
- Coverage 86.09% 86.08% -0.01%
==========================================
Files 741 741
Lines 15039 15039
Branches 1782 1920 +138
==========================================
- Hits 12948 12947 -1
+ Misses 2060 2059 -1
- Partials 31 33 +2
Continue to review full report at Codecov.
|
Description
Update angular (this needs a dependency update pending review at hypertrace/hyperdash-angular#109 ) first too.
Cleaned up some logging tests and self references, as well as a couple type issues from the stricter ts 4.x compiler.
Testing
Ran tests and build. Verified UI locally.
Checklist: