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(@schematics/angular): implements items type for guard schematic #15412

Merged
merged 1 commit into from
Aug 23, 2019

Conversation

cexbrayat
Copy link
Member

@cexbrayat cexbrayat commented Aug 22, 2019

Fixes the type of the items in the schema.json for implements, as enum is not picked up by the CLI.
Also migrates the existing e2e test to async/await and adds another one with implements to avoid regressions.

My previous PR #15313 fixed an issue in the guard schematic but introduced a regression (sorry!) as:

"items": {
  "enum": [
    "CanActivate",
    "CanActivateChild",
    "CanLoad"
  ]
},

is not picked up by the CLI, so --implements ends up not being recognized when running:

ng g guard foo --implements=CanActivate

The regression was released in CLI v8.3.0 stable (not in the next or rc releases).

If the issue is encountered, it can be easily worked around by using --defaults or manually picking the interface wanted in the prompt.

@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Aug 22, 2019
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM

Fixes the type of the items in the `schema.json` for `implements`, as `enum` alone is not picked up by the CLI.
Also migrates the existing e2e test to `async/await` and adds another one with `implements` to avoid regressions.
@mgechev mgechev merged commit 9296bea into angular:master Aug 23, 2019
mgechev pushed a commit that referenced this pull request Aug 23, 2019
…15412)

Fixes the type of the items in the `schema.json` for `implements`, as `enum` alone is not picked up by the CLI.
Also migrates the existing e2e test to `async/await` and adds another one with `implements` to avoid regressions.
@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 Sep 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants