Skip to content

refactor(core): make Testability compatible with tree-shaking#45657

Closed
AndrewKushnir wants to merge 1 commit intoangular:mainfrom
AndrewKushnir:testability-tree-shaking
Closed

refactor(core): make Testability compatible with tree-shaking#45657
AndrewKushnir wants to merge 1 commit intoangular:mainfrom
AndrewKushnir:testability-tree-shaking

Conversation

@AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented Apr 16, 2022

This PR refactors the Testability-related logic to extract the necessary providers into a separate array, so that it can later become it's own NgModule (or exposed as an array of providers) and be excluded from the new APIs by default.

@AndrewKushnir AndrewKushnir added state: WIP area: core Issues related to the framework runtime target: major This PR is targeted for the next major release labels Apr 16, 2022
@ngbot ngbot bot added this to the Backlog milestone Apr 16, 2022
@AndrewKushnir AndrewKushnir force-pushed the testability-tree-shaking branch 9 times, most recently from f6aa6fa to b9a5a8b Compare April 19, 2022 22:25
@AndrewKushnir
Copy link
Contributor Author

AndrewKushnir commented Apr 19, 2022

Exploratory Presubmit + TGP.

@AndrewKushnir AndrewKushnir requested a review from alxhub April 20, 2022 22:06
@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer and removed state: WIP labels Apr 20, 2022
@AndrewKushnir AndrewKushnir force-pushed the testability-tree-shaking branch from b9a5a8b to fad9ebc Compare April 20, 2022 23:41
@AndrewKushnir AndrewKushnir marked this pull request as ready for review April 20, 2022 23:41
@AndrewKushnir AndrewKushnir changed the title refactor(core): make Testability tree-shakable refactor(core): make Testability compatible with tree-shaking Apr 20, 2022
@AndrewKushnir AndrewKushnir force-pushed the testability-tree-shaking branch 3 times, most recently from 13c959e to e72cbbb Compare April 21, 2022 02:20
jessicajaniuk
jessicajaniuk previously approved these changes Apr 21, 2022
Copy link
Contributor

@jessicajaniuk jessicajaniuk 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

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.

reviewed-for: public-api

atscott
atscott previously approved these changes Apr 22, 2022
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.

reviewed-for: size-tracking

@pullapprove pullapprove bot requested a review from alxhub May 5, 2022 16:20
alxhub
alxhub previously approved these changes May 5, 2022
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

atscott
atscott previously approved these changes May 5, 2022
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.

reviewed-for: size-tracking

@AndrewKushnir AndrewKushnir force-pushed the testability-tree-shaking branch 2 times, most recently from 9001f94 to 195e3b1 Compare May 5, 2022 18:11
This commit refactors the `Testability`-related logic to extract the necessary providers into a separate array, so that it can later become it's own NgModule (or exposed as an array of providers) and be excluded from the new APIs by default.
@AndrewKushnir AndrewKushnir force-pushed the testability-tree-shaking branch from 195e3b1 to f931329 Compare May 5, 2022 18:18
@AndrewKushnir AndrewKushnir added target: rc This PR is targeted for the next release-candidate action: presubmit The PR is in need of a google3 presubmit 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 target: major This PR is targeted for the next major release action: review The PR is still awaiting reviews from at least one requested reviewer action: presubmit The PR is in need of a google3 presubmit labels May 5, 2022
@AndrewKushnir
Copy link
Contributor Author

Note to the Caretaker (to myself 😄, but more for documentation purposes):

  • the TGP is "green" (only unrelated screen shot failures)
  • the rebase did reset the reviews/approvals, but nothing has changed (there was a merge conflict)

This PR is ready for merge.

@AndrewKushnir
Copy link
Contributor Author

This PR was merged into the repository by commit c9b40b5.

AndrewKushnir added a commit that referenced this pull request May 5, 2022
This commit refactors the `Testability`-related logic to extract the necessary providers into a separate array, so that it can later become it's own NgModule (or exposed as an array of providers) and be excluded from the new APIs by default.

PR Close #45657
AndrewKushnir added a commit to AndrewKushnir/angular that referenced this pull request May 10, 2022
…otstrapApplication`

The Testability-related logic was refactored in angular#45657 to become tree-shaking-friendly: it was decoupled from the core providers of the `BrowserModule`. This commit updates the newly-introduced `bootstrapApplication` function to exclude Testability-providers by default (note: the Testability is still included in the NgModule-based bootstrap).

In order to add the Testability to the app bootstrapped via `bootstrapApplication`, the `provideProtractorTestingSupport` function is introduced.
AndrewKushnir added a commit that referenced this pull request May 10, 2022
…otstrapApplication` (#45885)

The Testability-related logic was refactored in #45657 to become tree-shaking-friendly: it was decoupled from the core providers of the `BrowserModule`. This commit updates the newly-introduced `bootstrapApplication` function to exclude Testability-providers by default (note: the Testability is still included in the NgModule-based bootstrap).

In order to add the Testability to the app bootstrapped via `bootstrapApplication`, the `provideProtractorTestingSupport` function is introduced.

PR Close #45885
AndrewKushnir added a commit that referenced this pull request May 10, 2022
…otstrapApplication` (#45885)

The Testability-related logic was refactored in #45657 to become tree-shaking-friendly: it was decoupled from the core providers of the `BrowserModule`. This commit updates the newly-introduced `bootstrapApplication` function to exclude Testability-providers by default (note: the Testability is still included in the NgModule-based bootstrap).

In order to add the Testability to the app bootstrapped via `bootstrapApplication`, the `provideProtractorTestingSupport` function is introduced.

PR Close #45885
@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 5, 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: core Issues related to the framework runtime merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants