angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng update/add remove newline in package.json

Open thecp opened this issue 7 years ago • 1 comments

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

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

Versions

node --version
v8.11.3

yarn --version
1.7.0

ng --version
Angular CLI: 6.1.2
Node: 8.11.3
OS: linux x64
Angular: 6.1.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.7.2
@angular-devkit/build-angular     0.7.2
@angular-devkit/build-optimizer   0.7.2
@angular-devkit/build-webpack     0.7.2
@angular-devkit/core              0.7.2
@angular-devkit/schematics        0.7.2
@angular/cdk                      6.2.0
@angular/cli                      6.1.2
@ngtools/webpack                  6.1.2
@schematics/angular               0.7.2
@schematics/update                0.7.2
rxjs                              6.2.2
typescript                        2.7.2
webpack                           4.9.2

Repro steps

  1. run ng update @angular/something
  2. Git diff of package.json:
-}
+}
\ No newline at end of file

Desired functionality

Not a big deal but ng update should add a newline at te end of package.json so that git doesn't complain anymore.

thecp avatar Aug 02 '18 06:08 thecp

This issue also seems to occur in angular.json after ng add.

RA80533 avatar May 05 '21 18:05 RA80533