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

fix(core): deprecate moduleId @Component property #49496

Closed
wants to merge 4 commits into from

Conversation

devversion
Copy link
Member

See individual commits

@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Mar 20, 2023
@pkozlowski-opensource pkozlowski-opensource added the area: core Issues related to the framework runtime label Mar 21, 2023
@ngbot ngbot bot added this to the Backlog milestone Mar 21, 2023
@devversion devversion added the target: major This PR is targeted for the next major release label Mar 21, 2023
@angular-robot angular-robot bot added the detected: breaking change PR contains a commit with a breaking change label Mar 21, 2023
@devversion devversion changed the title [WIP] fix(core): remove moduleId @Directive/@Component property fix(core): remove moduleId @Directive/@Component property Mar 21, 2023
@devversion devversion marked this pull request as ready for review March 21, 2023 15:16
@devversion devversion added the action: review The PR is still awaiting reviews from at least one requested reviewer label Mar 21, 2023
@pullapprove pullapprove bot requested a review from dylhunn March 21, 2023 15:16
@devversion devversion requested a review from alxhub March 21, 2023 15:19
@angular-robot angular-robot bot added detected: deprecation PR contains a commit with a deprecation and removed detected: breaking change PR contains a commit with a breaking change labels Mar 22, 2023
@devversion devversion changed the title fix(core): remove moduleId @Directive/@Component property fix(core): deprecate moduleId @Component property Mar 22, 2023
@github-actions
Copy link

github-actions bot commented Mar 22, 2023

Deployed aio for cc6dd27 to: https://ng-dev-previews-fw--pr-angular-angular-49496-l0rv7tlm.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@devversion devversion requested review from jelbourn and crisbeto and removed request for dylhunn March 22, 2023 15:30
@devversion devversion modified the milestones: Backlog, v16-candidates Mar 22, 2023
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

Reviewed-for: public-api

The `moduleId` directive field does not have any effect as of Ivy. In
View Engine it was used for resolving template and styles relative
to the component source location- but ultimately this is not needed
as the Angular compiler knows the source file location at build time,
and at runtime never even consulted `moduleId`. An XHR is always issue
using the extact specified URL.

For Angular CLI users, relative URLs in JIT are still possible because
the CLI has a TS transform that will replace the references with actual
Webpack imports.

`moduleId` does not seem worth keeping in the future, as it's not used
currently, and even if we would consider supporting relative JIT resource
URLs through it, it would be deeply coupled to CommonJS `module.id`.

DEPRECATED: The `@Directive`/`@Component` `moduleId` property is now
deprecated. It did not have any effect for multiple major versions and
will be removed in v17.
Removes all `moduleId:` property references in `@Directive` and
`@Component`.
Copy link
Member

@alxhub alxhub left a comment

Choose a reason for hiding this comment

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

Reviewed-for: public-api

Copy link
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

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

LGTM

Reviewed-for: public-api

@devversion devversion added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 23, 2023
@atscott
Copy link
Contributor

atscott commented Mar 24, 2023

This PR was merged into the repository by commit 605c536.

@atscott atscott closed this in 316c91b Mar 24, 2023
atscott pushed a commit that referenced this pull request Mar 24, 2023
Removes all `moduleId:` property references in `@Directive` and
`@Component`.

PR Close #49496
@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 Apr 24, 2023
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 aio: preview area: core Issues related to the framework runtime detected: deprecation PR contains a commit with a deprecation detected: feature PR contains a feature commit 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

6 participants