Skip to content

Commit ba98bae

Browse files
ryancbahanclaude
andcommitted
Integrate Project model into loader and app-context
Wires the Project domain model into the existing loading pipeline: - getAppConfigurationState uses Project.load() for filesystem discovery - getAppConfigurationContext returns project + activeConfig + state as independent values (project is never nested inside state) - AppLoader reads from Project's pre-loaded data: extension files, web files, dotenv, hidden config, deps, package manager, workspaces - No duplicate filesystem scanning — Project discovers once, loader reads from it - AppConfigurationState no longer carries project as a field - LoadedAppContextOutput exposes project and activeConfig as top-level fields for commands - All extension/web file discovery filtered to active config's directories via config-selection functions Zero behavioral changes. All 3801 existing tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8964add commit ba98bae

File tree

6 files changed

+136
-112
lines changed

6 files changed

+136
-112
lines changed

packages/app/src/cli/models/app/loader.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ describe('load', () => {
256256

257257
// When/Then
258258
await expect(loadApp({directory: tmp, specifications, userProvidedConfigName: undefined})).rejects.toThrow(
259-
`Couldn't find directory ${tmp}`,
259+
/Could not find a Shopify app configuration file/,
260260
)
261261
})
262262
})
@@ -267,7 +267,7 @@ describe('load', () => {
267267

268268
// When/Then
269269
await expect(loadApp({directory: currentDir, specifications, userProvidedConfigName: undefined})).rejects.toThrow(
270-
`Couldn't find an app toml file at ${currentDir}`,
270+
/Could not find a Shopify app configuration file/,
271271
)
272272
})
273273

@@ -485,7 +485,7 @@ describe('load', () => {
485485
await makeBlockDir({name: 'my-extension'})
486486

487487
// When
488-
await expect(loadTestingApp()).rejects.toThrow(/Couldn't find an app toml file at/)
488+
await expect(loadTestingApp()).rejects.toThrow(/Could not find a Shopify app configuration file/)
489489
})
490490

491491
test('throws an error if the extension configuration file is invalid', async () => {
@@ -1058,7 +1058,7 @@ describe('load', () => {
10581058
await makeBlockDir({name: 'my-functions'})
10591059

10601060
// When
1061-
await expect(loadTestingApp()).rejects.toThrow(/Couldn't find an app toml file at/)
1061+
await expect(loadTestingApp()).rejects.toThrow(/Could not find a Shopify app configuration file/)
10621062
})
10631063

10641064
test('throws an error if the function configuration file is invalid', async () => {

0 commit comments

Comments
 (0)