Skip to content

feat(@schematics/angular): add update migration to keep previous style guide generation behavior #30050

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

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

clydin
Copy link
Member

@clydin clydin commented Apr 7, 2025

When updating to Angular v20 via ng update, a migration will be executed that will add schematic generation (ng generate) defaults to the workspace. These defaults will ensure that existing projects will continue to generate files as done in previous versions of the Angular CLI. All new projects (via ng new) or projects that do not explicitly contain these options in their workspace will use the updated style guide naming behavior.

The option values for the schematics field are as follows:

{
    '@schematics/angular:component': { type: 'component' },
    '@schematics/angular:directive': { type: 'directive' },
    '@schematics/angular:service': { type: 'service' },
    '@schematics/angular:guard': { typeSeparator: '.' },
    '@schematics/angular:interceptor': { typeSeparator: '.' },
    '@schematics/angular:module': { typeSeparator: '.' },
    '@schematics/angular:pipe': { typeSeparator: '.' },
    '@schematics/angular:resolver': { typeSeparator: '.' },
}
@clydin clydin added the target: major This PR is targeted for the next major release label Apr 7, 2025
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: @schematics/angular labels Apr 7, 2025
@clydin clydin changed the title feat(@schematics/angular): add update migration to keep existing style guide generation behavior Apr 7, 2025
@clydin clydin force-pushed the style-guide/migration branch from c969852 to fe5d0e6 Compare April 7, 2025 16:53
@clydin clydin marked this pull request as ready for review April 7, 2025 17:49
@clydin clydin requested a review from alan-agius4 April 7, 2025 18:52
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 7, 2025
…e guide generation behavior

When updating to Angular v20 via `ng update`, a migration will be executed
that will add schematic generation (`ng generate`) defaults to the workspace.
These defaults will ensure that existing projects will continue to generate
files as done in previous versions of the Angular CLI. All new projects (via `ng new`) or
projects that do not explicitly contain these options in their workspace
will use the updated style guide naming behavior.

The option values for the `schematics` field are as follows:
```
{
    '@schematics/angular:component': { type: 'component' },
    '@schematics/angular:directive': { type: 'directive' },
    '@schematics/angular:service': { type: 'service' },
    '@schematics/angular:guard': { typeSeparator: '.' },
    '@schematics/angular:interceptor': { typeSeparator: '.' },
    '@schematics/angular:module': { typeSeparator: '.' },
    '@schematics/angular:pipe': { typeSeparator: '.' },
    '@schematics/angular:resolver': { typeSeparator: '.' },
}
```
@clydin clydin force-pushed the style-guide/migration branch from fe5d0e6 to 2337300 Compare April 7, 2025 18:53
@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 Apr 8, 2025
@clydin clydin merged commit fdc6291 into angular:main Apr 8, 2025
31 checks passed
@clydin clydin deleted the style-guide/migration branch April 8, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: @schematics/angular detected: feature PR contains a feature commit target: major This PR is targeted for the next major release
2 participants