refactor(plugins): drop generic status report alias (#59700)

This commit is contained in:
Vincent Koc
2026-04-02 22:59:25 +09:00
committed by GitHub
parent b0f94a227b
commit bb3f17fc02
7 changed files with 15 additions and 20 deletions

View File

@@ -143,6 +143,8 @@ describe("plugin-sdk facade runtime", () => {
}),
).toThrow("plugin load failure");
expect(listImportedBundledPluginFacadeIds()).toEqual(["bad"]);
// A second call must also throw (not return a stale empty sentinel).
expect(() =>
loadBundledPluginPublicSurfaceModuleSync<{ marker: string }>({

View File

@@ -337,9 +337,11 @@ export function loadBundledPluginPublicSurfaceModuleSync<T extends object>(param
let loaded: T;
try {
// Track the owning plugin once module evaluation begins. Facade top-level
// code may have already executed even if the module later throws.
loadedFacadePluginIds.add(resolveTrackedFacadePluginId(params.dirName));
loaded = getJiti(location.modulePath)(location.modulePath) as T;
Object.assign(sentinel, loaded);
loadedFacadePluginIds.add(resolveTrackedFacadePluginId(params.dirName));
} catch (err) {
loadedFacadeModules.delete(location.modulePath);
throw err;