Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: call destroy on v8-to-istanbul converters to free memory #11896

Merged
merged 3 commits into from Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,8 @@

### Fixes

- `[jest-reporters]` Call `destroy` on `v8-to-istanbul` converters to free memory ([#11896](https://github.com/facebook/jest/pull/11896))

### Chore & Maintenance

### Performance
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-reporters/package.json
Expand Up @@ -32,7 +32,7 @@
"source-map": "^0.6.0",
"string-length": "^4.0.1",
"terminal-link": "^2.0.0",
"v8-to-istanbul": "^8.0.0"
"v8-to-istanbul": "^8.1.0"
},
"devDependencies": {
"@jest/test-utils": "^27.2.2",
Expand Down
6 changes: 5 additions & 1 deletion packages/jest-reporters/src/CoverageReporter.ts
Expand Up @@ -471,7 +471,11 @@ export default class CoverageReporter extends BaseReporter {

converter.applyCoverage(res.functions);

return converter.toIstanbul();
const istanbulData = converter.toIstanbul();

converter.destroy();

return istanbulData;
}),
);

Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Expand Up @@ -2676,7 +2676,7 @@ __metadata:
string-length: ^4.0.1
strip-ansi: ^6.0.0
terminal-link: ^2.0.0
v8-to-istanbul: ^8.0.0
v8-to-istanbul: ^8.1.0
peerDependencies:
node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0
peerDependenciesMeta:
Expand Down Expand Up @@ -21815,14 +21815,14 @@ react-native@0.64.0:
languageName: node
linkType: hard

"v8-to-istanbul@npm:^8.0.0":
version: 8.0.0
resolution: "v8-to-istanbul@npm:8.0.0"
"v8-to-istanbul@npm:^8.1.0":
version: 8.1.0
resolution: "v8-to-istanbul@npm:8.1.0"
dependencies:
"@types/istanbul-lib-coverage": ^2.0.1
convert-source-map: ^1.6.0
source-map: ^0.7.3
checksum: ada29177f2944438eecb6a2fafb2144553c9dc9e623a253083149f4bbb193d862f93bda3cfde93178f3ca799df67da8f0b87222bde8d415a06550476893de0fc
checksum: a43c4feab9014ed55a0ba62513a96f4a68a156ddccede380934f934bc7c63a992e506033ef133a06013540cc7fcbbce1ec8c2b0352c376033854a94b93cbde44
languageName: node
linkType: hard

Expand Down