Skip to content

Conversation

devversion
Copy link
Member

We've recently made breaking changes with
41ada54, and we want to ensure existing reports for users continue to work.

This commit lazily migrates v2 to v3 reports when loaded. We can keep this logic for a while; while we also migrate our own Firebase database for permanent storage (maybe we need to expose this script for users as well eventually).

We've recently made breaking changes with
angular@41ada54,
and we want to ensure existing reports for users continue to work.

This commit lazily migrates v2 to v3 reports when loaded. We can keep
this logic for a while; while we also migrate our own Firebase database
for permanent storage (maybe we need to expose this script for users as
well eventually).
@devversion devversion requested a review from crisbeto September 29, 2025 06:47
* Migrates a v2 report to a v3 report.
* See: https://github.com/angular/web-codegen-scorer/commit/41ada541481a10c99de055ab6bb1c19b06a25b88.
*/
export function convertV2ReportToV3Report(doc: any) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's worth starting to keep the v2 interfaces?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be a bit concerned that things will become hard to maintain if we keep making changes to the report shape.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, we can always trim these when there will be too much and make a clear breaking change. Plus we don't necessarily anticipate many more report structure changes.

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM although IMO we don't really need to provide public migrations like this since the main target for the reports is our own report app. We should add a warning if the version of the report app doesn't line up with the version of the report though.

* Migrates a v2 report to a v3 report.
* See: https://github.com/angular/web-codegen-scorer/commit/41ada541481a10c99de055ab6bb1c19b06a25b88.
*/
export function convertV2ReportToV3Report(doc: any) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be a bit concerned that things will become hard to maintain if we keep making changes to the report shape.

@devversion devversion merged commit 96aba2d into angular:main Sep 29, 2025
3 checks passed
@devversion devversion deleted the v2-v3-migration branch September 29, 2025 10:38
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