diff --git a/packages/api/core/src/util/electron-version.ts b/packages/api/core/src/util/electron-version.ts index bca17ab889..aa7ef5ad9c 100644 --- a/packages/api/core/src/util/electron-version.ts +++ b/packages/api/core/src/util/electron-version.ts @@ -12,7 +12,7 @@ function findElectronDep(dep: string): boolean { return electronPackageNames.includes(dep); } -export function getElectronVersion (packageJSON: any) { +export function getElectronVersion(packageJSON: any) { if (!packageJSON.devDependencies) { throw new Error('package.json for app does not have any devDependencies'.red); } @@ -21,7 +21,7 @@ export function getElectronVersion (packageJSON: any) { throw new Error('Could not find any Electron packages in devDependencies'); } return packageJSON.devDependencies[packageName]; -}; +} export function updateElectronDependency(packageJSON: any, dev: string[], exact: string[]): [string[], string[]] { if (Object.keys(packageJSON.devDependencies).find(findElectronDep)) { diff --git a/packages/api/core/test/fast/electron-version_spec.ts b/packages/api/core/test/fast/electron-version_spec.ts index c49eec4282..839bd4af91 100644 --- a/packages/api/core/test/fast/electron-version_spec.ts +++ b/packages/api/core/test/fast/electron-version_spec.ts @@ -20,7 +20,7 @@ describe.only('updateElectronDependency', () => { }); it('moves an Electron dependency from dependencies to devDependencies', () => { const packageJSON = { - dependencies: { electron: '0.37.0'}, + dependencies: { electron: '0.37.0' }, devDependencies: { }, }; const [dev, exact] = updateElectronDependency(packageJSON, devDeps, exactDevDeps); @@ -54,7 +54,7 @@ describe('getElectronVersion', () => { it('works with electron', () => { const packageJSON = { - devDependencies: { 'electron': '1.0.0' }, + devDependencies: { electron: '1.0.0' }, }; expect(getElectronVersion(packageJSON)).to.be.equal('1.0.0'); });