electron-info
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -0,1 +1,7 @@ | ||
# [1.6.0](https://github.com/ffflorian/electron-info/compare/v1.5.0...v1.6.0) (2019-07-25) | ||
### Features | ||
- Add option for Electron prereleases ([c52c645](https://github.com/ffflorian/electron-info/commit/c52c645)) | ||
# [1.5.0](https://github.com/ffflorian/electron-info/compare/v1.4.0...v1.5.0) (2019-07-25) | ||
@@ -2,0 +8,0 @@ |
@@ -24,2 +24,3 @@ #!/usr/bin/env node | ||
.option('--no-colors', `Don't use colors for displaying`) | ||
.option('--no-prereleases', `Don't include Electron prereleases`) | ||
.version(version, '-v, --version'); | ||
@@ -37,3 +38,3 @@ program | ||
try { | ||
const releases = yield new ElectronInfo_1.ElectronInfo().getElectronReleases(version, !parent.raw, !parent.disableColors); | ||
const releases = yield new ElectronInfo_1.ElectronInfo({ electronPrereleases: parent.prereleases }).getElectronReleases(version, !parent.raw, parent.colors); | ||
console.log(releases); | ||
@@ -57,3 +58,3 @@ } | ||
try { | ||
const releases = yield new ElectronInfo_1.ElectronInfo().getDependencyReleases(dependency, version, !parent.raw, !parent.disableColors); | ||
const releases = yield new ElectronInfo_1.ElectronInfo({ electronPrereleases: parent.prereleases }).getDependencyReleases(dependency, version, !parent.raw, parent.colors); | ||
console.log(releases); | ||
@@ -71,3 +72,3 @@ } | ||
try { | ||
const releases = yield new ElectronInfo_1.ElectronInfo().getAllReleases(!parent.raw, !parent.disableColors); | ||
const releases = yield new ElectronInfo_1.ElectronInfo({ electronPrereleases: parent.prereleases }).getAllReleases(!parent.raw, parent.colors); | ||
console.log(releases); | ||
@@ -74,0 +75,0 @@ } |
@@ -23,4 +23,9 @@ export interface RawDeps { | ||
interface Options { | ||
/** Default is `true`. */ | ||
electronPrereleases?: boolean; | ||
/** Default is `false`. */ | ||
forceUpdate?: boolean; | ||
/** Default is https://unpkg.com/electron-releases@latest/lite.json. */ | ||
releasesUrl?: string; | ||
/** Will be created if not defined. */ | ||
tempDirectory?: string; | ||
@@ -27,0 +32,0 @@ } |
@@ -25,2 +25,3 @@ "use strict"; | ||
const defaultOptions = { | ||
electronPrereleases: true, | ||
forceUpdate: false, | ||
@@ -141,3 +142,6 @@ releasesUrl: 'https://unpkg.com/electron-releases@latest/lite.json', | ||
let dependencyVersions = []; | ||
const releases = yield this.getAllReleases(); | ||
let releases = yield this.getAllReleases(); | ||
if (!this.options.electronPrereleases) { | ||
releases = releases.filter(release => semver.prerelease(release.version) === null); | ||
} | ||
if (key === 'electron') { | ||
@@ -159,5 +163,2 @@ dependencyVersions = releases.map(release => release.version); | ||
: dependencyVersions.filter(dependencyVersion => satisfiesArbitrary(dependencyVersion, inputVersion)); | ||
if (!parsedVersions) { | ||
throw new Error(`No version found for "${inputVersion}"`); | ||
} | ||
return parsedVersions; | ||
@@ -164,0 +165,0 @@ }); |
@@ -79,3 +79,3 @@ { | ||
}, | ||
"version": "1.5.0" | ||
"version": "1.6.0" | ||
} |
@@ -16,2 +16,3 @@ # electron-info [![Build Status](https://action-badges.now.sh/ffflorian/electron-info)](https://github.com/ffflorian/electron-info/actions/) [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=ffflorian/electron-info)](https://dependabot.com) | ||
--no-colors Don't use colors for displaying | ||
--no-prereleases Don't include Electron prereleases | ||
-v, --version output the version number | ||
@@ -18,0 +19,0 @@ -h, --help output usage information |
Sorry, the diff of this file is not supported yet
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
32275
305
101