From 6f079893a13438ded1168094bad25a579b4310a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isaac=20Rold=C3=A1n?= Date: Mon, 25 Nov 2024 17:57:11 +0100 Subject: [PATCH] Update tests --- packages/app/src/cli/services/dev/update-extension.test.ts | 6 ++++-- packages/app/src/cli/services/dev/update-extension.ts | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/app/src/cli/services/dev/update-extension.test.ts b/packages/app/src/cli/services/dev/update-extension.test.ts index 8bc3971ebbf..567530801b0 100644 --- a/packages/app/src/cli/services/dev/update-extension.test.ts +++ b/packages/app/src/cli/services/dev/update-extension.test.ts @@ -13,7 +13,7 @@ import {ExtensionUpdateDraftMutationVariables} from '../../api/graphql/partners/ import {inTemporaryDirectory, mkdir, writeFile} from '@shopify/cli-kit/node/fs' import {outputInfo} from '@shopify/cli-kit/node/output' import {describe, expect, vi, test} from 'vitest' -import {joinPath} from '@shopify/cli-kit/node/path' +import {dirname, joinPath} from '@shopify/cli-kit/node/path' import {platformAndArch} from '@shopify/cli-kit/node/os' import {randomUUID} from '@shopify/cli-kit/node/crypto' @@ -206,7 +206,9 @@ describe('updateExtensionDraft()', () => { const content = 'test content' const base64Content = Buffer.from(content).toString('base64') await mkdir(joinPath(mockExtension.directory, 'dist')) - await writeFile(joinPath(mockExtension.directory, 'dist', filepath), content) + const outputPath = mockExtension.getOutputPathForDirectory(tmpDir) + await mkdir(dirname(outputPath)) + await writeFile(outputPath, content) await updateExtensionDraft({ extension: mockExtension, diff --git a/packages/app/src/cli/services/dev/update-extension.ts b/packages/app/src/cli/services/dev/update-extension.ts index 7a799bfe2e5..e20d1893120 100644 --- a/packages/app/src/cli/services/dev/update-extension.ts +++ b/packages/app/src/cli/services/dev/update-extension.ts @@ -39,9 +39,7 @@ export async function updateExtensionDraft({ }: UpdateExtensionDraftOptions) { let encodedFile: string | undefined const outputPath = extension.getOutputPathForDirectory(bundlePath) - if (extension.features.includes('esbuild')) { - const outputPath = extension.getOutputPathForDirectory(bundlePath) const content = await readFile(outputPath) if (!content) return encodedFile = Buffer.from(content).toString('base64')