Gathering detailed insights and metrics for jest-transform-stealthy-require
Gathering detailed insights and metrics for jest-transform-stealthy-require
Gathering detailed insights and metrics for jest-transform-stealthy-require
Gathering detailed insights and metrics for jest-transform-stealthy-require
npm install jest-transform-stealthy-require
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (97.08%)
JavaScript (2.92%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
6 Stars
22 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Feb 22, 2022
Latest Version
1.0.0
Package Id
jest-transform-stealthy-require@1.0.0
Unpacked Size
21.95 kB
Size
4.74 kB
File Count
11
NPM Version
6.13.4
Node Version
10.19.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Transforms stealthy-require
calls into jest.isolateModules()
The purpose of this module is to address Jest + stealthy-require compatibility issue which causes issues like Unable to expose method "then" on modules that depend on stealthy-require.
1npm install --save-dev jest-transform-stealthy-require
jest.config.js
1const { requestPromise } = require('jest-transform-stealthy-require/dist/presets'); 2 3module.exports = { 4 // ... 5 transform: { 6 ...requestPromise.transform 7 }, 8 transformIgnorePatterns: [requestPromise.transformIgnorePattern] 9};
jest.config.js
1const { requestPromise } = require('jest-transform-stealthy-require/dist/presets'); 2 3module.exports = { 4 // ... 5 transform: { 6 ...requestPromise.transform, 7 "^.+\\.[t|j]sx?$": "babel-jest" 8 }, 9 transformIgnorePatterns: [requestPromise.transformIgnorePattern] 10}
jest.config.js
1const { requestPromise } = require('jest-transform-stealthy-require/dist/presets'); 2const { defaults: tsjPreset } = require('ts-jest/presets'); 3// [OR] const { jsWithTs: tsjPreset } = require('ts-jest/presets'); 4// [OR] const { jsWithBabel: tsjPreset } = require('ts-jest/presets'); 5 6module.exports = { 7 // ... 8 transform: { 9 ...requestPromise.transform, 10 ...tsjPreset.transform 11 }, 12 transformIgnorePatterns: [requestPromise.transformIgnorePattern] 13}
The transformer can be used to replace stealthy-require calls in arbitrary modules. Simply specify the file pattern to for the modules that you would like to transform in your Jest config:
jest.config.js
1 2module.exports = { 3 // ... 4 transform: { 5 'my_pattern_to_module_to_transform': 'jest-transform-stealthy-require' 6 } 7};
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/22 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no SAST tool detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More