Skip to content

Commit

Permalink
chore(tools): update dependency version for electron-forge modules to…
Browse files Browse the repository at this point in the history
… be latest on bump
  • Loading branch information
MarshallOfSound committed Apr 16, 2018
1 parent c5b6c6a commit 1029d32
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/bump.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const semver = require('semver');

const BASE_DIR = path.resolve(__dirname, '..');
const PACKAGES_DIR = path.resolve(BASE_DIR, 'packages');
const ELECTRON_FORGE_PREFIX = '@electron-forge/';

(async () => {
// Check clean working dir
Expand Down Expand Up @@ -38,6 +39,13 @@ const PACKAGES_DIR = path.resolve(BASE_DIR, 'packages');
const pjPath = path.resolve(dir, 'package.json');
const existingPJ = await fs.readJson(pjPath);
existingPJ.version = version;
for (const type of ['dependencies', 'devDependencies', 'optionalDependencies']) {
for (const depKey in existingPJ[type]) {
if (depKey.startsWith(ELECTRON_FORGE_PREFIX)) {
existingPJ[type][depKey] = version;
}
}
}
await fs.writeJson(pjPath, existingPJ, {
spaces: 2,
});
Expand Down

0 comments on commit 1029d32

Please sign in to comment.