cli icon indicating copy to clipboard operation
cli copied to clipboard

initial poc of adding a dynamic prefix to app dev output

Open nickwesselman opened this issue 1 year ago β€’ 4 comments

WHY are these changes introduced?

Fixes #0000

WHAT is this pull request doing?

How to test your changes?

Post-release steps

Measuring impact

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

  • [ ] n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • [ ] Existing analytics will cater for this addition
  • [ ] PR includes analytics changes to measure impact

Checklist

  • [ ] I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • [ ] I've considered possible documentation changes
  • [ ] I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

nickwesselman avatar Apr 26 '24 02:04 nickwesselman

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/app-management

github-actions[bot] avatar Apr 26 '24 02:04 github-actions[bot]

A couple linting fixes for non-related work ended up in here as a result of a lint:fix as well.

nickwesselman avatar May 20 '24 21:05 nickwesselman

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
71.9% (+0.07% πŸ”Ό)
7153/9948
🟑 Branches
69.2% (+0.08% πŸ”Ό)
3527/5097
🟑 Functions
71.54% (+0.07% πŸ”Ό)
1915/2677
🟑 Lines
73.17% (+0.08% πŸ”Ό)
6735/9204
Show files with reduced coverage πŸ”»
St.:grey_question:
File Statements Branches Functions Lines
πŸ”΄
... / draftable-extension.ts
35% (-1.84% πŸ”»)
25%
14.29% (-2.38% πŸ”»)
36.84% (-2.05% πŸ”»)

Test suite run success

1667 tests passing in 772 suites.

Report generated by πŸ§ͺjest coverage report action from 8c6fd391c670adb51708717defd6806070a3e605

github-actions[bot] avatar May 21 '24 02:05 github-actions[bot]

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** 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] avatar May 21 '24 02:05 github-actions[bot]

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

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/ui/components.d.ts
@@ -1 +1 @@
-export { ConcurrentOutput } from '../../../private/node/ui/components/ConcurrentOutput.js';
\ No newline at end of file
+export { ConcurrentOutput, ConcurrentOutputContext, useConcurrentOutputContext, } from '../../../private/node/ui/components/ConcurrentOutput.js';
\ No newline at end of file

packages/cli-kit/dist/private/node/ui/components/ConcurrentOutput.d.ts
@@ -3,10 +3,15 @@ import { AbortSignal } from '../../../../public/node/abort.js';
 import { FunctionComponent } from 'react';
 export interface ConcurrentOutputProps {
     processes: OutputProcess[];
+    prefixColumnSize?: number;
     abortSignal: AbortSignal;
     showTimestamps?: boolean;
     keepRunningAfterProcessesResolve?: boolean;
 }
+interface ConcurrentOutputContext {
+    outputPrefix: string;
+}
+declare function useConcurrentOutputContext<T>(context: ConcurrentOutputContext, callback: () => T): T;
 /**
  * Renders output from concurrent processes to the terminal.
  * Output will be divided in a three column layout
@@ -20,4 +25,4 @@ export interface ConcurrentOutputProps {
  * rsnode backend/index.js
  */
 declare const ConcurrentOutput: FunctionComponent<ConcurrentOutputProps>;
-export { ConcurrentOutput };
\ No newline at end of file
+export { ConcurrentOutput, ConcurrentOutputContext, useConcurrentOutputContext };
\ No newline at end of file

github-actions[bot] avatar May 24 '24 16:05 github-actions[bot]