Shopify / cli

Build apps, themes, and hydrogen storefronts for Shopify
https://shopify.dev
MIT License
436 stars 128 forks source link

Add vendored DevServer library #4825

Closed shauns closed 1 week ago

shauns commented 1 week ago

WHY are these changes introduced?

Internal to Shopify, the CLI needs to support the new dev server infrastructure and hostnames for local development environments.

For any non-Shopifolk: there's no difference, it's an internal adjustment.

WHAT is this pull request doing?

Adds a copy of the DevServer library (with permission) and use it for FQDNs during local dev.

How to test your changes?

Run SHOPIFY_SERVICE_ENV="local" p shopify app info --path=<path to an app> --verbose

You'll see the CLI exit, because the first thing it wanted to connect locally to wasn't there (probably identity). Confirm the error message and the URL it was trying to connect to.

Checklist

Measuring impact

How do we know this change was effective? Please choose one:

shauns commented 1 week ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @shauns and the rest of your teammates on Graphite Graphite

github-actions[bot] commented 1 week ago

We detected some changes at packages/*/src and there are no updates in the .changeset. If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

github-actions[bot] commented 1 week ago

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

New type declarations

packages/cli-kit/dist/public/node/vendor/dev_server/DevServer.d.ts ```diff export declare class DevServer { protected name: string; constructor(name: string); url({ nonstandardHostPrefix, }?: { nonstandardHostPrefix?: string; }): string; host({ nonstandardHostPrefix, }?: { nonstandardHostPrefix?: string; }): string; protected assertRunningLocally2024(): void; protected assertRunningLocally2016(): void; } export declare class DevServerCore { private readonly name; url(prefix: string): string; host(prefix: string): string; private assertRunningLocally2024; private assertRunningLocally2016; } ```

Existing type declarations

We found no diffs with existing type declarations

github-actions[bot] commented 1 week ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
71.33% (-0.44% πŸ”»)
8463/11864
🟑 Branches
67.9% (-0.33% πŸ”»)
4105/6046
🟑 Functions
70.9% (-0.41% πŸ”»)
2220/3131
🟑 Lines
71.77% (-0.47% πŸ”»)
8004/11153
Show new covered files 🐣
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------- | :--------- | :------- | :-------- | :---- | | πŸ”΄ |
`...` / DevServer.ts
| 5% | 0% | 0% | 5% |

Test suite run success

1917 tests passing in 870 suites.

Report generated by πŸ§ͺjest coverage report action from 3925050e2e74f4cbf38b5a68f39464d1fa09068e

shauns commented 1 week ago

Merge activity