Skip to content

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

Merged
merged 3 commits into from
Nov 28, 2020
Merged

chore: update angular #399

merged 3 commits into from
Nov 28, 2020

Conversation

aaron-steinfeld
Copy link
Contributor

@aaron-steinfeld aaron-steinfeld commented Nov 28, 2020

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:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

@aaron-steinfeld aaron-steinfeld requested a review from a team as a code owner November 28, 2020 16:06
anandtiwary
anandtiwary previously approved these changes Nov 28, 2020
@@ -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'",
Copy link
Contributor

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?

Copy link
Contributor Author

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();
Copy link
Contributor

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.

Copy link
Contributor Author

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';
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link

codecov bot commented Nov 28, 2020

Codecov Report

Merging #399 (e1855a0) into main (7fdfb70) will decrease coverage by 0.00%.
The diff coverage is 85.00%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
projects/common/src/color/color.service.ts 82.60% <0.00%> (ø)
...sian/d3/scale/numeric/time/cartesian-time-scale.ts 12.50% <0.00%> (ø)
...sequence/renderer/sequence-bar-renderer.service.ts 100.00% <100.00%> (ø)
.../components/bubble/bubble-chart-builder.service.ts 95.49% <100.00%> (ø)
...scale/numeric/linear/cartesian-continuous-scale.ts 100.00% <100.00%> (ø)
...d/components/cartesian/d3/series/cartesian-area.ts 71.15% <100.00%> (ø)
...ents/radar/series/radar-series-renderer.service.ts 100.00% <100.00%> (ø)
...fiers/error-percentage-metric-aggregation.model.ts 60.00% <100.00%> (ø)
...ers/percentile-latency-metric-aggregation.model.ts 44.44% <100.00%> (ø)
...ojects/components/src/popover/popover.component.ts 96.29% <0.00%> (-3.71%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7fdfb70...e1855a0. Read the comment docs.

@aaron-steinfeld aaron-steinfeld merged commit df8d0c5 into main Nov 28, 2020
@aaron-steinfeld aaron-steinfeld deleted the update-ng branch November 28, 2020 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants