Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use-localhost improvements and tweaks #5491

Open
wants to merge 6 commits into
base: experimental-https-localhost-flag
Choose a base branch
from

Conversation

nickwesselman
Copy link
Contributor

Some suggested DX adjustments to this PR:

  • I’m checking if the cert already exists, and just prompting for that. I removed the existing prompt for mkcert download. (We don’t prompt for other binary downloads)
  • Simplified the output for when we do need to generate a cert
  • If the cert already exists, nothing new is output before the standard dev logs
  • Added a log line for the proxy server indicating the port and cert it’s using
  • Some language and URL tweaks to the info banner

@nickwesselman nickwesselman requested a review from shauns March 7, 2025 16:38
@nickwesselman nickwesselman requested a review from a team as a code owner March 7, 2025 16:38
Copy link
Contributor

github-actions bot commented Mar 7, 2025

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.

Copy link
Contributor

github-actions bot commented Mar 7, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
76.58% (+0.46% 🔼)
9361/12224
🟡 Branches
71.75% (+0.55% 🔼)
4586/6392
🟡 Functions
76.27% (+0.51% 🔼)
2430/3186
🟡 Lines
77.12% (+0.46% 🔼)
8847/11471
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / sleep-with-backoff.ts
100% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / setup-dev-processes.ts
93.75% (-1.99% 🔻)
73.33% (-5.24% 🔻)
90.91%
92.86% (-2.26% 🔻)
🟡
... / generate.ts
67.16% (-0.53% 🔻)
57.45% (-0.33% 🔻)
50%
72.58% (+0.45% 🔼)
🔴
... / list.ts
0%
0% (-100% 🔻)
0% 0%

Test suite run success

2128 tests passing in 935 suites.

Report generated by 🧪jest coverage report action from 3a234c7

@nickwesselman
Copy link
Contributor Author

Not sure why graphql-codegen check is failing?

@nickwesselman nickwesselman requested a review from shauns March 10, 2025 18:42
@shauns shauns force-pushed the nw-https-localhost-improvements branch from 0cb16f2 to 3a234c7 Compare March 11, 2025 09:58
@shauns shauns force-pushed the experimental-https-localhost-flag branch from 5388ac9 to 6a2c0a1 Compare March 11, 2025 09:58
Copy link
Contributor

shauns commented Mar 11, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

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

Copy link
Contributor

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:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

packages/cli-kit/dist/public/node/testing/test-with-temp-dir.d.ts
import { TestAPI } from 'vitest';
interface TempDirFixture {
    tempDir: string;
}
/**
 * Vitest fixture providing the test with a temporary directory to work in.
 */
export declare const testWithTempDir: TestAPI<TempDirFixture>;
export {};

Existing type declarations

packages/cli-kit/dist/public/node/github.d.ts
@@ -47,4 +47,5 @@ export interface GithubRepositoryReference {
  * @param reference - A GitHub repository URL (e.g. https://github.com/Shopify/cli/blob/main/package.json)
  */
 export declare function parseGitHubRepositoryReference(reference: string): GithubRepositoryReference;
+export declare function downloadGitHubRelease(repo: string, version: string, assetName: string, targetPath: string): Promise<void>;
 export {};
\ No newline at end of file

1 similar comment
Copy link
Contributor

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:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

packages/cli-kit/dist/public/node/testing/test-with-temp-dir.d.ts
import { TestAPI } from 'vitest';
interface TempDirFixture {
    tempDir: string;
}
/**
 * Vitest fixture providing the test with a temporary directory to work in.
 */
export declare const testWithTempDir: TestAPI<TempDirFixture>;
export {};

Existing type declarations

packages/cli-kit/dist/public/node/github.d.ts
@@ -47,4 +47,5 @@ export interface GithubRepositoryReference {
  * @param reference - A GitHub repository URL (e.g. https://github.com/Shopify/cli/blob/main/package.json)
  */
 export declare function parseGitHubRepositoryReference(reference: string): GithubRepositoryReference;
+export declare function downloadGitHubRelease(repo: string, version: string, assetName: string, targetPath: string): Promise<void>;
 export {};
\ No newline at end of file

Copy link
Contributor

shauns commented Mar 11, 2025

/snapit

Copy link
Contributor

🫰✨ Thanks @shauns! Your snapshot has been published to npm.

Test the snapshot by installing your package globally:

pnpm i -g @shopify/[email protected]

Tip

If you get an ETARGET error, install it with NPM and the flag --@shopify:registry=https://registry.npmjs.org

Caution

After installing, validate the version by running just shopify in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants