Skip to content
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(router): add a migration to remove relativeLinkResolution usages #47604

Closed

Conversation

AndrewKushnir
Copy link
Contributor

As of Angular v15, the deprecated relativeLinkResolution config option of the Router is removed. This migration cleans up (removes) the relativeLinkResolution fields from the Router config objects in applications code.

import { RouterModule } from '@angular/router';

RouterModule.forRoot([], {
  relativeLinkResolution: 'legacy',
  enableTracing: false,
});
import { RouterModule } from '@angular/router';

RouterModule.forRoot([], {
  // the `relativeLinkResolution` is removed
  enableTracing: false,
});

PR Type

What kind of change does this PR introduce?

  • Feature

Does this PR introduce a breaking change?

  • Yes
  • No

@AndrewKushnir AndrewKushnir added feature Issue that requests a new feature state: WIP area: router target: major This PR is targeted for the next major release labels Oct 3, 2022
@ngbot ngbot bot modified the milestone: Backlog Oct 3, 2022
@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer and removed state: WIP labels Oct 3, 2022
@AndrewKushnir AndrewKushnir marked this pull request as ready for review October 3, 2022 02:43
@pullapprove pullapprove bot requested a review from alxhub October 3, 2022 02:43
Copy link
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

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

LGTM. Could you add a g3 version as well? While we can just do a find/replace, it might still be easier to run the migration.

@AndrewKushnir AndrewKushnir force-pushed the link-resolution-migration branch 2 times, most recently from 0498f5d to 5cf2142 Compare October 4, 2022 02:06
@AndrewKushnir
Copy link
Contributor Author

@atscott I've added a google3 migration logic as requested. Thank you.

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

@AndrewKushnir
Copy link
Contributor Author

Note: this PR needs some additional work to separate lookups from writes, based on #47599 (comment), adding the "blocked" label for now.

@AndrewKushnir
Copy link
Contributor Author

This PR is now updated based on the feedback from @crisbeto. The PR is ready for re-review. Thank you.

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

@AndrewKushnir AndrewKushnir added action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 6, 2022
@AndrewKushnir AndrewKushnir removed the request for review from alxhub October 6, 2022 21:13
As of Angular v15, the deprecated `relativeLinkResolution` config option of the Router is removed.  This migration cleans up (removes) the `relativeLinkResolution` fields from the Router config objects in applications code.

```ts
import { RouterModule } from '@angular/router';

RouterModule.forRoot([], {
  relativeLinkResolution: 'legacy',
  enableTracing: false,
});
```

```ts
import { RouterModule } from '@angular/router';

RouterModule.forRoot([], {
  // the `relativeLinkResolution` is removed
  enableTracing: false,
});
```
@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: presubmit The PR is in need of a google3 presubmit labels Oct 7, 2022
@AndrewKushnir
Copy link
Contributor Author

Merge-assistance: this PR would require an extra patch (cl/479482886) applied to the sync CL.

@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit 7bee28d.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: router feature Issue that requests a new feature merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants