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

Check if version is valid #2316

Merged
merged 1 commit into from Nov 7, 2016
Merged

Check if version is valid #2316

merged 1 commit into from Nov 7, 2016

Conversation

GvS666
Copy link
Contributor

@GvS666 GvS666 commented Jun 29, 2016

semver.neq throws error when version is not valid. It should be catched and logged or simply ignored by this check. I've been using npm-check-updates package and it crashes because of this:

C:\DEV>ncu -m bower
Unhandled rejection TypeError: Invalid Version: 2.2-jsdw
    at new SemVer (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\semver\semver.js:273:11)
    at compare (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\semver\semver.js:460:10)
    at Object.neq (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\semver\semver.js:504:10)
    at GitHubResolver.GitResolver._savePkgMeta (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\core\resolvers
\GitResolver.js:209:56)
    at GitHubResolver._savePkgMeta (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\core\resolvers\GitHubResol
ver.js:134:53)
    at _fulfilled (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:79
6:13)
    at C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:604:44
    at runSingle (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:137:13)
    at flush (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

semver.neq throws error when version is not valid. It should be catched and logged or simply ignored by this check. I've been using npm-check-updates package and it crashes because of this:

```
C:\DEV>ncu -m bower
Unhandled rejection TypeError: Invalid Version: 2.2-jsdw
    at new SemVer (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\semver\semver.js:273:11)
    at compare (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\semver\semver.js:460:10)
    at Object.neq (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\semver\semver.js:504:10)
    at GitHubResolver.GitResolver._savePkgMeta (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\core\resolvers
\GitResolver.js:209:56)
    at GitHubResolver._savePkgMeta (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\core\resolvers\GitHubResol
ver.js:134:53)
    at _fulfilled (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:79
6:13)
    at C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:604:44
    at runSingle (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:137:13)
    at flush (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
```
@apaatsio
Copy link

👍 for this fix.

Btw, what's up with bower? Has the project been abandoned? Latest release 6 months ago??

@sheerun
Copy link
Contributor

sheerun commented Oct 12, 2016

@apaatsio Indeed, currently there are no active contributors, and I'm also busy doing for a living..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants