Skip to content

Commit

Permalink
Remove usage of this.global (use this.config instead).
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Sep 8, 2020
1 parent f0a5e5e commit 9061802
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = class LernaChangelogGeneratorPlugin extends Plugin {

async _launchEditor(tmpFile) {
// do not launch the editor for dry runs
if (this.global.isDryRun) {
if (this.config.isDryRun) {
return;
}

Expand Down Expand Up @@ -155,7 +155,7 @@ module.exports = class LernaChangelogGeneratorPlugin extends Plugin {
}
}

if (this.global.isDryRun) {
if (this.config.isDryRun) {
this.log.log(`! Prepending ${infile} with release notes.`);
} else {
let currentFileData = hasInfile ? fs.readFileSync(infile, { encoding: 'utf8' }) : '';
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ test('does not launch the editor for dry-run', async (t) => {

let plugin = buildPlugin({ infile, launchEditor: `${editor} \${file}` });

plugin.global.isDryRun = true;
plugin.config.isDryRun = true;

await runTasks(plugin);

Expand Down

0 comments on commit 9061802

Please sign in to comment.