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(migrations): add migration to replace /deep/ with ::ng-deep #42214

Closed
wants to merge 3 commits into from
Closed

fix(migrations): add migration to replace /deep/ with ::ng-deep #42214

wants to merge 3 commits into from

Conversation

alan-agius4
Copy link
Contributor

With this change we add a migration to replace the deprecated shadow-piercing selector from /deep/ with deprecated but recommended ::ng-deep.

The main motivation for this change is that the CSS optimizer CSSNano which is used by the Angular CLI no longer supports this non standard selector and causes build time errors due to the selector being minified incorrectly. However, CSSNano does support the recommended deprecated ::ng-deep selector.

Closes: #42196

@google-cla google-cla bot added the cla: yes label May 21, 2021
@pullapprove pullapprove bot requested a review from devversion May 21, 2021 09:46
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer action: time-zone target: patch This PR is targeted for the next patch release area: migrations Issues related to `ng update` migrations labels May 21, 2021
@ngbot ngbot bot added this to the Backlog milestone May 21, 2021
With this change we add a migration to replace the deprecated shadow-piercing selector from `/deep/` with deprecated but recommended `::ng-deep`.

The main motivation for this change is that the CSS optimizer CSSNano which is used by the Angular CLI no longer supports this non standard selector and causes build time errors due to the selector being minified incorrectly. However, CSSNano does support the recommended deprecated `::ng-deep` selector.

Closes: #42196
Copy link
Member

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

LGTM. I think there are edge-cases where this migration would incorrectly change code. e.g. consider a path like my_server/deep/whatever. Though this is unlikely and it's better to keep the migration simple IMO.

Edit: As Alan pointed out the example above is not a good one. Though as said, there can be edge-cases with a trailing space too

@alan-agius4
Copy link
Contributor Author

alan-agius4 commented May 21, 2021

@devversion I added the trailing space in the check ie /deep/ for that reason and reduce such cases.

@alan-agius4 alan-agius4 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 May 21, 2021
@zarend zarend closed this in 7f6213a May 21, 2021
zarend pushed a commit that referenced this pull request May 21, 2021
…42214)

With this change we add a migration to replace the deprecated shadow-piercing selector from `/deep/` with deprecated but recommended `::ng-deep`.

The main motivation for this change is that the CSS optimizer CSSNano which is used by the Angular CLI no longer supports this non standard selector and causes build time errors due to the selector being minified incorrectly. However, CSSNano does support the recommended deprecated `::ng-deep` selector.

Closes: #42196

PR Close #42214
@alan-agius4 alan-agius4 deleted the deep-css-migration branch May 22, 2021 04:46
iRealNirmal pushed a commit to iRealNirmal/angular that referenced this pull request Jun 4, 2021
…ngular#42214)

With this change we add a migration to replace the deprecated shadow-piercing selector from `/deep/` with deprecated but recommended `::ng-deep`.

The main motivation for this change is that the CSS optimizer CSSNano which is used by the Angular CLI no longer supports this non standard selector and causes build time errors due to the selector being minified incorrectly. However, CSSNano does support the recommended deprecated `::ng-deep` selector.

Closes: angular#42196

PR Close angular#42214
@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 Jun 22, 2021
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: migrations Issues related to `ng update` migrations cla: yes target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Css Minimizer error Unclosed comment when using /deep/
3 participants