ci-npm-update
Advanced tools
Comparing version 0.6.0 to 0.7.0
export declare class NpmConfig { | ||
static getFromRegistry(name: string, versionSpec: string): Promise<NpmConfig>; | ||
static getFromRegistry(name: string, version: string): Promise<NpmConfig>; | ||
name: string; | ||
@@ -4,0 +4,0 @@ version: string; |
@@ -17,8 +17,12 @@ "use strict"; | ||
} | ||
static getFromRegistry(name, versionSpec) { | ||
return new Promise((resolve, reject) => { | ||
const url = `${REGISTRY_ENDPOINT}/${name}/${versionSpec}`; | ||
static getFromRegistry(name, version) { | ||
return new Promise((resolve, _reject) => { | ||
const url = `${REGISTRY_ENDPOINT}/x/${name}/${version}`; | ||
request(url, (err, res, body) => { | ||
if (err) { | ||
reject(err); | ||
resolve(new NpmConfig({ | ||
name: name, | ||
version: version, | ||
error: err, | ||
})); | ||
return; | ||
@@ -32,3 +36,7 @@ } | ||
const error = `Failed to get npm config from ${url}: ${res.statusCode} ${res.statusMessage}`; | ||
reject(new Error(error)); | ||
resolve(new NpmConfig({ | ||
name: name, | ||
version: version, | ||
error: error, | ||
})); | ||
return; | ||
@@ -38,3 +46,7 @@ } | ||
const error = `Failed to get npm config from ${url}: ${json.error}`; | ||
reject(new Error(error)); | ||
resolve(new NpmConfig({ | ||
name: name, | ||
version: version, | ||
error: error, | ||
})); | ||
return; | ||
@@ -41,0 +53,0 @@ } |
{ | ||
"name": "ci-npm-update", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Keep NPM dependencies up-to-date with CI, providing version-to-version diff for each library", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
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
137646
1639