swchrm logs

妄想技術録

npm_moduleのバージョン確認方法

要旨

npm-checkが個人的には見られる機能が多くておすすめだと思う。
簡単な最新のバージョンを確認したい場合はversion-checkだけでよい。

インストールからチェックまでの様子

RxJSを題材にする。

npm-check

インストール

MyMacBookAir:VNavi swchrm$ npm install -g npm-check
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
/Users/swchrm/.nodebrew/node/v10.15.0/bin/npm-check -> /Users/swchrm/.nodebrew/node/v10.15.0/lib/node_modules/npm-check/bin/cli.js
+ npm-check@5.9.0
added 247 packages from 94 contributors in 12.794s

チェック

MyMacBookAir:VNavi swchrm$ npm-check

@angular/animations                 😎  MAJOR UP  Major update available. https://github.com/angular/angular#readme
                                                 npm install --save @angular/animations@7.1.4 to go from 5.2.11 to 7.1.4
                                    😕  NOTUSED?  Still using @angular/animations?
                                                 Depcheck did not find code similar to require('@angular/animations') or import from '@angular/animations'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @angular/animations

@angular/common                     😎  MAJOR UP  Major update available. https://github.com/angular/angular#readme
                                                 npm install --save @angular/common@7.1.4 to go from 5.2.11 to 7.1.4
                                    😕  NOTUSED?  Still using @angular/common?
                                                 Depcheck did not find code similar to require('@angular/common') or import from '@angular/common'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @angular/common

@angular/compiler                   😎  MAJOR UP  Major update available. https://github.com/angular/angular#readme
                                                 npm install --save @angular/compiler@7.1.4 to go from 5.2.11 to 7.1.4
                                    😕  NOTUSED?  Still using @angular/compiler?
                                                 Depcheck did not find code similar to require('@angular/compiler') or import from '@angular/compiler'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @angular/compiler

@angular/compiler-cli               😎  MAJOR UP  Major update available. https://github.com/angular/angular/tree/master/packages/compiler-cli
                                                 npm install --save @angular/compiler-cli@7.1.4 to go from 5.2.11 to 7.1.4
                                    😕  NOTUSED?  Still using @angular/compiler-cli?
                                                 Depcheck did not find code similar to require('@angular/compiler-cli') or import from '@angular/compiler-cli'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @angular/compiler-cli

@angular/core                       😎  MAJOR UP  Major update available. https://github.com/angular/angular#readme
                                                 npm install --save @angular/core@7.1.4 to go from 5.2.11 to 7.1.4
                                    😕  NOTUSED?  Still using @angular/core?
                                                 Depcheck did not find code similar to require('@angular/core') or import from '@angular/core'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @angular/core

@angular/forms                      😎  MAJOR UP  Major update available. https://github.com/angular/angular#readme
                                                 npm install --save @angular/forms@7.1.4 to go from 5.2.11 to 7.1.4
                                    😕  NOTUSED?  Still using @angular/forms?
                                                 Depcheck did not find code similar to require('@angular/forms') or import from '@angular/forms'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @angular/forms

@angular/http                       😎  MAJOR UP  Major update available. https://github.com/angular/angular#readme
                                                 npm install --save @angular/http@7.1.4 to go from 5.2.11 to 7.1.4
                                    😕  NOTUSED?  Still using @angular/http?
                                                 Depcheck did not find code similar to require('@angular/http') or import from '@angular/http'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @angular/http

@angular/platform-browser           😎  MAJOR UP  Major update available. https://github.com/angular/angular#readme
                                                 npm install --save @angular/platform-browser@7.1.4 to go from 5.2.11 to 7.1.4
                                    😕  NOTUSED?  Still using @angular/platform-browser?
                                                 Depcheck did not find code similar to require('@angular/platform-browser') or import from '@angular/platform-browser'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @angular/platform-browser

@angular/platform-browser-dynamic   😎  MAJOR UP  Major update available. https://github.com/angular/angular#readme
                                                 npm install --save @angular/platform-browser-dynamic@7.1.4 to go from 5.2.11 to 7.1.4
                                    😕  NOTUSED?  Still using @angular/platform-browser-dynamic?
                                                 Depcheck did not find code similar to require('@angular/platform-browser-dynamic') or import from '@angular/platform-browser-dynamic'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @angular/platform-browser-dynamic

@ionic-native/core                  😕  NOTUSED?  Still using @ionic-native/core?
                                                 Depcheck did not find code similar to require('@ionic-native/core') or import from '@ionic-native/core'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @ionic-native/core

@ionic-native/splash-screen         😕  NOTUSED?  Still using @ionic-native/splash-screen?
                                                 Depcheck did not find code similar to require('@ionic-native/splash-screen') or import from '@ionic-native/splash-screen'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @ionic-native/splash-screen

@ionic-native/status-bar            😕  NOTUSED?  Still using @ionic-native/status-bar?
                                                 Depcheck did not find code similar to require('@ionic-native/status-bar') or import from '@ionic-native/status-bar'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @ionic-native/status-bar

@ionic/pro                          😕  NOTUSED?  Still using @ionic/pro?
                                                 Depcheck did not find code similar to require('@ionic/pro') or import from '@ionic/pro'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @ionic/pro

@ionic/storage                      😕  NOTUSED?  Still using @ionic/storage?
                                                 Depcheck did not find code similar to require('@ionic/storage') or import from '@ionic/storage'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save @ionic/storage

ionic-angular                       😕  NOTUSED?  Still using ionic-angular?
                                                 Depcheck did not find code similar to require('ionic-angular') or import from 'ionic-angular'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save ionic-angular

ionicons                            😎  MAJOR UP  Major update available. http://ionicons.com/
                                                 npm install --save ionicons@4.5.1 to go from 3.0.0 to 4.5.1
                                    😕  NOTUSED?  Still using ionicons?
                                                 Depcheck did not find code similar to require('ionicons') or import from 'ionicons'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save ionicons

rxjs                                😎  MAJOR UP  Major update available. https://github.com/ReactiveX/RxJS
                                                 npm install --save rxjs@6.3.3 to go from 5.5.11 to 6.3.3
                                    😕  NOTUSED?  Still using rxjs?
                                                 Depcheck did not find code similar to require('rxjs') or import from 'rxjs'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save rxjs

sw-toolbox                          😕  NOTUSED?  Still using sw-toolbox?
                                                 Depcheck did not find code similar to require('sw-toolbox') or import from 'sw-toolbox'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save sw-toolbox

three                               😕  NOTUSED?  Still using three?
                                                 Depcheck did not find code similar to require('three') or import from 'three'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save three

zone.js                             😕  NOTUSED?  Still using zone.js?
                                                 Depcheck did not find code similar to require('zone.js') or import from 'zone.js'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save zone.js

typescript                          😎  MAJOR UP  Major update available. https://www.typescriptlang.org/
                                                 npm install --save-dev typescript@3.2.2 to go from 2.6.2 to 3.2.2
                                    😕  NOTUSED?  Still using typescript?
                                                 Depcheck did not find code similar to require('typescript') or import from 'typescript'.
                                                 Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                                 Use --skip-unused to skip this check.
                                                 To remove this package: npm uninstall --save-dev typescript

version-check

インストール

MyMacBookAir:VNavi swchrm$ npm install -g version-check
/Users/swchrm/.nodebrew/node/v10.15.0/bin/version-check -> /Users/swchrm/.nodebrew/node/v10.15.0/lib/node_modules/version-check/bin/version-check
+ version-check@1.2.0
added 45 packages from 18 contributors in 7.303s

チェック

MyMacBookAir:VNavi swchrm$ version-check rxjs
rxjs 6.3.3

参考文献