diff --git a/scripts/bundleTs.mjs b/scripts/bundleTs.mjs
index 7d87a062e8cd..4961d41ad2c6 100644
--- a/scripts/bundleTs.mjs
+++ b/scripts/bundleTs.mjs
@@ -36,23 +36,20 @@ const copyrightSnippet = `
*/
`.trim();
+const typesNodeReferenceDirective = '/// ';
+
+const excludedPackages = new Set(['@jest/globals']);
+
(async () => {
const packages = getPackages();
const isTsPackage = p =>
fs.existsSync(path.resolve(p.packageDir, 'tsconfig.json'));
- const hasMoreThanOneDefinitionFile = p =>
- fs
- .readdirSync(path.resolve(p.packageDir, 'build'))
- .filter(f => f.endsWith('.d.ts')).length > 1;
-
const packagesToBundle = packages.filter(
- p => isTsPackage(p) && hasMoreThanOneDefinitionFile(p),
+ p => isTsPackage(p) && !excludedPackages.has(p.pkg.name),
);
- const typesNodeReferenceDirective = '/// ';
-
console.log(chalk.inverse(' Extracting TypeScript definition files '));
const sharedExtractorConfig = {