From 67c180ca446c554bc89c4558c1883910d86d65c8 Mon Sep 17 00:00:00 2001 From: rostog Date: Mon, 26 Nov 2018 10:31:09 +0100 Subject: [PATCH 1/4] removed default value of prettierPath from argv --- packages/jest-cli/src/cli/args.js | 2 +- types/Argv.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/jest-cli/src/cli/args.js b/packages/jest-cli/src/cli/args.js index 99e92b21f959..7782f549e360 100644 --- a/packages/jest-cli/src/cli/args.js +++ b/packages/jest-cli/src/cli/args.js @@ -425,7 +425,7 @@ export const options = { type: 'string', }, prettierPath: { - default: 'prettier', + default: undefined, description: 'The path to the "prettier" module used for inline snapshots.', type: 'string', }, diff --git a/types/Argv.js b/types/Argv.js index 966c82327dbd..30a67a4fa44f 100644 --- a/types/Argv.js +++ b/types/Argv.js @@ -62,6 +62,7 @@ export type Argv = {| outputFile: string, preset: ?string, projects: Array, + prettierPath: ?string, replname: ?string, resetMocks: boolean, resetModules: boolean, From 1b31f7b606c21459ad303ab524a1672ed4d300b5 Mon Sep 17 00:00:00 2001 From: rostog Date: Mon, 26 Nov 2018 13:28:59 +0100 Subject: [PATCH 2/4] updated snapshot for show_config --- e2e/__tests__/__snapshots__/show_config.test.js.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/__tests__/__snapshots__/show_config.test.js.snap b/e2e/__tests__/__snapshots__/show_config.test.js.snap index 24f419707d6d..9e3a43419f56 100644 --- a/e2e/__tests__/__snapshots__/show_config.test.js.snap +++ b/e2e/__tests__/__snapshots__/show_config.test.js.snap @@ -36,7 +36,7 @@ exports[`--showConfig outputs config info and exits 1`] = ` \\"moduleNameMapper\\": {}, \\"modulePathIgnorePatterns\\": [], \\"name\\": \\"[md5 hash]\\", - \\"prettierPath\\": null, + \\"prettierPath\\": \\"prettier\\", \\"resetMocks\\": false, \\"resetModules\\": false, \\"resolver\\": null, From 964937fae772b1646c1bee43fabc888621064fb1 Mon Sep 17 00:00:00 2001 From: rostog Date: Mon, 26 Nov 2018 13:58:51 +0100 Subject: [PATCH 3/4] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ca0923a90c7..74b940e5bbdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,7 @@ - `[jest-haste-map]` [**BREAKING**] Recover files correctly after haste name collisions are fixed ([#7329](https://github.com/facebook/jest/pull/7329)) - `[jest-haste-map]` Remove legacy condition for duplicate module detection ([#7333](https://github.com/facebook/jest/pull/7333)) - `[jest-haste-map]` Fix `require` detection with trailing commas and ignore `import typeof` modules ([#7385](https://github.com/facebook/jest/pull/7385)) +- `[jest-config]` Fix to set prettierPath via config file ([#7412](https://github.com/facebook/jest/pull/7412)) ### Chore & Maintenance From 0e2e100503cbee8ef56d99047c086ee46db47428 Mon Sep 17 00:00:00 2001 From: rostog Date: Mon, 26 Nov 2018 15:29:27 +0100 Subject: [PATCH 4/4] fixed wrong package name in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74b940e5bbdb..c33a369dec79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,7 +75,7 @@ - `[jest-haste-map]` [**BREAKING**] Recover files correctly after haste name collisions are fixed ([#7329](https://github.com/facebook/jest/pull/7329)) - `[jest-haste-map]` Remove legacy condition for duplicate module detection ([#7333](https://github.com/facebook/jest/pull/7333)) - `[jest-haste-map]` Fix `require` detection with trailing commas and ignore `import typeof` modules ([#7385](https://github.com/facebook/jest/pull/7385)) -- `[jest-config]` Fix to set prettierPath via config file ([#7412](https://github.com/facebook/jest/pull/7412)) +- `[jest-cli]` Fix to set prettierPath via config file ([#7412](https://github.com/facebook/jest/pull/7412)) ### Chore & Maintenance