Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(migrations): add a combined migration for all signals APIs #58259

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

Closed
wants to merge 1 commit into from

Conversation

crisbeto
Copy link
Member

Adds a combined @angular/core:signals migration that combines all of the signals-related migrations into one for the apps that want to do it all in one go.

All of the heavy-lifting was already done by the individual migrations, these changes only chain them together for a more convenient developer experience.

Adds a combined `@angular/core:signals` migration that combines all of the signals-related migrations into one for the apps that want to do it all in one go.

All of the heavy-lifting was already done by the individual migrations, these changes only chain them together for a more convenient developer experience.
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release area: migrations Issues related to `ng update` migrations labels Oct 18, 2024
@ngbot ngbot bot added this to the Backlog milestone Oct 18, 2024
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Oct 18, 2024
for (const migration of migrations) {
switch (migration) {
case SupportedMigrations.inputs:
rules.push(toSignalInputs(options));
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: the devkit has a RunSchematicTask which could've been used to execute the other schematics. I didn't use it, because:

  1. I couldn't actually get it to work. This might be a unit-test-only issue since we use that API in the CDK and it seems to work fine.
  2. This gives us better type safety in case the options for the other schematics change.

@@ -35,6 +35,11 @@
"factory": "./bundles/signal-queries-migration#migrate",
"schema": "./ng-generate/signal-queries-migration/schema.json",
"aliases": ["signal-queries", "signal-query", "signal-query-migration"]
},
"signals": {
Copy link
Member Author

Choose a reason for hiding this comment

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

I was one the fence whether to call it something like signals-combined.

Copy link
Member

Choose a reason for hiding this comment

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

I wonder, if we include output at some point, should we name it something like function-apis and have signals as an alias?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah good point. My concern would be discoverability since while we call the APIs "function" within the team, they're very much tied to signals in practice.

Copy link
Member

Choose a reason for hiding this comment

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

I agree, so maybe signals with the alias for function-api etc?

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.

Love it. Thank you!

@pkozlowski-opensource pkozlowski-opensource 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 Oct 18, 2024
@devversion
Copy link
Member

This PR was merged into the repository by commit dff4de0.

The changes were merged into the following branches: main

@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 18, 2024
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 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.

3 participants