Skip to content

Commit

Permalink
Merge pull request #18 from rwjblue/dependabot/npm_and_yarn/prettier-…
Browse files Browse the repository at this point in the history
…2.0.2

Bump prettier from 1.19.1 to 2.0.2
  • Loading branch information
rwjblue authored Mar 27, 2020
2 parents ae871bd + 6d9b643 commit 40814ae
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 20 deletions.
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,7 @@ module.exports = class LernaChangelogGeneratorPlugin extends Plugin {
// remove first two lines to prevent release notes
// from including the version number/date (it looks odd
// in the Github/Gitlab UIs)
let changelogWithoutVersion = processedChangelog
.split(EOL)
.slice(2)
.join(EOL);
let changelogWithoutVersion = processedChangelog.split(EOL).slice(2).join(EOL);

this.config.setContext({ changelog: changelogWithoutVersion });

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.2",
"prettier": "^1.19.1",
"prettier": "^2.0.2",
"sinon": "^9.0.1"
},
"engines": {
Expand Down
22 changes: 11 additions & 11 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function buildPlugin(config = {}, _Plugin = TestPlugin) {
return plugin;
}

test('it invokes lerna-changelog', async t => {
test('it invokes lerna-changelog', async (t) => {
let plugin = buildPlugin();

await runTasks(plugin);
Expand All @@ -85,7 +85,7 @@ test('it invokes lerna-changelog', async t => {
]);
});

test('it honors custom git.tagName formatting', async t => {
test('it honors custom git.tagName formatting', async (t) => {
let plugin = buildPlugin();

plugin.config.setContext({ git: { tagName: 'v${version}' } });
Expand All @@ -98,7 +98,7 @@ test('it honors custom git.tagName formatting', async t => {
]);
});

test('it sets the changelog without version information onto the config', async t => {
test('it sets the changelog without version information onto the config', async (t) => {
let infile = tmp.fileSync().name;
let plugin = buildPlugin({ infile });

Expand All @@ -108,7 +108,7 @@ test('it sets the changelog without version information onto the config', async
t.is(changelog, 'The changelog');
});

test('it uses the first commit when no tags exist', async t => {
test('it uses the first commit when no tags exist', async (t) => {
let infile = tmp.fileSync().name;

let plugin = buildPlugin({ infile });
Expand All @@ -135,7 +135,7 @@ test('it uses the first commit when no tags exist', async t => {
t.is(changelog.trim(), '### v1.0.1\n\nThe changelog\n### v1.0.0\n\nThe old changelog');
});

test('it writes the changelog to the specified file when it did not exist', async t => {
test('it writes the changelog to the specified file when it did not exist', async (t) => {
let infile = tmp.fileSync().name;
fs.unlinkSync(infile);

Expand All @@ -161,7 +161,7 @@ test('it writes the changelog to the specified file when it did not exist', asyn
t.is(changelog.trim(), '### v1.0.1\n\nThe changelog\n### v1.0.0\n\nThe old changelog');
});

test('prepends the changelog to the existing file', async t => {
test('prepends the changelog to the existing file', async (t) => {
let infile = tmp.fileSync().name;
let plugin = buildPlugin({ infile });
plugin.config.setContext({ git: { tagName: 'v${version}' } });
Expand All @@ -174,7 +174,7 @@ test('prepends the changelog to the existing file', async t => {
t.is(changelog.toString().trim(), '### v1.0.1 (2020-03-18)\n\nThe changelog\n\nOld contents');
});

test('uses launchEditor command', async t => {
test('uses launchEditor command', async (t) => {
let infile = tmp.fileSync().name;

let { editor, output } = await buildEditorCommand();
Expand All @@ -186,7 +186,7 @@ test('uses launchEditor command', async t => {
t.is(fs.readFileSync(output, 'utf-8'), `args: ${plugin.launchedTmpFile}`);
});

test('does not launch the editor for dry-run', async t => {
test('does not launch the editor for dry-run', async (t) => {
let infile = tmp.fileSync().name;

let { editor, output } = await buildEditorCommand();
Expand All @@ -200,7 +200,7 @@ test('does not launch the editor for dry-run', async t => {
t.is(fs.readFileSync(output, 'utf-8'), ``);
});

test('detects default editor if launchEditor is `true`', async t => {
test('detects default editor if launchEditor is `true`', async (t) => {
let infile = tmp.fileSync().name;

let { editor, output } = await buildEditorCommand();
Expand All @@ -217,7 +217,7 @@ test('detects default editor if launchEditor is `true`', async t => {
}
});

test('throws if launchEditor is `true` and no $EDITOR present', async t => {
test('throws if launchEditor is `true` and no $EDITOR present', async (t) => {
let infile = tmp.fileSync().name;

let plugin = buildPlugin({ infile, launchEditor: true });
Expand All @@ -241,7 +241,7 @@ test('throws if launchEditor is `true` and no $EDITOR present', async t => {
}
});

test('launches configured editor, updates infile, and propogates changes to context', async t => {
test('launches configured editor, updates infile, and propogates changes to context', async (t) => {
let fakeEditorFile = tmp.fileSync().name;
// using a function here so it is easier to author (vs a giant string interpolation)
function fakeEditor() {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2754,10 +2754,10 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"

prettier@^1.19.1:
version "1.19.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
prettier@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.2.tgz#1ba8f3eb92231e769b7fcd7cb73ae1b6b74ade08"
integrity sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg==

pretty-ms@^6.0.0:
version "6.0.1"
Expand Down

0 comments on commit 40814ae

Please sign in to comment.