From ee0f92eafd40868deef0b79ef0dfc9c96237757d Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Mon, 16 Jul 2018 08:51:26 +0100 Subject: [PATCH] Include createTransformer options in babel-jest's getCacheKey() (#6699) Fixes #6698. --- CHANGELOG.md | 6 +++++- packages/babel-jest/src/index.js | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e732d6f25197..2d46d0420fdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,16 @@ ## master +### Fixes + +- `[babel-jest]` Make `getCacheKey()` take into account `createTransformer` options ([#6699](https://github.com/facebook/jest/pull/6699)) + ## 23.4.1 ### Features - `[jest-cli]` Watch plugins now have access to a broader range of global configuration options in their `updateConfigAndRun` callbacks, so they can provide a wider set of extra features ([#6473](https://github.com/facebook/jest/pull/6473)) -## Fixes +### Fixes - `[jest-haste-map]` Optimize watchman crawler by using `glob` on initial query ([#6689](https://github.com/facebook/jest/pull/6689)) diff --git a/packages/babel-jest/src/index.js b/packages/babel-jest/src/index.js index 46333a98b9ef..fb0ac333249e 100644 --- a/packages/babel-jest/src/index.js +++ b/packages/babel-jest/src/index.js @@ -92,6 +92,8 @@ const createTransformer = (options: any): Transformer => { .createHash('md5') .update(THIS_FILE) .update('\0', 'utf8') + .update(JSON.stringify(options)) + .update('\0', 'utf8') .update(fileData) .update('\0', 'utf8') .update(path.relative(rootDir, filename))