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
44.6
Supply Chain
53.6
Quality
70.4
Maintenance
100
Vulnerability
97.3
License
TypeScript (97.08%)
JavaScript (2.92%)
Total Downloads
232,549
Last Day
124
Last Week
391
Last Month
1,590
Last Year
27,635
6 Stars
22 Commits
2 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
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
134%
124
Compared to previous day
Last week
-5.6%
391
Compared to previous week
Last month
12.4%
1,590
Compared to previous month
Last year
-45.5%
27,635
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 dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
Found 0/22 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
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-01-27
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