Skip to content

Commit c356b4e

Browse files
authored
Merge pull request #6589 from Shopify/revert-6524-10-16-surface_rewritten_liquid_files_to_dev_and_push_commands
Revert "Surface rewritten liquid files to dev and push commands"
2 parents 2a60aef + 9450302 commit c356b4e

File tree

15 files changed

+71
-352
lines changed

15 files changed

+71
-352
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@shopify/cli-kit': patch
3+
'@shopify/theme': patch
4+
---
5+
6+
[Bug fix] Remove ability to sync Liquid files by checksum

packages/cli-kit/src/cli/api/graphql/admin/generated/theme_files_upsert.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type ThemeFilesUpsertMutationVariables = Types.Exact<{
1010

1111
export type ThemeFilesUpsertMutation = {
1212
themeFilesUpsert?: {
13-
upsertedThemeFiles?: {filename: string; checksumMd5?: string | null}[] | null
13+
upsertedThemeFiles?: {filename: string}[] | null
1414
userErrors: {filename?: string | null; message: string}[]
1515
} | null
1616
}
@@ -71,7 +71,6 @@ export const ThemeFilesUpsert = {
7171
kind: 'SelectionSet',
7272
selections: [
7373
{kind: 'Field', name: {kind: 'Name', value: 'filename'}},
74-
{kind: 'Field', name: {kind: 'Name', value: 'checksumMd5'}},
7574
{kind: 'Field', name: {kind: 'Name', value: '__typename'}},
7675
],
7776
},

packages/cli-kit/src/cli/api/graphql/admin/mutations/theme_files_upsert.graphql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ mutation themeFilesUpsert($files: [OnlineStoreThemeFilesUpsertFileInput!]!, $the
22
themeFilesUpsert(files: $files, themeId: $themeId) {
33
upsertedThemeFiles {
44
filename
5-
checksumMd5
65
}
76
userErrors {
87
filename

packages/cli-kit/src/public/node/themes/api.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -553,19 +553,11 @@ describe('bulkUploadThemeAssets', async () => {
553553
key: 'snippets/product-variant-picker.liquid',
554554
success: true,
555555
operation: Operation.Upload,
556-
asset: {
557-
checksum: '',
558-
key: 'snippets/product-variant-picker.liquid',
559-
},
560556
},
561557
{
562558
key: 'templates/404.json',
563559
success: true,
564560
operation: Operation.Upload,
565-
asset: {
566-
checksum: '',
567-
key: 'templates/404.json',
568-
},
569561
},
570562
])
571563
})

packages/cli-kit/src/public/node/themes/api.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,6 @@ function processUploadResults(uploadResults: ThemeFilesUpsertMutation): Result[]
315315
key: file.filename,
316316
success: true,
317317
operation: Operation.Upload,
318-
asset: {
319-
key: file.filename,
320-
checksum: file.checksumMd5 ?? '',
321-
},
322318
})
323319
})
324320

packages/theme/src/cli/services/dev.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,14 @@ export async function dev(options: DevOptions) {
101101
session.storefrontPassword = await storefrontPasswordPromise
102102
}
103103

104-
const {serverStart, renderDevSetupProgress, syncRewrittenFilesPromise} = setupDevServer(options.theme, ctx)
104+
const {serverStart, renderDevSetupProgress} = setupDevServer(options.theme, ctx)
105105

106106
if (!options['theme-editor-sync']) {
107107
session.storefrontPassword = await storefrontPasswordPromise
108108
}
109109

110110
await renderDevSetupProgress()
111111
await serverStart()
112-
await syncRewrittenFilesPromise()
113112

114113
renderLinks(urls)
115114
if (options.open) {

packages/theme/src/cli/services/push.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ describe('push', () => {
4949
workPromise: Promise.resolve(),
5050
uploadResults: new Map(),
5151
renderThemeSyncProgress: () => Promise.resolve(),
52-
syncRewrittenFilesPromise: Promise.resolve(),
5352
})
5453
vi.mocked(ensureThemeStore).mockReturnValue('example.myshopify.com')
5554
vi.mocked(ensureAuthenticatedThemes).mockResolvedValue(adminSession)
@@ -94,7 +93,6 @@ describe('push', () => {
9493
workPromise: Promise.resolve(),
9594
uploadResults,
9695
renderThemeSyncProgress: () => Promise.resolve(),
97-
syncRewrittenFilesPromise: Promise.resolve(),
9896
})
9997

10098
// When

packages/theme/src/cli/services/push.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,20 +205,16 @@ async function executePush(
205205
const themeFileSystem = mountThemeFileSystem(options.path, {filters: options})
206206
recordTiming('theme-service:push:file-system')
207207

208-
const {uploadResults, renderThemeSyncProgress, syncRewrittenFilesPromise} = uploadTheme(
208+
const {uploadResults, renderThemeSyncProgress} = uploadTheme(
209209
theme,
210210
session,
211211
themeChecksums,
212212
themeFileSystem,
213-
{
214-
...options,
215-
handleRewrittenFiles: 'warn',
216-
},
213+
options,
217214
context,
218215
)
219216

220217
await renderThemeSyncProgress()
221-
await syncRewrittenFilesPromise
222218

223219
if (options.publish) {
224220
await themePublish(theme.id, session)

packages/theme/src/cli/utilities/theme-downloader.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,7 @@ function buildDownloadTasks(
8686
return batches
8787
}
8888

89-
export async function downloadFiles(
90-
theme: Theme,
91-
fileSystem: ThemeFileSystem,
92-
filenames: string[],
93-
session: AdminSession,
94-
) {
89+
async function downloadFiles(theme: Theme, fileSystem: ThemeFileSystem, filenames: string[], session: AdminSession) {
9590
const assets = await fetchThemeAssets(theme.id, filenames, session)
9691
if (!assets) return
9792

packages/theme/src/cli/utilities/theme-environment/theme-environment.test.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ vi.mock('../theme-uploader.js', async () => {
3434
})
3535
beforeEach(() => {
3636
vi.mocked(uploadTheme).mockImplementation(() => {
37-
return {
38-
workPromise: Promise.resolve(),
39-
uploadResults: new Map(),
40-
renderThemeSyncProgress: () => Promise.resolve(),
41-
syncRewrittenFilesPromise: Promise.resolve(),
42-
}
37+
return {workPromise: Promise.resolve(), uploadResults: new Map(), renderThemeSyncProgress: () => Promise.resolve()}
4338
})
4439
})
4540

@@ -131,7 +126,6 @@ describe('setupDevServer', () => {
131126
nodelete: true,
132127
deferPartialWork: true,
133128
backgroundWorkCatch: expect.any(Function),
134-
handleRewrittenFiles: 'fix',
135129
})
136130
})
137131

@@ -182,7 +176,6 @@ describe('setupDevServer', () => {
182176
nodelete: true,
183177
deferPartialWork: true,
184178
backgroundWorkCatch: expect.any(Function),
185-
handleRewrittenFiles: 'fix',
186179
})
187180
})
188181

0 commit comments

Comments
 (0)