package-json
Advanced tools
Comparing version 1.0.0 to 1.0.1
21
index.js
@@ -11,3 +11,8 @@ 'use strict'; | ||
registryUrl(function (err, url) { | ||
got(registryUrl + encodeURIComponent(name) + '/' + version, function (err, data) { | ||
if (err === 404) { | ||
cb(new Error('Package or version doesn\'t exist')); | ||
return; | ||
} | ||
if (err) { | ||
@@ -18,16 +23,4 @@ cb(err); | ||
got(url + encodeURIComponent(name) + '/' + version, function (err, data) { | ||
if (err === 404) { | ||
cb(new Error('Package or version doesn\'t exist')); | ||
return; | ||
} | ||
if (err) { | ||
cb(err); | ||
return; | ||
} | ||
cb(null, JSON.parse(data)); | ||
}); | ||
cb(null, JSON.parse(data)); | ||
}); | ||
}; |
{ | ||
"name": "package-json", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Get the package.json of a package from the npm registry", | ||
@@ -32,3 +32,3 @@ "license": "MIT", | ||
"got": "^1.0.1", | ||
"registry-url": "^1.0.0" | ||
"registry-url": "^2.0.0" | ||
}, | ||
@@ -35,0 +35,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1905
20
+ Addeddeep-extend@0.2.11(transitive)
+ Addedminimist@0.0.10(transitive)
+ Addedrc@0.5.5(transitive)
+ Addedregistry-url@2.1.0(transitive)
+ Addedstrip-json-comments@0.1.3(transitive)
- Removedabbrev@1.1.1(transitive)
- Removedconfig-chain@1.1.13(transitive)
- Removedinherits@2.0.4(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removednopt@3.0.6(transitive)
- Removednpmconf@2.1.3(transitive)
- Removedonce@1.3.3(transitive)
- Removedos-homedir@1.0.2(transitive)
- Removedos-tmpdir@1.0.2(transitive)
- Removedosenv@0.1.5(transitive)
- Removedproto-list@1.2.4(transitive)
- Removedregistry-url@1.0.0(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsemver@4.3.6(transitive)
- Removeduid-number@0.0.5(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedregistry-url@^2.0.0