babel-jest
Advanced tools
Comparing version 30.0.0-alpha.5 to 30.0.0-alpha.6
@@ -12,10 +12,14 @@ /** | ||
export declare const createTransformer: TransformerCreator< | ||
SyncTransformer<TransformOptions>, | ||
TransformOptions | ||
SyncTransformer<TransformerConfig>, | ||
TransformerConfig | ||
>; | ||
declare interface TransformerConfig extends TransformOptions { | ||
excludeJestPreset?: boolean; | ||
} | ||
declare const transformerFactory: { | ||
createTransformer: TransformerCreator< | ||
SyncTransformer<TransformOptions>, | ||
TransformOptions | ||
SyncTransformer<TransformerConfig>, | ||
TransformerConfig | ||
>; | ||
@@ -22,0 +26,0 @@ }; |
@@ -71,3 +71,3 @@ /*! | ||
var __webpack_exports__ = {}; | ||
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. | ||
// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). | ||
(() => { | ||
@@ -124,3 +124,3 @@ var exports = __webpack_exports__; | ||
var _loadBabelConfig = __webpack_require__("./src/loadBabelConfig.ts"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | ||
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } | ||
@@ -190,4 +190,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | ||
} | ||
const createTransformer = userOptions => { | ||
const inputOptions = userOptions ?? {}; | ||
const createTransformer = transformerConfig => { | ||
const { | ||
excludeJestPreset, | ||
...inputOptions | ||
} = transformerConfig ?? {}; | ||
const options = { | ||
@@ -205,3 +208,3 @@ ...inputOptions, | ||
plugins: inputOptions.plugins ?? [], | ||
presets: [...(inputOptions.presets ?? []), jestPresetPath], | ||
presets: [...(inputOptions.presets ?? []), ...(excludeJestPreset === true ? [] : [jestPresetPath])], | ||
sourceMaps: 'both' | ||
@@ -208,0 +211,0 @@ }; |
{ | ||
"name": "babel-jest", | ||
"description": "Jest plugin to use babel for transformation.", | ||
"version": "30.0.0-alpha.5", | ||
"version": "30.0.0-alpha.6", | ||
"repository": { | ||
@@ -23,6 +23,6 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/transform": "30.0.0-alpha.5", | ||
"@jest/transform": "30.0.0-alpha.6", | ||
"@types/babel__core": "^7.1.14", | ||
"babel-plugin-istanbul": "^6.1.1", | ||
"babel-preset-jest": "30.0.0-alpha.5", | ||
"babel-plugin-istanbul": "^7.0.0", | ||
"babel-preset-jest": "30.0.0-alpha.6", | ||
"chalk": "^4.0.0", | ||
@@ -34,3 +34,3 @@ "graceful-fs": "^4.2.9", | ||
"@babel/core": "^7.11.6", | ||
"@jest/test-utils": "30.0.0-alpha.5", | ||
"@jest/test-utils": "30.0.0-alpha.6", | ||
"@types/graceful-fs": "^4.1.3" | ||
@@ -47,3 +47,3 @@ }, | ||
}, | ||
"gitHead": "fa24a3bdd6682978d76799265016fb9d5bff135e" | ||
"gitHead": "ba74b7de1b9cca88daf33f9d1b46bfe2b7f485a5" | ||
} |
@@ -36,1 +36,9 @@ # babel-jest | ||
``` | ||
By default, `babel-jest` includes `babel-preset-jest`. In addition to the babel options, we introduce a new option, `excludeJestPreset`, which allows you to disable this behavior. Note that this will break `jest.mock` hoisting. | ||
```json | ||
"transform": { | ||
"\\.[jt]sx?$": ["babel-jest", { "excludeJestPreset": true }], | ||
} | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15251
307
44
+ Added@jest/pattern@30.0.0-alpha.6(transitive)
+ Added@jest/schemas@30.0.0-alpha.6(transitive)
+ Added@jest/transform@30.0.0-alpha.6(transitive)
+ Added@jest/types@30.0.0-alpha.6(transitive)
+ Added@sinclair/typebox@0.33.10(transitive)
+ Added@ungap/structured-clone@1.2.0(transitive)
+ Addedbabel-plugin-istanbul@7.0.0(transitive)
+ Addedbabel-plugin-jest-hoist@30.0.0-alpha.6(transitive)
+ Addedbabel-preset-jest@30.0.0-alpha.6(transitive)
+ Addedistanbul-lib-instrument@6.0.3(transitive)
+ Addedjest-haste-map@30.0.0-alpha.6(transitive)
+ Addedjest-regex-util@30.0.0-alpha.6(transitive)
+ Addedjest-util@30.0.0-alpha.6(transitive)
+ Addedjest-worker@30.0.0-alpha.6(transitive)
+ Addedsemver@7.6.3(transitive)
- Removed@jest/pattern@30.0.0-alpha.5(transitive)
- Removed@jest/schemas@30.0.0-alpha.5(transitive)
- Removed@jest/transform@30.0.0-alpha.5(transitive)
- Removed@jest/types@30.0.0-alpha.5(transitive)
- Removed@sinclair/typebox@0.32.35(transitive)
- Removedbabel-plugin-istanbul@6.1.1(transitive)
- Removedbabel-plugin-jest-hoist@30.0.0-alpha.5(transitive)
- Removedbabel-preset-jest@30.0.0-alpha.5(transitive)
- Removedistanbul-lib-instrument@5.2.1(transitive)
- Removedjest-haste-map@30.0.0-alpha.5(transitive)
- Removedjest-regex-util@30.0.0-alpha.5(transitive)
- Removedjest-util@30.0.0-alpha.5(transitive)
- Removedjest-worker@30.0.0-alpha.5(transitive)
Updatedbabel-plugin-istanbul@^7.0.0