diff --git a/package-lock.json b/package-lock.json index ab8c6f1966..df589246b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -524,6 +524,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-proposal-explicit-resource-management": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-explicit-resource-management/-/plugin-proposal-explicit-resource-management-7.24.7.tgz", + "integrity": "sha512-sYvUjHrKctxFiNe/YFyzNyXoblzP4YaZrWSk0js7QU3Lw2lYjLAxnzV8l/4+7PB5+NDFKGblPUq2YbdTxs3Ppg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-explicit-resource-management": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", @@ -574,6 +589,20 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-explicit-resource-management": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-explicit-resource-management/-/plugin-syntax-explicit-resource-management-7.24.7.tgz", + "integrity": "sha512-gEl7s4tkyWl3EcfUCLVcJJRSogDQju6qX2hdJmZVO0wdpVGzss5bJU8wySoZ7JQw1jBjztEY1a/eYstgv+AQkA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", @@ -23833,6 +23862,7 @@ "@babel/generator": "~7.25.0", "@babel/parser": "~7.25.0", "@babel/plugin-proposal-decorators": "~7.24.7", + "@babel/plugin-proposal-explicit-resource-management": "^7.24.7", "@babel/preset-typescript": "~7.24.7", "@stryker-mutator/api": "8.3.0", "@stryker-mutator/util": "8.3.0", diff --git a/packages/instrumenter/package.json b/packages/instrumenter/package.json index bd3e3225c6..67a48ea639 100644 --- a/packages/instrumenter/package.json +++ b/packages/instrumenter/package.json @@ -45,6 +45,7 @@ "@babel/generator": "~7.25.0", "@babel/parser": "~7.25.0", "@babel/plugin-proposal-decorators": "~7.24.7", + "@babel/plugin-proposal-explicit-resource-management": "^7.24.7", "@babel/preset-typescript": "~7.24.7", "@stryker-mutator/api": "8.3.0", "@stryker-mutator/util": "8.3.0", diff --git a/packages/instrumenter/src/parsers/ts-parser.ts b/packages/instrumenter/src/parsers/ts-parser.ts index c0ac594d12..7a5c20badf 100644 --- a/packages/instrumenter/src/parsers/ts-parser.ts +++ b/packages/instrumenter/src/parsers/ts-parser.ts @@ -38,7 +38,10 @@ async function parse(text: string, fileName: string, isTSX: boolean): Promise