Skip to content

update: missing space in version and command output #15784

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
Splaktar opened this issue Oct 8, 2019 · 5 comments · Fixed by #15786
Closed

update: missing space in version and command output #15784

Splaktar opened this issue Oct 8, 2019 · 5 comments · Fixed by #15786
Labels
freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Milestone

Comments

@Splaktar
Copy link
Contributor

Splaktar commented Oct 8, 2019

🐞 Bug report

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [x] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Unknown

Description

Note that 9.0.0-next.8ng and 9.0.0-next.9ng are single strings without a space.

    We analyzed your package.json, there are some packages to update:
    
      Name                               Version                  Command to update
     --------------------------------------------------------------------------------
      @angular/cdk                       8.1.4 -> 9.0.0-next.0    ng update @angular/cdk --next
      @angular/cli                       9.0.0-next.3 -> 9.0.0-next.8ng update @angular/cli --next
      @angular/core                      9.0.0-next.5 -> 9.0.0-next.9ng update @angular/core --next
      @angular/material                  8.1.4 -> 9.0.0-next.0    ng update @angular/material --next

🔬 Minimal Reproduction

  1. Create a project with @angular/[email protected]
  2. Run ng update --next

🔥 Exception or Error

N/A

🌍 Your Environment


Angular CLI: 9.0.0-next.3
Node: 10.16.3
OS: darwin x64
Angular: 9.0.0-next.5
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
... service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-next.3
@angular-devkit/build-angular     0.900.0-next.3
@angular-devkit/build-optimizer   0.900.0-next.3
@angular-devkit/build-webpack     0.900.0-next.3
@angular-devkit/core              9.0.0-next.3
@angular-devkit/schematics        9.0.0-next.3
@angular/cdk                      8.1.4
@angular/cli                      9.0.0-next.3
@angular/fire                     5.2.1
@angular/language-service         8.2.5
@angular/material                 8.1.4
@angular/pwa                      0.900.0-next.3
@ngtools/webpack                  9.0.0-next.3
@schematics/angular               9.0.0-next.3
@schematics/update                0.900.0-next.3
rxjs                              6.5.3
typescript                        3.5.3
webpack                           4.39.3

Anything else relevant?
OS: macOS Mojave
PM: npm

@Splaktar
Copy link
Contributor Author

Splaktar commented Oct 8, 2019

The code in question appears to be here:

let command = `ng update ${name}`;
if (tag == 'next') {
command += ' --next';
}
return [name, `${info.installed.version} -> ${version}`, command];

I'm not sure if something as simple as this would fix it?

return [name, `${info.installed.version} -> ${version} `, command];

It looks like there are no tests for _usageMessage().

@Splaktar
Copy link
Contributor Author

Splaktar commented Oct 8, 2019

I tried to write a test, but it doesn't appear that runSchematicAsync() gives any access to the command's output. It only gives you the modified file tree, which isn't useful in this case.

Splaktar added a commit to DevIntent/angular-cli that referenced this issue Oct 8, 2019
@Splaktar
Copy link
Contributor Author

Splaktar commented Oct 8, 2019

OK, adding that space does help and gives

  Name                                                      Version                  Command to update
 -------------------------------------------------------------------------------------------------------
  @angular/cli                                              9.0.0-next.5 -> 9.0.0-next.8 ng update @angular/cli --next

And it still looks fine with non-next versions

  Name                                                      Version                  Command to update
 -------------------------------------------------------------------------------------------------------
  @angular/cli                                              8.0.0 -> 8.3.8           ng update @angular/cli

@Splaktar
Copy link
Contributor Author

Splaktar commented Oct 8, 2019

Opened PR #15786 to fix this.

@alan-agius4 alan-agius4 added comp: schematics/update freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix labels Oct 9, 2019
@ngbot ngbot bot added this to the Backlog milestone Oct 9, 2019
@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 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants