electron-info
Advanced tools
Comparing version 1.11.1 to 1.11.2
@@ -0,1 +1,7 @@ | ||
## [1.11.2](https://github.com/ffflorian/electron-info/compare/v1.11.1...v1.11.2) (2019-08-21) | ||
### Bug Fixes | ||
- Correctly parse all releases URLs ([#32](https://github.com/ffflorian/electron-info/issues/32)) ([e294a8f](https://github.com/ffflorian/electron-info/commit/e294a8f)) | ||
## [1.11.1](https://github.com/ffflorian/electron-info/compare/v1.11.0...v1.11.1) (2019-08-21) | ||
@@ -2,0 +8,0 @@ |
@@ -20,4 +20,4 @@ "use strict"; | ||
const table_1 = require("table"); | ||
const url = require("url"); | ||
const util_1 = require("util"); | ||
const parsePath = require('parse-path'); | ||
const { bold } = chalk_1.default; | ||
@@ -163,10 +163,11 @@ const { promises: fsAsync } = fs; | ||
this.logger.log('Parsing releases URL', { releasesUrl: this.options.releasesUrl }); | ||
const parsedUrl = url.parse(this.options.releasesUrl, false); | ||
const parsedUrl = parsePath(this.options.releasesUrl, false); | ||
if (!parsedUrl.href) { | ||
throw new Error('Invalid releases URL provided'); | ||
} | ||
if (!parsedUrl.href.startsWith('localhost') && !parsedUrl.protocol) { | ||
if (parsedUrl.protocol === 'file') { | ||
this.logger.log('Releases URL points to a local file:', { releasesUrl: this.options.releasesUrl }); | ||
return this.loadReleasesFile(path.resolve(this.options.releasesUrl)); | ||
} | ||
this.logger.log('Releases URL points to a URL:', { releasesUrl: this.options.releasesUrl }); | ||
const tempDirectory = yield this.createTempDir(); | ||
@@ -173,0 +174,0 @@ const tempFile = path.join(tempDirectory, 'latest.json'); |
@@ -12,2 +12,3 @@ { | ||
"moment": "2.24.0", | ||
"parse-path": "4.0.1", | ||
"semver": "6.3.0", | ||
@@ -94,3 +95,3 @@ "table": "5.4.6" | ||
}, | ||
"version": "1.11.1" | ||
"version": "1.11.2" | ||
} |
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
47975
402
8
+ Addedparse-path@4.0.1
+ Addedis-ssh@1.4.0(transitive)
+ Addedparse-path@4.0.1(transitive)
+ Addedprotocols@1.4.82.0.1(transitive)