Skip to content

fix(core): preserve comments in internal inject migration#60588

Closed
RussellSprouts wants to merge 1 commit intoangular:mainfrom
RussellSprouts:inject-comments
Closed

fix(core): preserve comments in internal inject migration#60588
RussellSprouts wants to merge 1 commit intoangular:mainfrom
RussellSprouts:inject-comments

Conversation

@RussellSprouts
Copy link
Copy Markdown

The internal-only combineMemberInitializers option for the inject migration sometimes dropped the
doc comments from the members.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

The internal-only combineMemberInitializers option
for the inject migration sometimes dropped the
doc comments from the members.
@pullapprove pullapprove bot requested a review from kirjs March 27, 2025 15:56
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Mar 27, 2025
@ngbot ngbot bot added this to the Backlog milestone Mar 27, 2025
@AndrewKushnir AndrewKushnir requested review from crisbeto and removed request for kirjs March 27, 2025 16:02
``,
`@Directive()`,
`class MyDir {`,
` private foo = inject(Foo);`,
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

My code here loses the whitespace (e.g., blank lines) around the members, which isn't ideal. Let me know if you know of a good way to preserve it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this is internal-only and we apply auto-formatting, I think it's okay.

@jelbourn jelbourn added target: patch This PR is targeted for the next patch release hotlist: google area: migrations Issues related to `ng update`/`ng generate` migrations labels Mar 27, 2025
``,
`@Directive()`,
`class MyDir {`,
` private foo = inject(Foo);`,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this is internal-only and we apply auto-formatting, I think it's okay.

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Mar 27, 2025
thePunderWoman pushed a commit that referenced this pull request Mar 27, 2025
The internal-only combineMemberInitializers option
for the inject migration sometimes dropped the
doc comments from the members.

PR Close #60588
@thePunderWoman
Copy link
Copy Markdown
Contributor

This PR was merged into the repository by commit 0cd7d3b.

The changes were merged into the following branches: main, 19.2.x

@angular-automatic-lock-bot
Copy link
Copy Markdown

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 Apr 27, 2025
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: core Issues related to the framework runtime area: migrations Issues related to `ng update`/`ng generate` migrations hotlist: google target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants