diff --git a/src/extensions/__tests__/extension-discovery.test.ts b/src/extensions/__tests__/extension-discovery.test.ts index b6b8d184e0..0e72cf16fb 100644 --- a/src/extensions/__tests__/extension-discovery.test.ts +++ b/src/extensions/__tests__/extension-discovery.test.ts @@ -1,5 +1,5 @@ import { watch } from "chokidar"; -import { join } from "path"; +import { join, normalize } from "path"; import { ExtensionDiscovery, InstalledExtension } from "../extension-discovery"; jest.mock("../../common/ipc"); @@ -46,13 +46,13 @@ describe("ExtensionDiscovery", () => { extensionDiscovery.events.on("add", (extension: InstalledExtension) => { expect(extension).toEqual({ absolutePath: expect.any(String), - id: "node_modules/my-extension/package.json", + id: normalize("node_modules/my-extension/package.json"), isBundled: false, isEnabled: false, manifest: { name: "my-extension", }, - manifestPath: "node_modules/my-extension/package.json", + manifestPath: normalize("node_modules/my-extension/package.json"), }); done(); }); diff --git a/src/extensions/extension-discovery.ts b/src/extensions/extension-discovery.ts index 52a4f73d05..d0bfbc4c16 100644 --- a/src/extensions/extension-discovery.ts +++ b/src/extensions/extension-discovery.ts @@ -156,7 +156,6 @@ export class ExtensionDiscovery { } handleWatchFileAdd = async (filePath: string) => { - logger.info(`${logModule} handleWatchFileAdd ${filePath}`); // e.g. "foo/package.json" const relativePath = path.relative(this.localFolderPath, filePath); @@ -165,8 +164,6 @@ export class ExtensionDiscovery { // This safeguards against a file watch being triggered under a sub-directory which is not an extension. const isUnderLocalFolderPath = relativePath.split(path.sep).length === 2; - logger.info(`${logModule} relativePath ${relativePath} isUnderLocalFolderPath ${isUnderLocalFolderPath}`); - if (path.basename(filePath) === manifestFilename && isUnderLocalFolderPath) { try { const absPath = path.dirname(filePath);