diff --git a/packages/app/src/cli/services/bulk-operations/stage-file.test.ts b/packages/app/src/cli/services/bulk-operations/stage-file.test.ts index 5a1d6e6978..b342a7bf52 100644 --- a/packages/app/src/cli/services/bulk-operations/stage-file.test.ts +++ b/packages/app/src/cli/services/bulk-operations/stage-file.test.ts @@ -69,7 +69,7 @@ describe('stageFile', () => { const uploadedBlob = fileAppendCall?.[1] as Blob const uploadedContent = await uploadedBlob?.text() - expect(uploadedContent).toBe('{"input":{"id":"gid://shopify/Product/123","tags":["test"]}}\n') + expect(uploadedContent).toBe('{"input":{"id":"gid://shopify/Product/123","tags":["test"]}}') }) test('handles JSONL with multiple lines correctly', async () => { @@ -94,7 +94,6 @@ describe('stageFile', () => { '{"input":{"id":"gid://shopify/Product/1","title":"New Shirt"}}', '{"input":{"id":"gid://shopify/Product/2","title":"Cool Pants"}}', '{"input":{"id":"gid://shopify/Product/3","title":"Nice Hat"}}', - '', ].join('\n') expect(uploadedContent).toBe(expectedContent) diff --git a/packages/app/src/cli/services/bulk-operations/stage-file.ts b/packages/app/src/cli/services/bulk-operations/stage-file.ts index 6a11e98e5a..ab90ef4fe9 100644 --- a/packages/app/src/cli/services/bulk-operations/stage-file.ts +++ b/packages/app/src/cli/services/bulk-operations/stage-file.ts @@ -18,7 +18,7 @@ interface StageFileOptions { export async function stageFile(options: StageFileOptions): Promise { const {adminSession, variablesJsonl} = options - const buffer = Buffer.from(variablesJsonl ? `${variablesJsonl}\n` : '', 'utf-8') + const buffer = Buffer.from(variablesJsonl ?? '', 'utf-8') const filename = 'bulk-variables.jsonl' const size = buffer.length