babel-jest
Advanced tools
Comparing version 27.5.1 to 28.1.3
@@ -7,5 +7,19 @@ /** | ||
*/ | ||
import { TransformOptions } from '@babel/core'; | ||
import type { SyncTransformer } from '@jest/transform'; | ||
declare const transformer: SyncTransformer<TransformOptions>; | ||
export default transformer; | ||
import type {SyncTransformer} from '@jest/transform'; | ||
import type {TransformerCreator} from '@jest/transform'; | ||
import {TransformOptions} from '@babel/core'; | ||
export declare const createTransformer: TransformerCreator< | ||
SyncTransformer<TransformOptions>, | ||
TransformOptions | ||
>; | ||
declare const transformerFactory: { | ||
createTransformer: TransformerCreator< | ||
SyncTransformer<TransformOptions>, | ||
TransformOptions | ||
>; | ||
}; | ||
export default transformerFactory; | ||
export {}; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.default = void 0; | ||
exports.default = exports.createTransformer = void 0; | ||
@@ -170,3 +170,3 @@ function _crypto() { | ||
const configPath = [babelOptions.config || '', babelOptions.babelrc || '']; | ||
return (0, _crypto().createHash)('md5') | ||
return (0, _crypto().createHash)('sha256') | ||
.update(THIS_FILE) | ||
@@ -191,3 +191,4 @@ .update('\0', 'utf8') | ||
.update(process.version) | ||
.digest('hex'); | ||
.digest('hex') | ||
.substring(0, 32); | ||
} | ||
@@ -264,6 +265,7 @@ | ||
const {cwd} = transformOptions.config; // `cwd` first to allow incoming options to override it | ||
const {cwd, rootDir} = transformOptions.config; // `cwd` and `root` first to allow incoming options to override it | ||
return { | ||
cwd, | ||
root: rootDir, | ||
...options, | ||
@@ -352,3 +354,5 @@ caller: { | ||
return sourceText; | ||
return { | ||
code: sourceText | ||
}; | ||
}, | ||
@@ -379,3 +383,5 @@ | ||
return sourceText; | ||
return { | ||
code: sourceText | ||
}; | ||
} | ||
@@ -385,9 +391,9 @@ }; | ||
const transformer = { | ||
...createTransformer(), | ||
// Assigned here so only the exported transformer has `createTransformer`, | ||
// instead of all created transformers by the function | ||
exports.createTransformer = createTransformer; | ||
const transformerFactory = { | ||
// Assigned here, instead of as a separate export, due to limitations in Jest's | ||
// requireOrImportModule, requiring all exports to be on the `default` export | ||
createTransformer | ||
}; | ||
var _default = transformer; | ||
var _default = transformerFactory; | ||
exports.default = _default; |
{ | ||
"name": "babel-jest", | ||
"description": "Jest plugin to use babel for transformation.", | ||
"version": "27.5.1", | ||
"version": "28.1.3", | ||
"repository": { | ||
@@ -21,7 +21,6 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/transform": "^27.5.1", | ||
"@jest/types": "^27.5.1", | ||
"@jest/transform": "^28.1.3", | ||
"@types/babel__core": "^7.1.14", | ||
"babel-plugin-istanbul": "^6.1.1", | ||
"babel-preset-jest": "^27.5.1", | ||
"babel-preset-jest": "^28.1.3", | ||
"chalk": "^4.0.0", | ||
@@ -32,4 +31,4 @@ "graceful-fs": "^4.2.9", | ||
"devDependencies": { | ||
"@babel/core": "^7.8.0", | ||
"@jest/test-utils": "^27.5.1", | ||
"@babel/core": "^7.11.6", | ||
"@jest/test-utils": "^28.1.3", | ||
"@types/graceful-fs": "^4.1.3" | ||
@@ -41,3 +40,3 @@ }, | ||
"engines": { | ||
"node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" | ||
"node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" | ||
}, | ||
@@ -47,3 +46,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "67c1aa20c5fec31366d733e901fee2b981cb1850" | ||
"gitHead": "2cce069800dab3fc8ca7c469b32d2e2b2f7e2bb1" | ||
} |
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
14540
8
384
6
+ Added@jest/schemas@28.1.3(transitive)
+ Added@jest/transform@28.1.3(transitive)
+ Added@jest/types@28.1.3(transitive)
+ Added@sinclair/typebox@0.24.51(transitive)
+ Added@types/yargs@17.0.33(transitive)
+ Addedbabel-plugin-jest-hoist@28.1.3(transitive)
+ Addedbabel-preset-jest@28.1.3(transitive)
+ Addedjest-haste-map@28.1.3(transitive)
+ Addedjest-regex-util@28.0.2(transitive)
+ Addedjest-util@28.1.3(transitive)
+ Addedjest-worker@28.1.3(transitive)
+ Addedwrite-file-atomic@4.0.2(transitive)
- Removed@jest/types@^27.5.1
- Removed@jest/transform@27.5.1(transitive)
- Removed@jest/types@27.5.1(transitive)
- Removed@types/yargs@16.0.9(transitive)
- Removedbabel-plugin-jest-hoist@27.5.1(transitive)
- Removedbabel-preset-jest@27.5.1(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedjest-haste-map@27.5.1(transitive)
- Removedjest-regex-util@27.5.1(transitive)
- Removedjest-serializer@27.5.1(transitive)
- Removedjest-util@27.5.1(transitive)
- Removedjest-worker@27.5.1(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedtypedarray-to-buffer@3.1.5(transitive)
- Removedwrite-file-atomic@3.0.3(transitive)
Updated@jest/transform@^28.1.3
Updatedbabel-preset-jest@^28.1.3