initial poc of adding a dynamic prefix to app dev output
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
devordeployhave been reflected in the internal flowchart.
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
A couple linting fixes for non-related work ended up in here as a result of a lint:fix as well.
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
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.
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
mainyou might see odd diffs, rebasemaininto 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