refactor(plugins): decouple bundled plugin runtime loading

This commit is contained in:
Peter Steinberger
2026-03-29 09:08:06 +01:00
parent 1738d540f4
commit 8e0ab35b0e
582 changed files with 8057 additions and 22869 deletions

View File

@@ -1,5 +1,6 @@
import path from "node:path";
import { isUnitConfigTestFile } from "../../vitest.unit-paths.mjs";
import { BUNDLED_PLUGIN_PATH_PREFIX } from "../lib/bundled-plugin-paths.mjs";
import {
loadChannelTimingManifest,
loadExtensionTimingManifest,
@@ -464,7 +465,9 @@ const buildDefaultUnits = (context, request) => {
(file) => !new Set(unitFastExcludedFiles).has(file),
);
const extensionSharedCandidateFiles = catalog.allKnownTestFiles.filter(
(file) => file.startsWith("extensions/") && !catalog.extensionForkIsolatedFileSet.has(file),
(file) =>
file.startsWith(BUNDLED_PLUGIN_PATH_PREFIX) &&
!catalog.extensionForkIsolatedFileSet.has(file),
);
const channelSharedCandidateFiles = catalog.allKnownTestFiles.filter(
(file) =>
@@ -1091,7 +1094,7 @@ const estimateTopLevelEntryDurationMs = (unit, context) => {
if (context.catalog.channelTestPrefixes.some((prefix) => file.startsWith(prefix))) {
return totalMs + 3_000;
}
if (file.startsWith("extensions/")) {
if (file.startsWith(BUNDLED_PLUGIN_PATH_PREFIX)) {
return totalMs + 2_000;
}
return totalMs + 1_000;