Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Composer/packages/extension/src/manager/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,15 @@ class ExtensionManager {
const extensionInstallPath = path.dirname(fullPath);
const packageJson = (await readJson(fullPath)) as PackageJSON;
const isEnabled = packageJson?.composer && packageJson.composer.enabled !== false;
const metadata = getExtensionMetadata(extensionInstallPath, packageJson);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this moved out of the if statement if the else if does not contain any reference to metadata?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I had a version where I was just disabling the extension but setting the other metadata fields. I felt like removing the extension is better but forgot to move this back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can just move it back on some other PR

if (packageJson && (isEnabled || packageJson.extendsComposer === true)) {
const metadata = getExtensionMetadata(extensionInstallPath, packageJson);
this.manifest.updateExtensionConfig(packageJson.name, {
...metadata,
builtIn: true,
});
} else if (this.manifest.getExtensionConfig(packageJson.name)) {
// remove the extension if it exists in the manifest
this.manifest.removeExtension(packageJson.name);
}
}
}
Expand Down