From ff8fdb4b8471c2dd856f5e712e24a2a5b365bb46 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2020 18:12:37 +0000 Subject: [PATCH] chore(package): update prettier to version 2.0.5 Closes #91 --- package.json | 2 +- src/app/generators/project/index.js | 2 +- src/app/index.test.js | 2 +- src/app/lib/__mocks__/github.js | 6 +++--- src/app/lib/commander.test.js | 2 +- src/app/prompter.js | 2 +- yarn.lock | 8 ++++---- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index ecc8dcd..cf77c5f 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "eslint-plugin-promise": "^4.0.1", "eslint-plugin-standard": "^4.0.0", "jest": "^24.1.0", - "prettier": "^1.15.3", + "prettier": "^2.0.5", "rimraf": "^3.0.0", "semantic-release": "^17.0.2", "watch": "^1.0.2", diff --git a/src/app/generators/project/index.js b/src/app/generators/project/index.js index 8fb7b70..b14ed77 100644 --- a/src/app/generators/project/index.js +++ b/src/app/generators/project/index.js @@ -21,7 +21,7 @@ export default class extends BaseGenerator { configuring() { if (path.basename(this.destinationRoot()) !== this.options.projectName) { - return makeDir(this.options.projectName).then(path => { + return makeDir(this.options.projectName).then((path) => { this.destinationRoot(path); this.log(chalk`\nGenerating a new project in {green ${path}}\n`); }); diff --git a/src/app/index.test.js b/src/app/index.test.js index 359bdcb..91be810 100644 --- a/src/app/index.test.js +++ b/src/app/index.test.js @@ -132,7 +132,7 @@ test('default files with --noDefaults', async () => { test('remove .yo-rc.json if exists', async () => { await runAppGenerator() .withPrompts(requiredPrompts) - .inTmpDir(function(dir) { + .inTmpDir(function (dir) { // `dir` is the path to the new temporary directory fs.writeFileSync(path.join(dir, '.yo-rc.json'), '{}'); }); diff --git a/src/app/lib/__mocks__/github.js b/src/app/lib/__mocks__/github.js index 67e5e23..6d1a78a 100644 --- a/src/app/lib/__mocks__/github.js +++ b/src/app/lib/__mocks__/github.js @@ -1,4 +1,4 @@ -const Github = jest.fn(function({ on2Fa }) { +const Github = jest.fn(function ({ on2Fa }) { this._on2Fa = () => { if (Github.use2fa && !this._on2FaCalled) { this._on2FaCalled = true; @@ -9,7 +9,7 @@ const Github = jest.fn(function({ on2Fa }) { Github.use2fa = false; -Github.prototype.createRepository = jest.fn(async function() { +Github.prototype.createRepository = jest.fn(async function () { await this._on2Fa(); return { @@ -17,7 +17,7 @@ Github.prototype.createRepository = jest.fn(async function() { }; }); -Github.prototype.authenticate = jest.fn(async function() { +Github.prototype.authenticate = jest.fn(async function () { await this._on2Fa(); return 'some-token'; diff --git a/src/app/lib/commander.test.js b/src/app/lib/commander.test.js index f32e6f4..b72f2c7 100644 --- a/src/app/lib/commander.test.js +++ b/src/app/lib/commander.test.js @@ -50,7 +50,7 @@ describe('Commander', () => { commander._parseCommand = jest .fn() - .mockImplementation(command => ({ main, args })); + .mockImplementation((command) => ({ main, args })); commander._logCommand = jest.fn(); commander._runCommand(command); diff --git a/src/app/prompter.js b/src/app/prompter.js index c73cd66..c258892 100644 --- a/src/app/prompter.js +++ b/src/app/prompter.js @@ -337,7 +337,7 @@ export default class Prompter { }; if (prompt.required) { - result.validate = input => { + result.validate = (input) => { if ( input === undefined || (typeof input === 'string' && diff --git a/yarn.lock b/yarn.lock index 2a71869..5e202fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8041,10 +8041,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^1.15.3: - 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.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" + integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== pretty-bytes@^5.2.0: version "5.3.0"