Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for cannot install npm version newer than 6.1.0
  • Loading branch information
pcsirmaz committed Feb 5, 2019
1 parent 7a971d1 commit ed60ded
Show file tree
Hide file tree
Showing 7 changed files with 789 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -252,7 +252,7 @@ Building nodist requires
* NSIS Plugin: [AccessControl](http://nsis.sourceforge.net/AccessControl_plug-in)
* node.js for running the build script
* and npm for installing nodist's dependencies
* Finally you need to `go get github.com/marcelklehr/semver github.com/tj/go-debug`
* Finally you need to `go get github.com/marcelklehr/semver github.com/computes/go-debug`

If you have met all requirements, run the build command:

Expand Down
22 changes: 15 additions & 7 deletions lib/npm.js
Expand Up @@ -45,11 +45,19 @@ var NPMIST = npmist.prototype
* @return {string}
*/
NPMIST.listAvailable = function(){
return github.releases.listReleasesAsync({
owner: 'npm',
repo: 'npm',
per_page: '100'
});
return Promise.all([
github.releases.listReleasesAsync({
owner: 'npm',
repo: 'npm',
per_page: '100'
}),
github.releases.listReleasesAsync({
owner: 'npm',
repo: 'cli',
per_page: '100'
})
])
.then(([npm, cli]) => npm.concat(cli));
};

/**
Expand Down Expand Up @@ -95,7 +103,7 @@ NPMIST.listInstalled = function listInstalled(cb) {
NPMIST.latestVersion = function(){
return github.releases.getLatestReleaseAsync({
owner: 'npm',
repo: 'npm'
repo: 'cli'
})
.then(function(result){
return result.tag_name;
Expand Down Expand Up @@ -124,7 +132,7 @@ NPMIST.matchingVersion = function(){
* @return {string}
*/
NPMIST.downloadUrl = function(version){
return 'https://codeload.github.com/npm/npm/tar.gz/vVERSION'
return 'https://codeload.github.com/npm/cli/tar.gz/vVERSION'
.replace('VERSION',version.replace('v',''));
};

Expand Down

0 comments on commit ed60ded

Please sign in to comment.