fix(regression): auto-enable provider runtime loads

This commit is contained in:
Tak Hoffman
2026-03-27 22:53:26 -05:00
parent cc9b2df97c
commit 09e35e69b2
2 changed files with 49 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
import { applyPluginAutoEnable } from "../config/plugin-auto-enable.js";
import { createSubsystemLogger } from "../logging/subsystem.js";
import {
withBundledPluginAllowlistCompat,
@@ -27,10 +28,17 @@ export function resolvePluginProviders(params: {
pluginSdkResolution?: PluginLoadOptions["pluginSdkResolution"];
}): ProviderPlugin[] {
const env = params.env ?? process.env;
const autoEnabledConfig =
params.config !== undefined
? applyPluginAutoEnable({
config: params.config,
env,
}).config
: undefined;
const bundledProviderCompatPluginIds =
params.bundledProviderAllowlistCompat || params.bundledProviderVitestCompat
? resolveBundledProviderCompatPluginIds({
config: params.config,
config: autoEnabledConfig,
workspaceDir: params.workspaceDir,
env,
onlyPluginIds: params.onlyPluginIds,
@@ -38,10 +46,10 @@ export function resolvePluginProviders(params: {
: [];
const maybeAllowlistCompat = params.bundledProviderAllowlistCompat
? withBundledPluginAllowlistCompat({
config: params.config,
config: autoEnabledConfig,
pluginIds: bundledProviderCompatPluginIds,
})
: params.config;
: autoEnabledConfig;
const allowlistCompatConfig = params.bundledProviderAllowlistCompat
? withBundledPluginEnablementCompat({
config: maybeAllowlistCompat,